top of page
Search

Connecting Arduino and Processor - The Equalizer Game

The Equalizer is an interactive game project that was designed for a fun activity that works based on facial gestures for playing. Two pointers need to be aligned on a straight line with the gesture of opening and closing your mouth. This game would catch people‟s attention because of how the arrow movements are associated with face interactions. Anything with face detection is associated with modern technology and in today's world; it seems to be something most people want. This game is focused in a way to allow users to interact with technology in a fun way and just for the sole purpose of entertainment.




Components used for these projects are Arduino UNO, servo motors, breadboard, connecting wires. The there stages for the project that needed to be figured out at the beginning were:


  • Application to detect and track your facial gestures which routed us to Face OSC.

  • Connection of this facial application to the processing platform for sketching and confirmation of face.

  • The final part was linking processing sketch to Arduino programming.


In the game when a face gets detected it is sketched in processing through face OSC application. When the jaw of the detected face has opened the processing will send a signal to Arduino to rotate one of the servo motors two and fro by 180 degrees and the other motor will rotate when the jaw is closed. Once the pointers on the servo motors are aligned in a straight line then reset button need to be pressed to stop the motion.



Technical

Processing p5

Faceosc detects face with three different criteria of gestures, pose and raw actions. A face is detected with different values of based on the 3 parameters of your parts of the face like eye, nose, jaw, mouth, left eyes, right eye etc. Each of these values is printed and based on these values the sketching of the detected face is done. When a face is detected a certain signal statement executes and it‟s better to print the result to avoid complications. Here the result when a detected is “faces Found" and "no face" if nothing is detected. Another variable “just sent" is a binary value and can be either 1 or 0 only and by default, we have declared it to be zero. As the jaw is the variable we are looking at it varies with different faces, to different variables minJaw is declared as 100 and maxJaw to be 0. A variable f was created to be stored as “jaw” so every time the value gathered was less than minJaw, that would be the new value of minJaw, and if the value of jaw was greater than maxJaw, that would be saved as the new value of maxJaw. The difference between the values of maxJaw, minJaw is saved as the range. If the range is greater than 1 and if the value of jaw is greater than the product of 0.3 and range and if the value of justsent is 0 then “o” which indicates that the jaw is open is sent to the Arduino. If the jaw value is lesser than the product of 0.3 and range and if the value of justsent is 1 then “c” which indicated that the jaw is closed is sent to the Arduino.


Arduino

The gesture statements read by the Arduino is saved in a character “a”. When the Arduino receives „o‟ from processing, the left position servo motor (posL) which is initially declared as 0 moves from 0 to 180 degrees in steps of one degree. The left servo motor is then given a command to go to posL. And if the gesture is not o again, then it exits the loop. Similarly, when the Arduino receives „c‟ from processing the right position servo motor (posR) which is initially declared as 0 moves from 0 to 180 degrees in steps of one degree and breaks as long as the value is not c again.



4 views0 comments

Recent Posts

See All
bottom of page