Hello! My name is Pedro and I am a member of PET(Tutorial Education Program) from UFES - BR(Federal University of Espírito Santo). My goal with this project is make PET´s member´s life easier building a system that allows you to open a door with a minimum effort. Our day-by-day work include help and assist the Undergraduate students on their University´s projects, giving knowledge and material to complete their tasks. In a busy day we usually assist about 20 students, whom always knocks the door and waits until someone open it. Therefore, it´s interesting to think of a way to automate this process of “welcoming” someone.StepOne:
First thing to do was try to send a request to the cloud, saying that we want to turn the D3 pin level to HIGH(in this case we used the message "on"; and D3 is the relay pin). That was pretty easy considering all the documents in Particle´s website... And the code was:
Code 1(C/C++) - setting the pin as HIGH with mobile
With this Code 1 we can use Particle Mobile app and send "on" to a Particle function called doorIot.StepTwo:
However, we want to control the door while we are busy, studying or working in our computers, and the students feel free to knock any time and don´t spend too much time waiting on until someone opens the door.
The solution was creating a html script that sends a request via POST to the API and returns an arg = "on" to the particle function "Door", when an input type "submit" occurs.
This script generates the following page:
And to make it possible just pressing onde button in your keyboard... you just need to create a shortcut in your desktop and configure this to open with your keyboard(F10 or F1 or any key you prefer).Future Steps(feel free to comment possible ways to do these next steps):
- Install RFID sensor in the door, so we can enter PET´s makerspace with just a tag.
- Calculate how many students go to PET in a day, in a week or in a month.