Introduction: Yarcow (Yet Another Rover Controlled Over Wifi) - Makeblock, Arduino, Droidscript
How it's work :
The rover is controlled into a browser (smartphone or computer), the commands are send through WebSocket to the Droidscript IDE which communicates with Arduino via the USB port.
Step 1: Parts
- Hardware :
- An Arduino Uno based robot platform. I recommend the MakeBlock Starter Robot Kit (you can use either IR or Bluetooth version)
- An Android phone that supports OTG with Android KitKat or later installed. Most modern phones support OTG. (I use my old HTC One S (Ville) here)
- An OTG cable (easily found on ebay or Amazon)
- A standard micro USB cable
- Software :
Step 2: Make the Robot Base
- First build the standard tracked robot model according to the MakeBlock instructions
- Check that you can drive the robot using the included infra-red controller or the Makeblock Remote App (depends which base you choose)
Step 3: Reconfigure the Hardware
- Remove the IR/Bluetooth shield
- Install your phone on chassis
- I add a small part in front of the rover under the ultrasonic sensor to protect it, because the auto stop function doesn't work properly yet
- Install your phone on the rover and strap it, here I use some Velcro
Step 4: Program the MakeBlock Orion (Arduino Uno) Board
- Install Arduino IDE
- Follow the instructions from : http://learn.makeblock.cc/learning-arduino/
- Connect the robot controller board to your computer using a standard micro USB cable
- Select "Arduino Uno" as the board type from the 'Tools' menu
- Upload (File > Upload or Crtl+u) the CarControl.ino file
Step 5: Create the Phone App
- Install the free DroidScript IDE App from Google Play
- Download the WebSocket.spk file and upload it to your phone
- Use a file browser such as Explorer+ or ES File Explorer and open the
downloaded .spk file. The .project file will then be automatically installed into DroidScript (Select 'Yes' when it asks you if you trust the source)
- Download the index.txt, rename it into index.html and virtualjoystick.js and upload the files to your phone to /sdcard/Droidscript/WebSocket/ directory
I add the WebSocket.js file in case you need it.
Step 6: Connect to the Server Phone
- Place batteries in the controller board and turn on the sliding power switch
- Insert (or re-insert) the OTG cable into your phone
- Start the 'Websocket' App by touching it's icon in DroidScript
- From another device follow the instructions wrote on the phone screen
Step 7: Time to Play ;)
- Click on "Connect" button
Now you can control the rover by move your finger if your are on an other smartphone or mouse if you are connected from a computer into the withe square in the upper left.
To send a text that the Rover going to speech, juste enter your text into the "Commande" box and click "Send Message" button.
You can see the camera view on clicking "Start Cam" and enable flashlight with "Night mode on" button.
Step 8: Thanks To
- Makeblock, for the work on the Arduino to make it easy for every one. And make complete kit :
- Dave Smart, for his work on Droidscript IDE and his Instructable that inspired me :
LaurentP30 made it!
We have a be nice policy.
Please be positive and constructive.