const int LEDPIN0 = D0;
void setup() {
pinMode(LEDPIN0, OUTPUT);
//Making a Connected LED
digitalWrite(LEDPIN0, LOW);
Particle.function("led", ledControl);
}
void loop() {
}
//Making a Connected LED
//Ex.1
int ledControl(String command)
{
for(int i = 0; i < 3; i++){
digitalWrite(LEDPIN0, HIGH);
delay(500);
digitalWrite(LEDPIN0, LOW);
delay(500);
}
return 1;
}
Click to Expand
Content Rating
Is this a good/useful/informative piece of content to include in the project? Have your say!
You must login before you can post a comment. .