In this task I used the RTC module with the ESP-32 to print the exact time to the serial monitor. The RTC module uses I2C communication so I connected the SDA and SCL pins to GPIO 21 and 22 respectively. In the code, I utilized the RTClib.h library to initialize the RTC module and then printed the time on the serial monitor.
This was the output being printed on the serial monitor.
In this task I learnt about the basic functioning of RFID cards and how the card readers are used to read the specific ID of each of these cards. I utilized the card and the reader to turn on and off a led whenever a RFID card with a valid ID was read. If a card having invalid ID was read, the other LED would turn off indicating unauthorized card was read. For this task i utilized the MFRC522 library that is responsible for communication with the card reader along with the SPI library for enabling the SPI bus. I had a lot of errors setting up the MFRC522 library but was later able to set it up with the help of the co-ordinators.
This task wanted me to set up and attendance logging system using the RFID cards and reader. The resource given mentioned using IFTT however this was now not available for free trial so I ended up using Google App Scripts to set up a system where the ESP-32 would read the ID of the card and use HTTP post request to print this ID onto a google sheet. I utilized the same libraries as the RFID introduction task along with the addition of the HTTPclient library to post the ID to the google appscript.
In this task I used a RFID card and reader to control the DC motor. First I had to figure out the SPI pins for the ESP-32. To do this I ran a simple code to print the ESP32 SPI pins and got the following op :
MOSI : 23
MISO : 19
SCK : 18
SS: 5
After this, I set up the motor driver and the motor to on the motor when a particular UID was detected and turn off when any other ID was read. To do this I made use of the standard SPI and MFRC522 libraries for the RFID card reader. Few images of the physical circuit and the serial monitor op are below.
I have also uploaded a short video on the same.
In this task I had to set up a system where sending a message on telegram would allow me to control the movement of a DC motor using the ESP-32. To do so I followed the steps mentioned in the resource to create a telegram bot. I then setup the UniversalTelegramBot library to allow the ESP-32 to receive and send messages via telegram. I then setup the motor driver and the motor and made three functions to start, stop and reverse the direction of the motor. The resource for this task was very helpful and I had minimal issues in completing this task. Images of the same are below :
As the Alexa in the lab was facing some issues, the coordinator advised me to use google home to complete this task. To do so I first set up a new account and device on the Arduino Cloud platform. This would enable me to connect my ESP-32 to the platform and use the google assistant to control the lights connected to the esp-32. I setup a new device on the Arduino Cloud platform and added light control and google home integration features. This gave me some code files that I could then push onto the esp-32 to control the lights. I then downloaded the IOT Remote app on my phone and was able to link it with my google assistant to successfully turn off and on the lights. This task was by far the most fun and interesting one for me. It has inspired me to use this functionality for various smart home automation applications. Images and a short video are attached below.