About Seesaw Sign Up

Teachers, save “CS - Arduino - Potentiometer and DC motor” to assign it to your class.

Reto Speerli

CS - Arduino - Potentiometer and DC motor

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

Student Instructions

Open mBlock and design a program to control a DC motor. You will use a potentiometer and learn how to control a motor with mBlock and the Arduino. Use a loop to repeat your code over and over again: // connect the potentiometer to analog 0 (A0) and read the value // set "pwm pin 9 output" (0-255) to the value of analog 0 (A0; 0-1023) // use an operator to adjust the analog read value (0-1023) to the pwm output (0-255) // control the motor speed with the potentiometer 1. Tap the add button. 2. Tap the video tool to record the Arduino experiment setup. 3. Explain what your program does while the experiment is running.. 4. Tap the check button to add to your portfolio.

Loading