Hello7Bot - A Tutorial to get 7Bot Moving


Couple of people have asked for how I got my 7Bots running. Writing this tutorial to demonstrate how I got their example code working. Will also be giving all the code I used to run my 7Bots in the Robot Art 2017 Contest.  Hopefully this tutorial is helpful, but if it isn't, email me with any issues and I will try and respond as quickly as possible, maybe even immediately.


So here is quick list of steps in this tutorial:

1: Get your favorite PC or Mac.
2: Plug 7Bot into your computer.
3: Make sure Arduino Due is installed on 7Bot
4: Install Processing3 to run code.
5: Download 7Bot example code.
6: Open 7Bot example code in Processing3.
7: Make minor configuration adjustments.
8: Run the example code in Processing3.
9: Watch 7Bot come to life.
10: Experiment with my 7Bot code.


In more detail:


Step 1: Go on your favorite PC (Windows or Mac, maybe Linux?)

Simple Enough. Pretty sure it will also work on Linux, but I haven't tried it.


Step 2: Plug 7Bot into Computer and Electrical Socket

Use USB cable to plug 7Bot into your computer.
Also make sure 7Bot is plugged into external power source.
To see if it has power, hit the far left of the three buttons on the back of the robot. It should go to the default ready position as seen below.


Step 3: (OPTIONAL) If 7Bot is acting weird Make sure Drivers for the Arduino Due Are Installed

This step may or may not be needed and I am currently working to get to bottom of why this tutorial works for some 7Bots and not others. My 7Bots came with drivers for the Arduino Due pre-installed, though I have heard of of 7Bots where it sounds like they are not. If you think your 7Bot has already been set up you can proceed.  If not try one of the two following strategies to figure out if 7Bot is ready to go..

1: Download the GUI at http://www.7bot.cc/download and try using it to get your 7Bot moving.

2: Download Getting_Started_with_Bot_v1.0.pdf and make sure Arduino Due drivers are installed from its instructions.


Step 4: Download Processing3

Processing3 is a java based development environment that is pretty straight forward if you are familiar with any of the major languages.  
Download it here and install it.


Step 5: Download 7Bot Example Code

Go to github and clone their example code from the following repo.
If you are unfamiliar with github or just want the zip file, here take this.


Step 6: Open Example Code in Processing3

Go to the Arm7Bot_Com_test.pde example file you got earlier and open it.

It will ask you how to open the code, so specify the location of wherever you put the processing.exe file.

When it opens up in Processing3 it will look something like this.


Step 7: Make Minor Configuration Adjustments.

Early in the code you will find the following lines

// Open Serial Port: Your should change PORT_ID accoading to
// your own situation. 
// Please refer to: https://www.processing.org/reference/libraries/serial/Serial.html
int PORT_ID =  3;

Change the PORT_ID to match the one you plugged 7Bot into. You can refer to the documentation shown, use trial and error, or find yours by adding the following line of code and running the program...  

          // List all the available serial ports:

When I ran this, I saw the following...

[0] "/dev/cu.Bluetooth-Incoming-Port"
[1] "/dev/cu.Bluetooth-Modem"
[2] "/dev/cu.usbmodem1411"
[3] "/dev/tty.Bluetooth-Incoming-Port"
[4] "/dev/tty.Bluetooth-Modem"
[5] "/dev/tty.usbmodem1411"

And set the Port_ID to the first usb port, 2.

int PORT_ID =  2; //PINDAR - CHANGED FROM int PORT_ID = 3;


Step 8: Run the Code in Processing

Hit the Play Button in the top left hand corner of Processing3, and a small window should open and the robot should start moving.


Step 9: Watch 7Bot come to life.

Or not.  Well it should start moving, but if it doesn't, first thing to try changing is the Port in Step 7. If that doesn't work contact me and I will try and work with you to get it running.  Then I will update this blog so that next person doesn't have same problem you had.


Step 10: Have fun with my Robot Art 2017 Code

The example code from 7Bot is well documented and shows you how to do all sorts of cool things like recording the robots movements and then playing it back. I learned most of the code I used in the Robot Art 2017 contest by reverse engineering this example.

If you want to see my code, here is a version that has some of the extra functionality like easier to use inverse kinematics.  But if you clone this repo, no judging my coding style.  I like comments and leaving lots of them in as a history of what I was doing earlier in the process.  Never know when I might need to reference them or revert. I know that is what version control is for, but I leave comments everywhere anyways. Hey. You promised you wouldn't judge!


Hope this tutorial works out for you.  As mentioned earlier, write with any issues and I will try to clarify within 24 hours, maybe even immediately.  7Bot is awesome and I hope this tutorial helps you get it running.