Interface a CC3200 to a mote using the SmartMesh C library!
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!
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.
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.
the CC3200 board powers the DC9003 mote (through its VCC pin)
the two boards can talk over serial (through the TX/RX pins)
the connections to the DC9003's TX CTSn and RX RTSn pins are there to effectively disable flow control. That is, it tells the DC9003 that the CC3200 is always ready to receive bytes over its serial port.
Use the "Add .ZIP Library..." utility to add all 4 libraries to Energia
Verify that all 4 appear in the available libraries
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
The Triangle2manager sample application interacts with a SmartMesh IP mote. It drives the mote through the process of joining the network, and then periodically sends a 2-byte value (a triangle wave) to the SmartMesh IP manager.
The SmartMesh IP mote you connect to needs to operate in "slave" mode.
To see the data received by the SmartMesh IP manager, use the SmartMesh SDK SensorDataReceiver sample application:
Connect your SmartMesh IP manager to your computer.
On the computer, start the SensorDataReceiver sample application from the SmartMesh SDK, and connect that to the SmartMesh IP manager.
Load the Triangle2manager.ino sketch onto your board.
Reset the SmartMesh IP mote and open the Serial Monitor.
On the monitor, you can follow how your SmartMesh IP mote joins the network.
After the mote has joined, the slider on the SensorDataReceiver application is set to the value the mote periodically sends.
The state machine implemented in the Triangle2manager.ino sketch gracefully handles the resets.
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.