Difference between revisions of "Programming your MasonBot"

From Lofaro Lab Wiki
Jump to: navigation, search
(Required tools)
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
[[MasonBot|Return]]
 +
 
==Required tools==
 
==Required tools==
*Arduino IDE
+
*[https://www.arduino.cc/en/Main/Software Arduino IDE]
*GoLang compiler
+
*[https://golang.org/ GoLang compiler]
*AVR ISP programmer
+
*[http://www.atmel.com/tools/avrispmkii.aspx AVR ISP programmer]
  
 
==Setting up software==
 
==Setting up software==
  
Install the [http://www.isbrad.com/WiFi101_MasonBot.zip 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.
+
'''1.''' Install the [http://www.isbrad.com/WiFi101_MasonBot.zip 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.
  
NOTE:
+
[[Image:Masonbot_tutorial_1.png|300px]]
  
-DO NOT use the default provided WiFi101 library
+
DO NOT use the default provided WiFi101 library.
  
-If given an option, do not update the library. Only use the provided WiFi101_MasonBot library.
+
If given an option, do not update the library. Only use the provided WiFi101_MasonBot library.
  
[http://www.isbrad.com/SwarmBot.zip Download SwarmBot (ZIP)]
+
'''2.''' [http://www.isbrad.com/SwarmBot.zip Download SwarmBot (ZIP)]
 
Unzip the SwarmBot folder.  
 
Unzip the SwarmBot folder.  
  
Line 21: Line 23:
 
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.
 
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.
  
Program the MasonBot (Sketch->Upload Using Programmer).
+
[[Image:Masonbot_tutorial_2.png|300px]]
  
 +
 +
'''3.''' Select the board type as "ATMega2560".
 +
 +
[[Image:Masonbot_tutorial_3.png|300px]]
 +
 +
 +
 +
'''4.''' Program the MasonBot (Sketch->Upload Using Programmer).
 +
 +
[[Image:Masonbot_tutorial_4.png|300px]]
 +
 +
==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.
 
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.
Line 30: Line 44:
  
 
'movebot' is written using GoLang, the compiler for Go can be downloaded [https://golang.org here].
 
'movebot' is written using GoLang, the compiler for Go can be downloaded [https://golang.org here].
 +
 +
The output in a terminal window should look something like this:
 +
[[image:Masonbot_tutorial_5.PNG|500px]]

Latest revision as of 21:50, 12 September 2017

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