Tutorial 4 - Wifi Setup Setting up your Termites Wifi connection
A Termite is a fully functional micro-computer with its very own Wifi connection. This allows us to stream data remotely to another computer or database over the cloud.
This tutorial will go through the necessary steps to setup Wifi streaming.
Step 1 Termite Settings
This tutorial assumes that you have already gone through Tutorials 1 and 2. Make sure that your Termite is plugged into your computer, that “Termite Connect” is open, and that you are receiving data.
Click on “Settings”
You should now see the “Settings Screen”. For this tutorial you can ignore most of these settings. We are only interested in the Wifi settings.
Note: The “Settings Screen” is a scrolling window, scroll down to view all the settings.
Enter your Wifi settings
- Enter your Wifi Network
- Enter your Wifi Password
- Enable “Wifi Auto Connect”
- Click “Save Settings”
You will be presented with a screen asking you if you would like to overwrite your existing settings…“Go for it!”
The “Settings Screen” should disappear and you should see notifications telling you that the Termite is trying to connect to the Wifi network.
If you did not enter the correct information, or your network is having issues the you may receive a message that says “Failed to connect to wifi”. At this point UDP and MQTT will temporarily be disabled because there is no network. If you receive this message, go back into settings and correct your settings.
Note: If you are setting the Termite up to connect to a remote Wifi network that is not yet within the Termites vicinity then you can ignore this message.
If you see a message that says “Connected to wifi”, everything worked, your Termite is now connected to the internet!
Congradulations
We have not told the Termite where to send the data, which means the data is not going anywhere. Start the next tutorial and send your data to another computer.
Tutorial 5 – Streaming Data over UDP
Additional Information About the Settings
Info: These are not settings but rather hardcoded values that allow us to identify this Termite over a network.
- ChipID – This is the unique ID for the Termite.
- MAC – This is the MAC address the Termite will use on the Wifi Network
Settings: These are user settings and can be saved directly to the Termites internal memory.
The following is used to keep track of which Termite does what, who owns the Termite, and which project the Termite is being used in. These settings are not absolutely critical and you can leave them alone for the moment.
- Name: This is a custom name that you the user can give the Termite
- Type: Your custom description of this Termite.
- Project: The project this Termite should be associated with.
- Owner: This is you , the user
UDP settings are pretty self explanatory. We will use these at the end of this tutorial.
- UDP: The IP address of the computer you would like to send data to.
- UDP Port: The port number for sending UDP data.
- UDP Auto Stream – Toggle: Enables UDP streaming
The following settings are probably the most important settings to get right. Getting this right will allow the Termite to connect to the Internet,Cloud or your local Network.
- Wifi: The Wifi Network that the Termite should connect to
- Pass: The Password for the Wifi Network
- Wifi Auto Connect – Toggle: Enable the Wifi connection
When we want to send data to our database in the cloud we use a protocol called MQTT. There will be another tutorial that covers MQTT.
- MQTT: The IP or URL of the MQTT server
- MQTT Port: The MQTT port, by default it is usually 1883
- MQTT Topic: The topic that the Termite should post to
- Login: —
- Pass: —
- Enable MQTT – Toggle: Enables the MQTT publishing
The following should be left alone unless you know what you are doing.
- Deep Sleep – Toggle : Tells the Termite to sleep every 10 minutes. When the Termite is asleep you will not be able to communicate with it. In order to pull it out of deep sleep, hold the button down for 3 seconds and then you can access “Settings” again.
- Accelerometer Wake – Toggle: This will cause the Termite to wakeup/reboot overtime it is moved. This is used for sensing the movement of objects in the environment. For example, we could use this to find out when someone opens or closes a door.