-
Notifications
You must be signed in to change notification settings - Fork 7
Hackathon Getting Started
We will be using the AllWize K1 shield for the hackathon. It can be stacked (carefully) on top of an Arduino Leonardo. We also have some Wemos D1 (a WiFi-capable board with the same form factor) for those willing to test the gateway side of the solution.

Read the AllWize K1 page before using the board.
You can install the AllWize library from the Arduino IDE Library Manager (Sketch/Include library/Manage Libraries) searching for “AllWize” in the search box.


Here you can find the list of available sensors for the Hackathon.

We will need to tell apart messages from each of the teams. We can use two network settings to do this: the channel to target a specific gateway and the CI number to identify our messages.
allwize = new AllWize(&Serial, RESET_PIN);
allwize->begin();
if (!allwize->waitForReady()) {
DEBUG_SERIAL.println("Error connecting to the module, check your wiring!");
while (true);
}
allwize->slave();
allwize->setChannel(WIZE_CHANNEL);
allwize->setPower(WIZE_POWER);
allwize->setDataRate(WIZE_DATARATE);
The WIZE_CHANNEL should be the number of our team. Unless you are not using your own gateway but the common gateway. In this case, the WIZE_CHANNEL will be number 11 because that is the channel the common gateway will be listening on.
We have a WiFi network with NO INTERNET ACCESS to connect our gateways and the mini-cloud where we will be storing and graphing the data. The credentials to access this network are:
- SSID: AllWize
- PASS: IoTEnabler
You can use one of the available Wemos D1 boards with an AllWize K1 shield to build your own single-channel gateway, receive messages from your node and then send them to our local cloud using MQTT.
You will need to check and configure several things:
- Your node and your gateway must be on the same channel
- You gateway must be connected to the AllWize WiFi network
- You must publish to the MQTT broker at
192.168.2.2(port 1883, no credentials) - Topic format must be
team/<team_number>/<measurement>, for instance:team/4/temperature. - Payload must be a number
- Data will be stored on the
hackathondatabase in InfluxDB under the measurement you specified and tagged with your team number
The local cloud is a Raspberry Pi running 4 pieces of Open Source Software: Mosquitto (an MQTT broker), Node-RED (a visual flow manager), InfluxDB (a time-series database) and Grafana (a visualization tool).
You will have edit access to your team dashboard in Grafana to add widgets with the data from your sensors. You will first have to connect to the local WiFi (credentials above) and then point your browser to:
- User: team# (where ‘#’ is your team number)
- Password: AllWize

- Using PlatformIO
- Using Arduino IDE