Introduction: Arduino Based ROBOT LIFEBAR

About: My experience in the field of electronics led me to discover the existence of open hardware and software, in all the years that followed that discovery I just started to develop my own technologies and advise …

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

  1. - Sw-18010p Vibration Sensor.
  2. - NeoPixel Stick - 8 x 5050.
  3. - Arduino Nano.
  4. -Wire.
  5. -Breadboard
  6. -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.

Step 4: Test

Please Check the video and Subscribe!!!