Skip to content
Snippets Groups Projects
Commit a1c4fc81 authored by 13515029 - Finiko Kasula Novenda's avatar 13515029 - Finiko Kasula Novenda
Browse files

Add Client Connect

parent aae41358
No related merge requests found
#include <Bridge.h>
#include <HttpClient.h>
void InitializeClient();
void Connect(const char* url);
void setup() {
// put your setup code here, to run once:
InitializeClient();
}
void loop() {
// put your main code here, to run repeatedly:
Connect("https://tranquil-citadel-63668.herokuapp.com/api/status");
}
void InitializeClient() {
pinMode(13, OUTPUT);
digitalWrite(13, LOW);
Bridge.begin();
Serial.begin(9600);
while(!Serial);
}
void Connect(const char* url) {
HttpClient client;
client.get(url);
while (client.available()) {
const char* clientRead = client.read();
Serial.print(clientRead);
}
Serial.flush();
delay(5000);
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment