TETRIX Samantha Module

Revision as of 14:46, 10 October 2012 by Jwatson (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
TETRIX → TETRIX Samantha Module

Gather the Required Information

Before you can use your Samantha Module with ROBOTC, you must install the Windows drivers and set the device up for use.

Note: There are many different router configurations, and many different combinations of network type, encryption type, etc. We are using a commonly used network setup (with the router in between the computer and modem with standard encryption). Your particular setup may be different, and may require additional steps to set up properly.

1. The first thing we will want to do is download and install FTC's Field Control Software package. This can be found on FIRST's site (usfirst.org).
2. Next, we will need the SSID, encyption type, and password for the network we wish to connect to. For testing purposes, we named our router "SamoTest1" with an encryption type of WPA (TKIP).
3. You will also need a 4GB or smaller USB flash drive, formatted to FAT32 file format. To format the flash drive, navigate to the Start menu, select Computer, right click on the flash drive's name, then click Format. In the drop down box, select 'FAT32' as the file format, and check the 'Quick Format' box (for a faster format).
Format One.jpg
4. Navigate to the Start menu, All Programs, Samantha Field Control System, and start the program called "Samantha Network Config".
Network Config One.jpg
5. Enter all the information for your network and click. Two message boxes will pop up, the first one informing you that the password you entered will be converted to an encrypted key and the second informing you that the config file has been saved to your flash drive.
Network Config Two.jpg
6. Close the program and navigate to your ROBOTC installation folder (default location of C:\Program Files(x86)\Robomatter Inc\ROBOTC Developement Environment). Navigate to the Firmware folder and copy the Samantha.hex file into your flash drive. You should also see a folder named "SMRTNTKY" on the flash drive; this is where the Network Config tool saved the config file for your network.
Firmware Location.jpg

Flash the Samantha Module

You must now update the Samantha Module's firmware and install the config file you created using the Network Config tool; otherwise the Samantha Module will not recognize your network.
1. Unplug the USB flash drive from your computer and (making sure the battery is unplugged) plug it into the Samantha Module. Plug in the battery while holding down the red/black button on top of the module. Release the button approximately 3 seconds after the red light appears on the module.
2. The Samantha Module will flash the red light twice in rapid succession and then flash the white repeatedly. You may also see the flash drive's LED flickering (if applicable). This means the Samantha Module is installing the firmware. When it's done, it will flash the red, white, and blue lights in sequence, then repeat the process. Be patient; this process normally takes 20-30 seconds and as long as 2-3 minutes. When it is done it should have a solid red light and a blinking white light (meaning it is connected to the network).

Installing and Updating the NXT

1. Like all other Windows devices, the NXT requires a driver in order to work properly. This is normally installed with ROBOTC, but if for any reason it needs reinstalled you can find it here on ROBOTC's website.
2. Next, download ROBOTC's firmware to the NXT. To do this, connect the NXT to the computer and turn it on. Navigate to the Robot menu in ROBOTC and make sure that 'LEGO MINDSTORMS NXT+TETRIX' is chosen as the Platform Type and that 'Physical Robot' is chosen as the Compiler Target. Then, click Download Firmware->Standard File to download the ROBOTC firmware to the NXT (this should take anywhere from 10 seconds up to a minute).
Download Firmware.jpg
3. Navigate to File->Open Sample Program->NXT->Samantha Module->samostat.c. Compile and download this program onto the NXT brick.
4. Navigate to Robot->NXT Brick->Communication Link Setup and change the 'Search Selection' drop down menu to "USB, Bluetooth, or Wifi". This will enable ROBOTC to search your network for the NXT once it is connected. Click close to save the changes.
Communication Type.jpg

Connecting the NXT and Samantha Module

1. Keeping the USB-B end connected to the NXT, disconnect the USB flash drive from the Samantha Module and the USB-A connector from the computer. Connect the USB cable to the Samantha Module instead.
2. Turn on the NXT and the Samantha Module if you have not done so already. The NXT will show that it is connected via USB and the Samantha Module's 'NXT' LED should turn a solid blue (it may flicker from time to time; this means that it is transferring data to the NXT).
3. If the blue NXT does not light up, press the red/black button on top of the Samantha module.
4. Run the "samostat" program on the NXT. After a few seconds, it should connect to the wireless network through the Samantha Module and display information such as the SSID, IP address, etc. You can then type in the IP address displayed into a web browser to pull up the Samantha Module's NXT Status Page.
Network Page.jpg
5. Open a program in ROBOTC, compile it, and download it to the NXT. If everything is setup correctly, the program should download and compile through the Wifi network. If so, congratulations! You've successfully set up and connected your Samantha Module through ROBOTC. If you have any problems, see our troubleshooting/reference guides below.

References and Troubleshooting

Samantha LED Code Guide: Very useful if you have an unknown combination of LED lights.
FTC Video Tutorial: Updating a Samantha Module Shows how to force the Samantha Module into boot mode and upload files from a flash drive. You can copy the samantha.hex firmware file from the location indicated in the video instead of the ROBOTC folder; they should be the same file.
USFIRST's FTC Toolbox page: Has various tutorials, guides, and downloads including the Field Control System software package (which contains the Samantha Network Config utility).