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 button.
2. Tap the
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
button to add to your portfolio.