About Seesaw Sign Up

Teachers, save “CS - Arduino - Analog Sensors and LED” to assign it to your class.

Reto Speerli

CS - Arduino - Analog Sensors and LED

Grades: 7th Grade, 5th Grade, 6th Grade
Subjects: Science, STEAM, Computer Science

Student Instructions

Open mBlock and design a program to control the LED with different analog sensors. Use the layout sheets (Fritzing) to set up the assembly. You will use the photo-resistor, a potentiometer and a pressure sensor to learn how to use analog sensors with mBlock and the Arduino. Use a loop to repeat your code over and over again: //the photo-resistor will simply provide the analog pin A0 with a number 0 - 1023 //the LED pin is set to a digital pin as pwm output //create a variable to store the data from the analog sensor (photo-resistor, potentiometer, pressure sensor) //set the digital pin 9 for the LED (pwm pin output) to the variable containing the data from the photo-resistor 1. Tap the add button. 2. Tap the video tool to record one of the Arduino experiment setups. 3. Explain what your program does while the experiment is running. The lenght of the video should be 2 Minutes or less. 4. Tap the check button to add to your portfolio.

Loading