Example Arduino projects for communicating with AT&T's M2X service using a CC3000.
- Follow the instructions on https://github.com/sparkfun/m2x-arduino to sign up for an M2X account and install the jsonlite and m2x-arduino libraries.
- Follow the instructions on https://github.com/sparkfun/SFE_CC3000_Library to install SparkFun's CC3000 library.
- Connect a CC3000 WiFi Shield to the Arduino.
- Connect an HTU21D to the Arduino and CC3000 Shield stack. Note that you will need to level shift the I2C lines, as the HTU21D is 3.3V only.
- Download this repository.
- Open up M2X_CC3000_Post.ino in Arduino.
- Update the values AP_SSID, AP_PASSWORD, AP_SECURITY, FEED_ID, STREAM_NAME, and M2X_KEY to match your WiFi and M2X parameters.
The Fetch and LED examples will cause an Uno to run out of RAM. You need to change SERIAL_BUFFER_SIZE from 64 to 32 in HardwareSerial.cpp, which can be found in: C:\Program Files (x86)\Arduino\hardware\arduino\cores\arduino