The Wheg Robot is wirelessly controlled using an Arduino Leonardo, a Sparkfun Shield, and XBee antennas. This robot runs on a 7.2 NiMH battery and uses the unique styled Wheg wheels to allow it to travel on more types of terrain.
Hello, my name is Kayla P, and I am a rising Junior at Los Gatos High School. My starter project was the Mini Racing Robot and my main project was the Wheg Robot. Looking back, I remember walking into this program unsure of what I would be able to accomplish. I knew a lot could be learned in 6 weeks, and I was excited and nervous to find out. Not only did I learn the process and intracracy of building a robot, but I also had the opportunity to start from scratch and finishing a product that I’m proud of. Since the Wheg Robot was not a project done before by other students at Bluestamp, I often felt unsure of what step to take next. I had some experience with engineering design and coding before Bluestamp, but this project took many hours of researching many different areas of engineering that I did not know about. There were several challenges along the way, but these challenges also exposed me to different areas of engineering, and pushed me to keep finding solutions everyday.
Code Samples for Wireless Joystick and Arduino based Robot
To see my full code for my robot and wireless controller, I have made a GitHub repository here .
Code on the robot to read the signals being sent from the wireless controller:
remote = Serial1.read();
This part of the code uses the “serial1” function to make sure that signals are being transmitted to the robot. The first line in the ‘if statement’ that is commented out using two forward slashes, allows the user to check in the serial monitor exactly what signals are being sent.
Code on the robot which runs the motors:
This code sample runs one side of the motors on the robot using a “switch case statement”.
Code on joystick to send a certain character based on the analog values being read from the joysticks on the wireless controller:
if(((analogLeft > 520) && (analogLeft < 550)) && ((analogRight > 440) && (analogRight < 500)))
Serial1.write(‘D’); //both not moving