has an integrated IR LED and driver
four directional photodiodes that sense reflected IR energy from the LED
Inches Away / Slow Speed Accurate
Inches Away / Slow Speed Accurate
Inches Away / Fast Speed Accurate
Inches Away / Fast Speed Accurate
Larger Distance / Can Not Recognize
Larger Distance / Can Not Recognize
Initial Thoughts:
Moving Diagonally / Depends on the Angle
Moving Diagonally / Depends on the Angle
The gesture sensor cannot read when the movement is far. It reads accurately both when the hand is moving fast and slow within the sensor range. When the hand is moving diagonally across the sensor, it depends on the angle compared to the x-axis and y-axis. When the movement is closer to an up-to-down gesture, the serial will print out ^. Same with the left-to-right movement.
wake up the cube (stay awake for 1 minute)
(PIR senses human movement, triggers Wake Mode)
Wake Mode: white light lights up for 1s.
after waking up (evaluate every 3s between sensitive mode and peace mode)
20% Sensitive Mode( - cannot pet cube, wait until it gets to peace. If pet, Angry Mode)
80% Peace Mode( - can pet cube, cube turns to 90% Happy Mode, 10% Angry Mode)
Peace Mode: Low white light Slow breathing, motor soft breathing.
Sensitive Mode: Low white light Rapid breathing, motor soft breathing.
Pet the Cube (sensed by the Capacitive Sensor)
if the cube is in sensitive mode, 100% Angry Mode. (evaluate every 5s between angry and sensitive)
if the cube is in peace mode, 100% Happy Mode. (evaluate every 5s between happy and peace)
( after 1 minute, goes to sleep mode)
Cube goes to Asleep
No light
if pet the cube, 100% Angry Mode.
( after 1 minute, goes to sleep mode)
Mood States associate with LED fading/blinking frequency.
We tried to figure out the code first without connecting to sensors.
We replace the PIR sensor with a button (when pressing the button, the cube is awake)
Then we connect the Capacitive sensor to Arduino to track the pet action.
We check the states using a button and a Capacitive sensor. After the cube is awake, the cube will evaluate between the peace and sensitive mode.