Info | ||
---|---|---|
|
The CC3200 is a Wi-Fi single-chip wireless MCU. Besides its Wi-Fi capabilities, it is a regular ARM Cortex-M4 microcontroller. This means you can interface it to a SmartMesh device: wire the boards up, run the C-library on the CC3200 and get it to talk to a SmartMesh IP mote or manager in minutes. And if you're using the CC3200 LaunchPad, you do all of that from the trivially simple to use Energia tool!
Tip |
---|
This recipe follows the exact same flow as the ArduinoDue example of the CLIB. |
Table of Contents |
---|
Wiring the boards together
You first need to connect the serial port of your SmartMesh device to the serial port of the CC3200 LaunchPad. Although we are assuming you are using a DC9003 board, the process is equivalent for any SmartMesh device.
Warning |
---|
To avoid erroneous connections, we recommend you power off the SmartMesh device and the LaunchPad boards. Furthermore, remove the battery from the SmartMesh device. It will be powered by the LaunchPad. |
Tip |
---|
http://energia.nu/pin-maps/guide_cc3200launchpad/ shows you the pinout of the CC3200 LaunchPad. |
CC3200 LaunchPad pin | DC9003 pin | |
---|---|---|
name | pin | |
GND | any pin marked "GND" | GND |
VCC | any pin marked "VCC" | VSUPPLY |
TX (1) | header P1, pin 9 | RX |
RX (1) | header P1, pin 10 | TX |
GND | any pin marked "GND" | TX CTSn |
VCC | any pin marked "VCC" | RX RTSn |
Info | ||
---|---|---|
| ||
The connections above allow the following:
|
Install CC3200 LaunchPad drivers
Follow the instructions at http://energia.nu/guide/guide_windows/ to install the drivers for the CC3200 launchpad.
Tip |
---|
http://energia.nu/ contains similar pages for Linux and Mac OS. |
Install Energia
- Download the latest Energia from http://energia.nu/
- No need to install it, just launch the program. On my Windows machine, I created the
C:\energia\
folder and unzipped the program there. - To start the program, I just double-click on
C:\energia\energia-1.6.10E18\energia.exe
- Add support for the CC3200 by opening the board manager...
- look Look for "CC3200" and click "Install"
- Select the CC3200 launchpad as the board
Download source code
- You are going to run the "Triangle2Manager" sample application from the SmartMesh C library developed for the Arduino Due.
- Download the source code from https://github.com/dustcloud/sm_clib
Import the Triangle2Manager Sample Application
Info |
---|
This application is documented in the ArduinoDue page of the CLIB. When running this application, the CC3200 regularly sends a 2-byte number to the manager. |
in In the source code, zip the following directories
directory zip name C:\Users\Thomas\Desktop\sm_clib-master\sm_clib\
sm_clib.zip
C:\Users\Thomas\Desktop\sm_clib-master\examples\arduino\Libraries\IpMgWrapper\
IpMgWrapper.zip
C:\Users\Thomas\Desktop\sm_clib-master\examples\arduino\Libraries\IpMtWrapper
\IpMtWrapper.zip
C:\Users\Thomas\Desktop\sm_clib-master\examples\arduino\Libraries\TriangleGenerator
\TriangleGenerator.zip
Use the "Add .ZIP Library..." utility to add all 4 libraries to Energia
- Verify that all 4 appear in the available libraries
- open Open
C:\Users\Thomas\Desktop\sm_clib-master\examples\arduino\Triangle2manager\Triangle2manager.ino
using Energia - Make sure your CC3200 launchpad is connected to your computer and upload the sketch onto your board
Running the Triangle2Manager sample application
Include Page | ||||
---|---|---|---|---|
|
Where Next?
The Triangle2Manager just sends a hardcoded 2-byte value to the manager. It's a great starting point to develop code which sends readings collected from other sensors connected to the CC3200.