position of a servo motor using this gesture sensor apds9960 when I put my hand to
the right it goes to the right and also displays it on this serial monitor go to the left it goes
to the left the angle you can set whatever you want I set it to 180 and then zero and then
back that one is close and go away so hi welcome to an Arduino step-by-step course by Robojax
this is a gesture and rgb sensor and there are many version of the board that's sold the actual
sensor is this one so do not worry about the shape or color and we are using interrupt scl and
sda these are for i2c or I square c and then vcc and ground do not worry about vl
so we are using only these four five pins which is this one with this shape this is a sensor
and it can be connected to 3.3 volts so interrupt sda scl ground and vn
I will provide you the link for the sensor so you can purchase it below this video
for the servo this is the sg90 metal gear but also you can use this larger metal gear or different
types I will provide you the length for these two below this video so you can purchase them
and here is the wiring the sensor has this wires interrupt is connected to pin two because
in Arduino uno 2 and 3 is interrupt we must use it when it detects it stops any other action cl
it is connected here and scl here cc is connected to 3.3 volts and ground is connected to ground
for the servo the orange or white whatever color you have that's the signal connected to pin nine
you can define any other pin as long as you look at this tilde symbol you can connect it to this so
you can control the servo with pulses modulation if you connect it to four it will not work
so pay attention and then the middle is five volts it is connected to five volts
and then the brown is ground it is connected in here
here is a good first we need to install the sparkfun
library apdf9960 click on sketch include library manage libraries
wait for this to complete until you can type here a pdf9960
and wait for the list to refresh and here as you can see this is sparkfun
here is the sparkfun apds9960 rgb and gesture sensor and it says install so you will see the
install button click on install wait for the word graph to complete and it's done
and here's the demonstration you will see the result on this right side of the screen
now the sensor is ready if I put my hand on the left side I’ve programmed it to go to the left
and to the right it goes to the right and also it prints it on the serial monitor in here
now you see it says none down I’ve set it to 45 degrees and this is 235. sometimes when I look
at the camera my hand is out of area so 080 now the next I have to put my hand close and go away
so that goes 180 and comes back but if I put my hand down you see that was far
so you see it says far when I hand my hand goes up it is far so it responds very well
please make sure to subscribe by clicking at the subscribe button in here thank you
thank you for watching tutorial from Robojax if you learned something and found this useful
please thumb up as this will help my video in the search algorithm of YouTube
if you have comment or question please post it at the comment section below
I try to answer and reply and don't forget to subscribe so you get updates on my upcoming videos
you