add ramdom test

This commit is contained in:
Clement 2023-03-20 10:23:34 +01:00
parent e1eebed863
commit be7a2829f6
2 changed files with 28 additions and 4 deletions

15
IOT/Docs/test.plantuml Normal file
View File

@ -0,0 +1,15 @@
@startuml
class test {
+val:int
}
class test2 {
+val2:String
}
@enduml

View File

@ -15,9 +15,9 @@
SoftwareSerial Serial1(6, 7); // RX, TX
#endif
char ssid[] = "Clement4G"; // your network SSID (name)
char pass[] = "Clement123"; // your network password
int status = WL_IDLE_STATUS; // the Wifi radio's status
char ssid[] = "Clement4G"; // TODO: mettre id wifi dans config.ini
char pass[] = "***"; // TODO: mettre pass wifi dans config.ini
int status = WL_IDLE_STATUS; // the Wifi radio's status
//char server[] = "arduino.tips";
@ -62,8 +62,17 @@ void setup() {
if (client.connectSSL(server, 443)) {
Serial.println("Connected to server");
// Make a HTTP request
client.println("GET /api/collections/poubelle_status/records HTTP/1.1");
// client.println("GET /api/collections/poubelle_status/records HTTP/1.1");
// client.println("Host: iot2.epi.cb85.software");
// client.println("Connection: close");
// client.println();
String data = "{\"value\": \"test123\"}";
client.println("POST /api/collections/poubelle_status/records HTTP/1.1");
client.println("Host: iot2.epi.cb85.software");
client.println("Content-Type: application/json");
client.println("Content-Length: " + String(data.length()));
client.println();
client.println(data);
client.println("Connection: close");
client.println();
}