An Arduino Library for running connecting an Arduino Mega to Berg. Please note this library is in an alpha state so please check the GitHub repository regularly and create an issue on GitHub if you encounter any problems.
The BergCC3000 library has dependencies on the following:
- Arduino 1.0.5
- Modified Adafruit CC3000 Library
- Modified aJson Library
- Modified Websockets Library. Note that this library folder should be called
Websockets
Download or clone the GitHub repos listed above and install into your ~/Documents/Arduino/libraries folder. You may need to remove any existing folders containing the Adafruit CC3000, aJson and Websockets libraries and replace them with the Berg forks.
When installing the BergCC3000 code you will need to copy the directory named BergCC3000
directly inside the repository root, and not the repository itself.
This library is designed to work with the v2 project API and implements a Device API similar to that of the Berg Device API version 2 except where Wifi communication requires it to behave differently. Complete documentation will be available on bergcloud.com when the library is officially released.
We've included an example called BERGCloud_BareBones.ino
which gives you a basic sketch structure for you to implement your projects. It will prompt you with the claim code when running for the first time, and you can bring it online by using the List and claim devices section of the Manage Projects page.
In order to join your sketch up with Berg you must first create a project in the Dev Center. This will give you a unique Project Key that you need to place inside your Arduino sketch. At the bottom of the project info screen you'll find a pre-generated line of code, beginning with #define PROJECT_KEY
that you can copy and paste into the sketch at the top, replacing the existing #define PROJECT_KEY
line.