Introduction: Racing Robots!
This project uses LabVIEW, a chipKIT WF32 microcontroller, and a Leap Motion Controller in order to race two robots. LabVIEW MakerHub LINX is used to communicate between LabVIEW and the microcontroller. A LabVIEW MakerHub library for the leap is used to track hand position and then peaks and valleys are measured. The faster your hand moves up and down, the higher the duty cycle for PWM. Higher duty cycles makes the motors turn faster and increase the speed of the robot. Therefore, the person waving their hand up and down the fastest will have their robot cross the finish line first. Check out the YouTube video to see a more in-depth explanation.
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Materials
Step 2: Wiring
First, connect the PmodHB5 to the motors using the built-in connector. Then connect the 3.3V and ground connections to each of the Pmods.
The first pin on the PmodHB5 determines the direction of the motor, For the left motor, connect this pin to channel 33 on the chipKIT WF32 and connect this pin to channel 32 for the right motor.
The second pin on the PmodHB5 determines the speed of the motor using PWM. Connect the second pin of the left motor to channel 5 on the WF32 and connect it to channel 3 for the right motor.
Connect the power and ground from the batteries to each of the PmodHB5 screw terminals to power the motors. Also, send the voltage to power the board by connecting the positive lead and negative leads to J14 on the WF32 *Make sure the jumper labeled VU Select is set to EXT (pictured above).
Step 3: Software
Step 4: LabVIEW Code and Board Setup
Download the LabVIEW Code below and open it.
Use the LabVIEW MakerHub Firmware wizard to program your WF32 to use WiFi. For more information on how to do this, check out this Instructable.
On the front panel, input the TCP information and you're ready to run the VI. Make sure you have the Leap Motion Controller connected and feel free to run an example for the leap to make sure it is working in LabVIEW by looking through the included examples.
Hope you enjoyed my racing robot project!