add ramdom test
This commit is contained in:
parent
e1eebed863
commit
be7a2829f6
15
IOT/Docs/test.plantuml
Normal file
15
IOT/Docs/test.plantuml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
@startuml
|
||||||
|
|
||||||
|
|
||||||
|
class test {
|
||||||
|
+val:int
|
||||||
|
}
|
||||||
|
|
||||||
|
class test2 {
|
||||||
|
+val2:String
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@enduml
|
@ -15,9 +15,9 @@
|
|||||||
SoftwareSerial Serial1(6, 7); // RX, TX
|
SoftwareSerial Serial1(6, 7); // RX, TX
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
char ssid[] = "Clement4G"; // your network SSID (name)
|
char ssid[] = "Clement4G"; // TODO: mettre id wifi dans config.ini
|
||||||
char pass[] = "Clement123"; // your network password
|
char pass[] = "***"; // TODO: mettre pass wifi dans config.ini
|
||||||
int status = WL_IDLE_STATUS; // the Wifi radio's status
|
int status = WL_IDLE_STATUS; // the Wifi radio's status
|
||||||
|
|
||||||
//char server[] = "arduino.tips";
|
//char server[] = "arduino.tips";
|
||||||
|
|
||||||
@ -62,8 +62,17 @@ void setup() {
|
|||||||
if (client.connectSSL(server, 443)) {
|
if (client.connectSSL(server, 443)) {
|
||||||
Serial.println("Connected to server");
|
Serial.println("Connected to server");
|
||||||
// Make a HTTP request
|
// 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("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("Connection: close");
|
||||||
client.println();
|
client.println();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user