Professional Documents
Culture Documents
Code Day2 G Physical
Code Day2 G Physical
to pin number 2
const int led = 13; // the pin that the led is attached to
pin number 13
void loop()
{
sensorState = digitalRead(2); // read sensor value and save it in
the sensor state