Tag Archives: accelerometer

Week3: DAY1 more sensors

IMG_2769

Once again, Do you remember how to read sensors -digital sensor (PushButton) -analog sensor (photoCell) Challenge: Connect push button or photocell to your Arduino and check the input on SerialMonitor. ——code——— int photocellValue=0; int buttonValue=0; int buttonPin=5; int photocellPin=A4; // the setup routine runs once when you press reset: void setup() { // initialize serial […]