Page 77 - Programming the Photon Getting Started With the Internet of Things
P. 77
Figure 4.4 Photon wired to an LED.
For this experiment we are going to use the same program we used earlier when we
tested the voltage outputs using the DigitalWrite function to set the output to either
HIGH or LOW.
int digitalpin = D0;
void setup() {
pinMode(digitalpin, OUTPUT);
}
void loop() {
digitalWrite(digitalpin, HIGH);
delay(1000);
digitalWrite(digitalpin, LOW);
delay(1000);
}