Hello!
Here is what I did in the last days:
- I upgraded the Sanity Check program for the whole system (the Arduino board + all the components) developed before (and mentioned here Smart Exhibit: Blog #4: Electronic schematic, system building and sanity checks) in order to use multitasking. Separate tasks for each sensor with different periods were implemented. This solution is needed because not all the sensors have to be read with the same period (some physical phenomena have a slow dynamic). I used the TaskScheduler library for this. Below is a table with the reading periods for each sensor used.
Sensor | Reading Period [sec] |
---|---|
Temperature | 1 |
Humidity | 1 |
Illuminance | 0.5 |
Motion | 5 (because of the limitations of the sensor) |
Sound | 0.1 |
IMU | 0.1 |
Button | 0.5 |
- I implemented a Sanity Check for the WiFi connection of the Arduino Nano 33 IoT board.
- I put together the previous 2 parts and I connected the whole system to the Arduino IoT Cloud. The sensors' values are sent periodically to the cloud, with different periods for each sensor using multitasking. For the IMU and for the microphone, because the actual values read are not that important for my use-case, I decided to not send them but to do a basic processing on the hardware level and to send only True-False values depending whether an important variation in values is detected.
- I designed a Dashboard in the Arduino IoT Cloud for:
- visualizing the received values from the hardware platform
- chatting in a basic way with the hardware platform If the "status" message is written from the and if the hardware platform is functioning normally, the message "I Am Alive!" will be received. If any other message is sent, the response will be "Unknown command : ("
- manually switching on an alarm from the hardware platform (a beeping using the speaker). For example, if a too high temperature value is seen on the Dashboard, the Museum staff can trigger the alarm because probably a fire appeared close to the exhibit and protection measures should be taken.
- Here is how the Dashboard looks in action on a computer:
- Here is how the Dashboard looks in action on a phone (partially, because some scrolling is needed ) using the Arduino IoT Cloud Remote Android app:
- I pushed all the code to my repository (https://github.com/alexandru-cohal/SmartExhibit).
Some more fun will come in the next days with the connection to the Cloud!