In this project we will control 2 motor wheels with a potentiometer. The codes in the video are written with capital letters but with the new Arduino Simulator software and library it isn’t used anymore, the original normal Arduino codes are used (AnalogRead = analogRead…). Because we included the library to the Arduino IDE in the first lesson we just have to add the #include instruction and we are good to go.
Drag the 2 wheels, the button and potentiometer into the workspace. Connect one wheel to PWM in 3 and the other wheel to PWM pin 5. select Analog pin A0 on the potentiometer and select digital pin D2 to the button. Make sure that the button is constantly pressed by clicking the blue pin on the button. In the ‘More IO’ tabs are Analog and PWM value meters available to see the values of the pins.