Post

Rain IOT, a rain sensor

At the end of this semester we had to make a project using one of the subjects we’ve studied so far. We’ve chosen to build an IOT device that could communicate with the smartphone through an app that notifies us when it’s raining in real time. The name of it was RainIOT. We started by buying some tools like an esp32 microcontroller, sensor as well as some jumpers. Then we splitted tasks between members.

For me the task was building the app and integrate the communication of both the IOT device and the app. Initially my approach was to use an AWS Iot server to serve as a mqtt broker and Flutter to build the app. Mqtt is a lightweight protocol for communication when dealing with IOT devices as you can represent smart objects as paths and the broker always keeps track of new events in almost real-time so it always informs subscribers. This is another cool thing.

However, I was having trouble with the key pairs using mqtt_client from dart. I ended up choosing HiveMQ broker as it was working pretty well on this lib. My friend was embedding C++ code on the esp using the URL provided by the broker to send messages. He was using PubSubClient.h and WiFiClientSecure.h libs. This IOT device was the publisher and the app instance the subscriber. It worked pretty well.

Profissional meaning

  • How to manage and use a cloud web service equivalent to aws IOT.
  • Lead a software project and how to integrate it with different components, like the microcontroller device with the flutter app
  • Communication between server-clients, retrieve data between networks interpreting them correctly.
  • Time-based project. How to deliver a project in a given time.
  • More about low-specs, limited systems and how to work on them.

Resources

This post is licensed under CC BY 4.0 by the author.