Through this project are highlighted some simple functionalities of some components, such as LEDs, a DC motor and a DHT11 sensor, in an interactive environment, user friendly.
Raspberry Pi Chat is a web application where you can command the development board and the response will be given back when it has been fulfilled the user's request. Thus, simple commands such as "Red LED on" can be given so that the red LED lights up. This type of control is applicable to several colors of LEDs such as: green, white, blue, yellow, purple, cyan, brown, each color having its own LED.
When you want to turn off the LED, you can use the command "Red led off", of course mentioning the LED that you want to turn off. Other ways to play with LEDs are commands like BLINK and DIMM.
The engine controls are similar to the LED’s start and stop: “Motor on” and “Motor off”. The last one, the DHT11 sensor, is a temperature and humidity sensor. For the simplicity of the project, it is presented only on the temperature side.
To make it more natural, instead of checking each sentence and hard coding those sentences inside our program we can check for words and proceed accordingly.
So the program will primarily check for LED’s colors, the word „motor” and „temperature”. Once detecting either one of these words, it will look for other keywords like on, off, blink or dimm. The respective colour LED, senzor or motor will be toggled only if the words are detected.
The following table will help you determine the GPIO number for the connection of the components:
Here are some photos of our project:
To see how the project works we have made a short video to show all implemented functionalities: