Hello Arduino Users.
My goal is to get led 13 to blink after i call my own API like for example:
http://ip-yun/arduino/blinkslow/13/1
http://ip-yun/arduino/blinkfast/13/1
I'am lost how to get it looped.. how do i get this to work?
I got this to work without the API... But then the arduino just reads a simple state... 1/0 not blinkfast or blinkslow.
How can i get a function to do this? (I used the bridge example to get started)
Any idea's to push me in the right direction..
Thanks!
void loop() {
// Get clients coming from server
YunClient client = server.accept();
int waarde = digitalRead(13);
if (waarde==1) {
digitalWrite(13, HIGH);
delay(500);
digitalWrite(13, LOW);
delay(500);
digitalWrite(13, HIGH);
}
// There is a new client?
if (client) {
// Process request
process(client);
// Close connection and free resources.
client.stop();
}
delay(50); // Poll every 50ms
}