Programming your MasonBot

From Lofaro Lab Wiki
Jump to: navigation, search

Return

Required tools

Setting up software

1. Install the WiFi101_MasonBot (ZIP) library into your Arduino IDE. WiFi101_MasonBot is a modified version of the WiFi101 library used to control the ATWINC1500 WiFi module from ATMEL.

Masonbot tutorial 1.png

DO NOT use the default provided WiFi101 library.

If given an option, do not update the library. Only use the provided WiFi101_MasonBot library.

2. Download SwarmBot (ZIP) Unzip the SwarmBot folder.

Open the SwarmBot.ino Arduino program.

The SSID and the password used to connect to a Wi-Fi router are hard-coded into the firmware program. Enter the desired SSID and password correctly. The robot will connect to the router upon startup once program with the correct SSID/password information.

Masonbot tutorial 2.png


3. Select the board type as "ATMega2560".

Masonbot tutorial 3.png


4. Program the MasonBot (Sketch->Upload Using Programmer).

Masonbot tutorial 4.png

Running the MasonBot with demo 'movebot' program

Once the 'Power' and 'Wi-Fi' indicators are on, check to see if the robot shows up on the network - this can be seen through a menu on your router of choice. If the 'power', 'Wi-Fi', and "A, B, C" user LEDs are lit, the robot failed to communicate with the on-board Wi-Fi module.


To test the movement of the robot, run the 'movebot' program. This program should scan the network for set of robots and list all available robots. You can select the desired robot from the list and control its movement with the arrows keys.

'movebot' is written using GoLang, the compiler for Go can be downloaded here.

The output in a terminal window should look something like this: Masonbot tutorial 5.PNG