Goal: Simulate a system that prevents someone his is too close to some place or device by turning on a LED.
At a later stage, user will be able to turn on/off the system remotely via a web server.
use case can be used to prevent your child of dangerous place or device, like a hotplate ?
I divide the system into 3 separate system
- LED sys
- Presence/Distance sensor
- Web server
Use tinkercad to simulate the project. Please try it, you will love it.
In order to connect/plug PINS of the wifi card i used this diagram below.
LED + Distance sensor + Wifi card
I set up a range distance of 40cm to active the LED.
Logs show that the server can get the distance from our system.
Instead of set up the wifi card you need to install the correct driver, this is tricky, for me this one was a solution: CP210x USB to UART Bridge VCP Drivers
Link : https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers
Sometimes, a wifi card PIN must be activated to switch to OUTPUT mode.
I order to read and write data from arduino card at the sametime i need an asynchronous code.
Distance sensor HCSR04