Connect Maduino UNO to Servo Motor
by RonFrtek in Circuits > Arduino
1141 Views, 2 Favorites, 0 Comments
Connect Maduino UNO to Servo Motor
In this tutorial we will use Arduino UNO , servo motor and Visuino to rotate the servo motor. Watch a demonstration video.
What You Will Need
All the modules are from makerfabs. They have the best quality modules that are Light-years ahead the competition, also with best affordable prices.
Arduino UNO
Jumper wires
Servo motor
Visuino program: Download Visuino
The Circuit
Connect Maduino UNO pin (gnd) to Servo motor brown wire
Connect Maduino UNO pin (5V) to Servo motor red wire
Connect Maduino UNO pin Digital (2) to Servo motor red yellow
Start Visuino, and Select the Arduino UNO Board Type
To start programming the Arduino, you will need to have the Arduino IDE installed from here: http://www.arduino.cc/.
Please be aware that there are some critical bugs in Arduino IDE 1.6.6. Make sure that you install 1.6.7 or higher, otherwise this Instructable will not work! If you have not done follow the steps in this Instructable to setup the Arduino IDE to program ESP 8266! The Visuino:https://www.visuino.com also needs to be installed. Start Visuino as shown in the first picture Click on the "Tools" button on the Arduino component (Picture 1) in Visuino When the dialog appears, select "Arduino UNO" as shown on Picture 2
In Visuino Add Components
- Add SineAnalogGenerator component and set frequency to 0.5
- Add Servo component
In Visuino: ​Connecting Components
Connect Arduino digital out pin[2] to Servo1 pin[Out]
Connect SineAnalogGenerator1 pin[out] to Servo1 pin[In]
Generate, Compile, and Upload the Arduino Code
In Visuino, Press F9 or click on the button shown on Picture 1 to generate the Arduino code, and open the Arduino IDE
In the Arduino IDE, click on the Upload button, to compile and upload the code (Picture 2)
Play
If you power the Maduino UNO module, the servo motor will start to rotate right and left.
Congratulations! You have completed your project with Visuino. Also attached is the Visuino project, that I created for this Instructable. You can download and open it in Visuino: https://www.visuino.eu