Arduino Based ROBOT LIFEBAR

by jmorles in Circuits > Robots

681 Views, 1 Favorites, 0 Comments

Arduino Based ROBOT LIFEBAR

portadas_YOUTUBE_program_Arduino Based ROBOT LIFEBAR.jpg

Can you imagine if your combat robot had a "Life Bar"? We did a very simple experiment and shared it with you.

Materials

39d1b7c0-d842-4499-9416-ef2ffdc78195.JPG
750289-mla31034886122_062019-o-06597eee2102fb179f15638285825819-640-0.jpg
F002.jpg
  1. - Sw-18010p Vibration Sensor.
  2. - NeoPixel Stick - 8 x 5050.
  3. - Arduino Nano.
  4. -Wire.
  5. -Breadboard
  6. -USB Cable

Schematic

plano.png

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

Program

ide.png

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.

Downloads

Test

Please Check the video and Subscribe!!!