Introduction: Bluetooth Controlled Robot: RustyLeafSwordLettuce
This month for workshop, we had to make a a robot using FisherTechnic and RoboPro, but our group decided to branch off and use Arduino as our platform for our robot. We can up with the idea of having an Andriod app controlling the robot via Bluetooth. We 3D printed the body, and used an Arduino Uno and a Bluetooth shield from Adafruit.
Step 1: Robot Design
We wanted to make the body simple. We decided to have two servos controlling the wheels, and turning the opposite one to turn. We lifted the front with a skid, which made for a ghetto looking bot. The body was 3D printed using our own design.
The circuit was basic, a 5V regulator providing power to the servos, and another battery powering the Arduino. The BT shield sat directly atop the Arduino.
Step 2: Andriod App Design
We wanted to make the app as simple so the robot is easy to control. We came up with four buttons on the sides for the movement control, two buttons in the middle for the grabber, and an alarm button in case someone gets too close. We also developed a standard system of communication codes for the app and the Arduino. We designated the letters L, R, G, and A to the four main areas of the robot: left track, right track, grabber arm, and the alarm. We then used numbers to determine the function to execute: L1 for forward, L0 for backward, and L2 for stop. For the right, we did the same thing. For the grabber arm, we went with G1 for grabbing and lifting, and G0 for setting down and releasing. We then used A1 for alarm on, and A0 for alarm off.
We never did finish the app, so we just controlled the robot via PuTTY, a simple program to connect with different ports.
Step 3: Code Design
The code was fairly simple in theory, but took a bit to put together. I used the codes we came up with, first looking for the letter, and then the letter, and storing both in their respective character. I used a couple switch/case statements, along with if/else if statements. These made up the control statements. I added two functions to simplify the servo control for the tracks and the grabber arm.
Participated in the
Circuits Contest 2016