Follow Me - Camera
The rich text element allows you to create and.
I started with installing serial library in index.html. Then installed Serial Controller which will be mediator between arduino serial port and p5js serial library.
After successfully establishing two-way communication between arduino and p5js, I wanted to use ml5js to detect my face using webcam. If my face goes off-center then wanted my camera to rotate towards face. I used servo motor for that. I mounted my webcam over servo motor. Now I have to write logic for same. If my face goes off-center then p5.js sends signal to arduino to rotate servo motor in direction of my face. Most challenging part for this was to create acknowledgement system between arduino and p5. So every time p5 sends a signal to arduino to rotate the camera, arduino should send back feedback acknowledging that that task has been executed before sending a new signal to arduino.
Detailed blog for this project is here
P5 sketch code is here