Introduction: Arduino Based ROBOT LIFEBAR
Can you imagine if your combat robot had a "Life Bar"? We did a very simple experiment and shared it with you.
Step 1: Materials
- - Sw-18010p Vibration Sensor.
- - NeoPixel Stick - 8 x 5050.
- - Arduino Nano.
- -Wire.
- -Breadboard
- -USB Cable
Step 2: Schematic
Conection:
Sw-18010p:
Vcc > 5V
GND > GND
AO > A7 of the ArduinoNano
NeoPixel Stick - 8 x 5050:
Vcc > 5V
GND > GND
DI > Pin 6 of the ArduinoNano
Step 3: Program
The premise is, that through a neopixel bar of 8 leds it induces the state of life of each robot
With a vibration sensor, calibrate it so that once struck, the total life is lowered
It takes a few seconds to boot. once it starts it turns green
the important variables
int Life = 8; //Life Total (only up to 8)
float T_impacto = 1.0; //Time in seconds between impacts
int Sense = 1000; //Impact sensitivity, the closer you get to 1023 the more sensitive it is
only the neopixel library is needed
https://github.com/adafruit/Adafruit_NeoPixel
To restart the life bar Reset is needed.
Attachments
Step 4: Test
Please Check the video and Subscribe!!!