Bees
WiFi Bee
The WiFi Bee is the connector to connect the senseBox to the Internet. Your readings will be transferred to the existing network via WLAN (WiFi). The WiFi Bee is based on the ATWINC15000 microchip from Atmel, which has a very low power consumption and a long range.
Configure the WiFi Bee & Upload on the openSenseMap
First, create an instance of Bee and openSenseMap. Once we have done this, the bee can be called in the program code consecutively with the abbreviation Declaration of the objects
Bee* b = new Bee(); // instance of Bee
OpenSenseMap osem("senseBox ID",b); // instance of openSenseMap
float temp = 24.3; // Test value that we later upload to openSenseMap
b
. In the setup()
function, we now connect to our desired WiFi network and upload a first test value onto the openSenseMap.
setup()
void setup(){
b->connectToWifi("SSID","PW"); // Connect to WiFi
delay(1000);
osem.uploadMeasurement(temp,"sensor ID") // Test value is uploaded
//"sensor ID" still needs to be replaced
};
Now, your WiFi Bee has connected to the Internet and should upload a first value to openSenseMap.
Congratulations, you have just uploaded your first data on the map, now you are ready for your first Environmental Measuring Station.