Main repository of all Arduino-related files and programs belonging to the ADC project. The Arduino portion of the ADC project is tasked with recieving a 6 digit TOTP over bluetooth, comparing the TOTP to one generated using the onboard RTC and HMAC private key, and if the TOTP matches firing a relay to trigger the door opening.
- VCC goes to 5V power supply on arduino
- GND goes to ground power on arudino
- TXD goes to Digital pin 10 on arduino
- RXD goes to Digital pin 11 on arduino
- The other two (State and FN) don't touch
- GND goes to the ground on the arduino
- VCC goes to the 3.5V power supply (5V also works but recommended use is 3.5V)
- SDA goes to Analogin Pin A4
- SCL goes to Analogin Pin A5
- 32K and SQW don't touch
- Upload the RTC.ino sketch to the Arduino
- While running and connected, run
date +T%s > /dev/ttyUSB0
to send the current UTC time to the Arduino
- Wire the arduino up correctly
- First set up the time to the RTC by uploading RTC.ino to the arduino and setting the current time in the code
- Next you might want to rename the HC-08 so you can add it to the API. The code rename.ino can help with renaming the HC-08 module
- Last step is to upload the TOTP_ADC code and select the correct key for the specific door
- https://github.com/lucadentella/TOTP-Arduino/tree/master/ for TOTP generation
- https://github.com/JChristensen/DS3232RTC for the RTC
- https://github.com/PaulStoffregen/Time for Arduino time