putting bac the led strip library
This commit is contained in:
parent
9f86415b9a
commit
84539fecfc
@ -39,8 +39,15 @@
|
||||
#include <Button.h>
|
||||
#include <TimeTrigger.h>
|
||||
#include <ArduinoJson.h>
|
||||
#include <NeoPixelBus.h>
|
||||
#include <BluetoothSerial.h>
|
||||
#include <Adafruit_NeoPixel.h>
|
||||
//======================================================
|
||||
// OVER THE AIR PROGRAMMING
|
||||
//======================================================
|
||||
// #include <WiFi.h>
|
||||
// #include <ESPmDNS.h>
|
||||
// #include <WiFiUdp.h>
|
||||
// #include <ArduinoOTA.h>
|
||||
//======================================================
|
||||
// PUBLIC VARIABLES
|
||||
//======================================================
|
||||
@ -114,10 +121,12 @@
|
||||
//------------------------------------------------------
|
||||
// Neo Pixel LED Strip
|
||||
//------------------------------------------------------
|
||||
#define PIXEL_COUNT 21 // make sure to set this to the number of pixels in your strip
|
||||
#define PIXEL_PIN 26 // make sure to set this to the correct pin, ignored for Esp8266
|
||||
// three element pixels, in different order and speeds
|
||||
NeoPixelBus<NeoGrbFeature, Neo800KbpsMethod> PIXEL_STRIP(PIXEL_COUNT, PIXEL_PIN);
|
||||
#ifdef __AVR__
|
||||
#include <avr/power.h> // Required for 16 MHz Adafruit Trinket
|
||||
#endif
|
||||
#define PIN 6 // On Trinket or Gemma, suggest changing this to 1
|
||||
#define NUMPIXELS 16 // Number Of LED's
|
||||
Adafruit_NeoPixel pixels(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);
|
||||
//------------------------------------------------------
|
||||
// JSON Object & Memory
|
||||
//------------------------------------------------------
|
||||
@ -158,11 +167,7 @@
|
||||
POWER_SETUP;
|
||||
POWER_ON;
|
||||
|
||||
// Turn On Booster
|
||||
BOOST_SETUP;
|
||||
BOOST_OFF;
|
||||
|
||||
// Charging Status Pin
|
||||
// Charging Status Pin Setup
|
||||
STAT_SETUP;
|
||||
|
||||
// I2C Module & OLED
|
||||
@ -172,6 +177,13 @@
|
||||
OLED_CLEAR();
|
||||
OLED_SHOW();
|
||||
|
||||
// IF Charger Connected Dont Allow Any One To Play
|
||||
|
||||
|
||||
// Turn On Booster
|
||||
BOOST_SETUP;
|
||||
BOOST_ON;
|
||||
|
||||
// Start Buttons Function
|
||||
BTN_PREVIOUS.begin();
|
||||
BTN_NEXT.begin();
|
||||
|
||||
@ -1,295 +1,247 @@
|
||||
////======================================================
|
||||
//// NEO PIXEL LED STRIP
|
||||
////======================================================
|
||||
//// PUBLIC DEFINITIONS
|
||||
////------------------------------------------------------
|
||||
// #define BETWEEN_FADE 15
|
||||
// #define FADE_RATE 15
|
||||
// #define BLINK_RATE 250
|
||||
// #define ColorSaturation 128
|
||||
////------------------------------------------------------
|
||||
//// PURE COLOR
|
||||
////------------------------------------------------------
|
||||
// RgbColor red(colorSaturation, 0, 0);
|
||||
// RgbColor green(0, colorSaturation, 0);
|
||||
// RgbColor blue(0, 0, colorSaturation);
|
||||
// RgbColor white(colorSaturation);
|
||||
// RgbColor black(0);
|
||||
////------------------------------------------------------
|
||||
//// HSL COLOR
|
||||
////------------------------------------------------------
|
||||
// HslColor hslRed(red);
|
||||
// HslColor hslGreen(green);
|
||||
// HslColor hslBlue(blue);
|
||||
// HslColor hslWhite(white);
|
||||
// HslColor hslBlack(black);
|
||||
////------------------------------------------------------
|
||||
//// Clearing The LED Strip
|
||||
////------------------------------------------------------
|
||||
// void LED_CLEAR()
|
||||
// {
|
||||
// // Make Sure Boost Is On
|
||||
// BOOST_ON;
|
||||
//
|
||||
// // Clear The Strip Color
|
||||
// PIXEL_STRIP.clear();
|
||||
//
|
||||
// // Show On LED Strip
|
||||
// LED_SHOW();
|
||||
// }
|
||||
////------------------------------------------------------
|
||||
//// DISPLAY ON STRIP
|
||||
////------------------------------------------------------
|
||||
// void LED_SHOW()
|
||||
// {
|
||||
// // Make Sure Boost Is On
|
||||
// BOOST_ON;
|
||||
//
|
||||
// // Pass It To The LED Strip
|
||||
// PIXEL_STRIP.show();
|
||||
// }
|
||||
////------------------------------------------------------
|
||||
//// Set LED Brightness
|
||||
////------------------------------------------------------
|
||||
// void LED_SET_BRIGHTNESS(uint8_t Value)
|
||||
// {
|
||||
// // Make Sure Boost Is On
|
||||
// BOOST_ON;
|
||||
//
|
||||
// // Set The Brightness
|
||||
// PIXEL_STRIP.setBrightness(Value);
|
||||
// }
|
||||
////------------------------------------------------------
|
||||
//// Set LED Color
|
||||
////------------------------------------------------------
|
||||
// void LED_SET_COLOR(uint8_t R, uint8_t G, uint8_t B, uint8_t Intensity)
|
||||
// {
|
||||
// // Make Sure Boost Is On
|
||||
// BOOST_ON;
|
||||
//
|
||||
// // Set Intensity
|
||||
// LED_SET_BRIGHTNESS(Intensity);
|
||||
//
|
||||
// // Loop
|
||||
// for(int i=0; i<NUM_PIXELS; i++) {
|
||||
// PIXEL_STRIP.setPixelColor(i, PIXEL_STRIP.Color(R, G, B));
|
||||
// }
|
||||
//
|
||||
// // Show The Colors On LED Strip
|
||||
// LED_SHOW();
|
||||
// }
|
||||
////------------------------------------------------------
|
||||
//// BLINK
|
||||
////------------------------------------------------------
|
||||
// void LED_BLINK(uint8_t R, uint8_t G, uint8_t B, int Times)
|
||||
// {
|
||||
// for(int i=0; i<Times; i++)
|
||||
// {
|
||||
// LED_SET_COLOR(R, G, B, 255);
|
||||
// delay(BLINK_RATE);
|
||||
// LED_CLEAR();
|
||||
// delay(BLINK_RATE);
|
||||
// }
|
||||
// }
|
||||
////------------------------------------------------------
|
||||
//// COLOR WHIPE
|
||||
////------------------------------------------------------
|
||||
// // Fill the dots one after the other with a color
|
||||
// void LED_COLOR_WIPE(uint32_t c, uint8_t wait)
|
||||
// {
|
||||
// // Make Sure Boost Is On
|
||||
// BOOST_ON;
|
||||
//
|
||||
// // Work Loop
|
||||
// for(uint16_t i=0; i<NUM_PIXELS; i++)
|
||||
// {
|
||||
// PIXEL_STRIP.setPixelColor(i, c);
|
||||
// LED_SHOW();
|
||||
// delay(wait);
|
||||
// }
|
||||
// }
|
||||
////------------------------------------------------------
|
||||
//// END GAME LIGHTING SIGNAL
|
||||
////------------------------------------------------------
|
||||
// // Slightly different, this makes the rainbow equally distributed throughout
|
||||
// void LED_RAINBOW_CYCLE(uint8_t wait)
|
||||
// {
|
||||
// // Make Sure Boost Is On
|
||||
// BOOST_ON;
|
||||
//
|
||||
// // Loop Variables
|
||||
// uint16_t i, j;
|
||||
//
|
||||
// // The Loop
|
||||
// for(j=0; j<256*5; j++)
|
||||
// {
|
||||
// // 5 cycles of all colors on WHEEL
|
||||
// for(i=0; i< PIXEL_STRIP.numPixels(); i++)
|
||||
// {
|
||||
// PIXEL_STRIP.setPixelColor(i, LED_COLOR_WHEEL(((i * 256 / PIXEL_STRIP.numPixels()) + j) & 255));
|
||||
// }
|
||||
//
|
||||
// LED_SHOW();
|
||||
// delay(wait);
|
||||
// }
|
||||
// }
|
||||
////------------------------------------------------------
|
||||
//// END GAME LIGHTING SIGNAL
|
||||
////------------------------------------------------------
|
||||
// // Input a value 0 to 255 to get a color value.
|
||||
// // The colours are a transition r - g - b - back to r.
|
||||
// uint32_t LED_COLOR_WHEEL(byte WHEELPos)
|
||||
// {
|
||||
// // Make Sure Boost Is On
|
||||
// BOOST_ON;
|
||||
//
|
||||
// // Wheel Sequance
|
||||
// WHEELPos = 255 - WHEELPos;
|
||||
//
|
||||
// if(WHEELPos < 85)
|
||||
// {
|
||||
// return PIXEL_STRIP.Color(255 - WHEELPos * 3, 0, WHEELPos * 3);
|
||||
// }
|
||||
// if(WHEELPos < 170)
|
||||
// {
|
||||
// WHEELPos -= 85;
|
||||
// return PIXEL_STRIP.Color(0, WHEELPos * 3, 255 - WHEELPos * 3);
|
||||
// }
|
||||
// WHEELPos -= 170;
|
||||
// return PIXEL_STRIP.Color(WHEELPos * 3, 255 - WHEELPos * 3, 0);
|
||||
// }
|
||||
////------------------------------------------------------
|
||||
//// Set Color Fade In
|
||||
////------------------------------------------------------
|
||||
// void LED_FADEIN(uint8_t R, uint8_t G, uint8_t B)
|
||||
// {
|
||||
// // Make Sure Boost Is On
|
||||
// BOOST_ON;
|
||||
//
|
||||
// // Loop For Fade
|
||||
// for(int i=0; i<=255; i++)
|
||||
// {
|
||||
// PIXEL_STRIP.setBrightness(i);
|
||||
// for(int j=0; j<NUM_PIXELS; j++)
|
||||
// {
|
||||
// PIXEL_STRIP.setPixelColor(j, PIXEL_STRIP.Color(R, G, B));
|
||||
// }
|
||||
//
|
||||
// LED_SHOW();
|
||||
// delay(4);
|
||||
// }
|
||||
// }
|
||||
////------------------------------------------------------
|
||||
//// Set Color Fade Out
|
||||
////------------------------------------------------------
|
||||
// void LED_FADEOUT(uint8_t R, uint8_t G, uint8_t B)
|
||||
// {
|
||||
// // Make Sure Boost Is On
|
||||
// BOOST_ON;
|
||||
//
|
||||
// // Loop For Fade Out
|
||||
// for(int i=255; i>=0; i--)
|
||||
// {
|
||||
// PIXEL_STRIP.setBrightness(i);
|
||||
// for(int j=0; j<NUM_PIXELS; j++)
|
||||
// {
|
||||
// PIXEL_STRIP.setPixelColor(j, PIXEL_STRIP.Color(R, G, B));
|
||||
// }
|
||||
//
|
||||
// LED_SHOW();
|
||||
// delay(4);
|
||||
// }
|
||||
// }
|
||||
////------------------------------------------------------
|
||||
//// Set LED Color Cross Fade
|
||||
////------------------------------------------------------
|
||||
// void LED_CROSS_FADE(uint8_t R, uint8_t G, uint8_t B, unsigned int Times)
|
||||
// {
|
||||
// // Make Sure Boost Is On
|
||||
// BOOST_ON;
|
||||
//
|
||||
// for(int i=0; i<Times; i++)
|
||||
// {
|
||||
// LED_FADEIN(R, G, B);
|
||||
// LED_FADEOUT(R, G, B);
|
||||
// delay(BETWEEN_FADE);
|
||||
// }
|
||||
// }
|
||||
////------------------------------------------------------
|
||||
//// REACTION GAME START LED SIGNAL
|
||||
////------------------------------------------------------
|
||||
// void LED_SIGNAL_START()
|
||||
// {
|
||||
// // Cross Fade White Color To Get ready 3 Times
|
||||
// LED_CROSS_FADE(255, 255, 255, 3);
|
||||
//
|
||||
// // Set Strip Color Green
|
||||
// LED_SET_COLOR(0, 255, 0, 255);
|
||||
// }
|
||||
////------------------------------------------------------
|
||||
//// REACTION GAME END SINGNAL LED SIGNAL
|
||||
////------------------------------------------------------
|
||||
// void LED_SIGNAL_END()
|
||||
// {
|
||||
// // Blink Red Twice
|
||||
// LED_BLINK(255, 0, 0, 2);
|
||||
//
|
||||
// // Fade The Red Color To Nothing
|
||||
// LED_FADEOUT(255, 0, 0);
|
||||
// }
|
||||
////------------------------------------------------------
|
||||
//// REACTION GAME START LED CELEBRATION
|
||||
////------------------------------------------------------
|
||||
// void LED_SIGNAL_CELEBRATION()
|
||||
// {
|
||||
// // Display Rainbow Twice
|
||||
// LED_RAINBOW_CYCLE(2);
|
||||
//
|
||||
// // Grean Light OUT
|
||||
// LED_FADEOUT(0, 255, 0);
|
||||
// }
|
||||
////------------------------------------------------------
|
||||
//// REACTION GAME RESET LED SIGNAL
|
||||
////------------------------------------------------------
|
||||
// void LED_SIGNAL_RESET()
|
||||
// {
|
||||
// // Light Bright Blue
|
||||
// LED_BLINK(0, 0, 255, 2);
|
||||
//
|
||||
// // Wait For 1/4 Second
|
||||
// delay(250);
|
||||
//
|
||||
// // Fade Out The Blue
|
||||
// LED_SET_COLOR(0, 255, 0, 255);
|
||||
//
|
||||
// // Set Strip Color Green
|
||||
// LED_SET_COLOR(0, 255, 0, 255);
|
||||
// }
|
||||
////------------------------------------------------------
|
||||
//// DISPLAY BAHRAIN FLAG
|
||||
////------------------------------------------------------
|
||||
// void LED_BAHRAIN_FLAG()
|
||||
// {
|
||||
// BOOST_ON;
|
||||
// LED_SET_BRIGHTNESS(255);
|
||||
// LED_COLOR_WIPE(PIXEL_STRIP.Color(255, 255, 255), 30); // White
|
||||
// delay(250);
|
||||
// LED_COLOR_WIPE(PIXEL_STRIP.Color(255, 0, 0), 30); // Red
|
||||
// delay(250);
|
||||
// LED_FADEOUT(255, 0, 0);
|
||||
// }
|
||||
////------------------------------------------------------
|
||||
//// DISPLAY COLOMBIA FLAG
|
||||
////------------------------------------------------------
|
||||
// void LED_COLOMBIA_FLAG()
|
||||
// {
|
||||
// BOOST_ON;
|
||||
// LED_SET_BRIGHTNESS(255);
|
||||
// LED_COLOR_WIPE(PIXEL_STRIP.Color(255, 255, 0), 30); // Yellow
|
||||
// delay(250);
|
||||
// LED_COLOR_WIPE(PIXEL_STRIP.Color(0, 0, 255), 30); // Blue
|
||||
// delay(250);
|
||||
// LED_COLOR_WIPE(PIXEL_STRIP.Color(255, 0, 0), 30); // Red
|
||||
// delay(250);
|
||||
// LED_FADEOUT(255, 0, 0);
|
||||
// }
|
||||
//======================================================
|
||||
// NEO PIXEL LED STRIP
|
||||
//======================================================
|
||||
// PUBLIC DEFINITIONS
|
||||
//------------------------------------------------------
|
||||
#define BETWEEN_FADE 15
|
||||
#define FADE_RATE 15
|
||||
#define BLINK_RATE 250
|
||||
#define ColorSaturation 128
|
||||
//------------------------------------------------------
|
||||
// Clearing The LED Strip
|
||||
//------------------------------------------------------
|
||||
void LED_CLEAR()
|
||||
{
|
||||
// Clear The Strip Color
|
||||
PIXEL_STRIP.clear();
|
||||
|
||||
// Show On LED Strip
|
||||
LED_SHOW();
|
||||
}
|
||||
//------------------------------------------------------
|
||||
// DISPLAY ON STRIP
|
||||
//------------------------------------------------------
|
||||
void LED_SHOW()
|
||||
{
|
||||
// Pass It To The LED Strip
|
||||
PIXEL_STRIP.show();
|
||||
}
|
||||
//------------------------------------------------------
|
||||
// Set LED Brightness
|
||||
//------------------------------------------------------
|
||||
void LED_SET_BRIGHTNESS(uint8_t Value)
|
||||
{
|
||||
// Set The Brightness
|
||||
PIXEL_STRIP.setBrightness(Value);
|
||||
}
|
||||
//------------------------------------------------------
|
||||
// Set LED Color
|
||||
//------------------------------------------------------
|
||||
void LED_SET_COLOR(uint8_t R, uint8_t G, uint8_t B, uint8_t Intensity)
|
||||
{
|
||||
// Set Intensity
|
||||
LED_SET_BRIGHTNESS(Intensity);
|
||||
|
||||
// Loop
|
||||
for(int i=0; i<NUM_PIXELS; i++) {
|
||||
PIXEL_STRIP.setPixelColor(i, PIXEL_STRIP.Color(R, G, B));
|
||||
}
|
||||
|
||||
// Show The Colors On LED Strip
|
||||
LED_SHOW();
|
||||
}
|
||||
//------------------------------------------------------
|
||||
// BLINK
|
||||
//------------------------------------------------------
|
||||
void LED_BLINK(uint8_t R, uint8_t G, uint8_t B, int Times)
|
||||
{
|
||||
for(int i=0; i<Times; i++)
|
||||
{
|
||||
LED_SET_COLOR(R, G, B, 255);
|
||||
delay(BLINK_RATE);
|
||||
LED_CLEAR();
|
||||
delay(BLINK_RATE);
|
||||
}
|
||||
}
|
||||
//------------------------------------------------------
|
||||
// COLOR WHIPE
|
||||
//------------------------------------------------------
|
||||
// Fill the dots one after the other with a color
|
||||
void LED_COLOR_WIPE(uint32_t c, uint8_t wait)
|
||||
{
|
||||
// Work Loop
|
||||
for(uint16_t i=0; i<NUM_PIXELS; i++)
|
||||
{
|
||||
PIXEL_STRIP.setPixelColor(i, c);
|
||||
LED_SHOW();
|
||||
delay(wait);
|
||||
}
|
||||
}
|
||||
//------------------------------------------------------
|
||||
// END GAME LIGHTING SIGNAL
|
||||
//------------------------------------------------------
|
||||
// Slightly different, this makes the rainbow equally distributed throughout
|
||||
void LED_RAINBOW_CYCLE(uint8_t wait)
|
||||
{
|
||||
// Loop Variables
|
||||
uint16_t i, j;
|
||||
|
||||
// The Loop
|
||||
for(j=0; j<256*5; j++)
|
||||
{
|
||||
// 5 cycles of all colors on WHEEL
|
||||
for(i=0; i< PIXEL_STRIP.numPixels(); i++)
|
||||
{
|
||||
PIXEL_STRIP.setPixelColor(i, LED_COLOR_WHEEL(((i * 256 / PIXEL_STRIP.numPixels()) + j) & 255));
|
||||
}
|
||||
|
||||
LED_SHOW();
|
||||
delay(wait);
|
||||
}
|
||||
}
|
||||
//------------------------------------------------------
|
||||
// END GAME LIGHTING SIGNAL
|
||||
//------------------------------------------------------
|
||||
// Input a value 0 to 255 to get a color value.
|
||||
// The colours are a transition r - g - b - back to r.
|
||||
uint32_t LED_COLOR_WHEEL(byte WHEELPos)
|
||||
{
|
||||
// Wheel Sequance
|
||||
WHEELPos = 255 - WHEELPos;
|
||||
|
||||
if(WHEELPos < 85)
|
||||
{
|
||||
return PIXEL_STRIP.Color(255 - WHEELPos * 3, 0, WHEELPos * 3);
|
||||
}
|
||||
if(WHEELPos < 170)
|
||||
{
|
||||
WHEELPos -= 85;
|
||||
return PIXEL_STRIP.Color(0, WHEELPos * 3, 255 - WHEELPos * 3);
|
||||
}
|
||||
WHEELPos -= 170;
|
||||
return PIXEL_STRIP.Color(WHEELPos * 3, 255 - WHEELPos * 3, 0);
|
||||
}
|
||||
//------------------------------------------------------
|
||||
// Set Color Fade In
|
||||
//------------------------------------------------------
|
||||
void LED_FADEIN(uint8_t R, uint8_t G, uint8_t B)
|
||||
{
|
||||
// Loop For Fade
|
||||
for(int i=0; i<=255; i++)
|
||||
{
|
||||
PIXEL_STRIP.setBrightness(i);
|
||||
for(int j=0; j<NUM_PIXELS; j++)
|
||||
{
|
||||
PIXEL_STRIP.setPixelColor(j, PIXEL_STRIP.Color(R, G, B));
|
||||
}
|
||||
|
||||
LED_SHOW();
|
||||
delay(4);
|
||||
}
|
||||
}
|
||||
//------------------------------------------------------
|
||||
// Set Color Fade Out
|
||||
//------------------------------------------------------
|
||||
void LED_FADEOUT(uint8_t R, uint8_t G, uint8_t B)
|
||||
{
|
||||
// Loop For Fade Out
|
||||
for(int i=255; i>=0; i--)
|
||||
{
|
||||
PIXEL_STRIP.setBrightness(i);
|
||||
for(int j=0; j<NUM_PIXELS; j++)
|
||||
{
|
||||
PIXEL_STRIP.setPixelColor(j, PIXEL_STRIP.Color(R, G, B));
|
||||
}
|
||||
|
||||
LED_SHOW();
|
||||
delay(4);
|
||||
}
|
||||
}
|
||||
//------------------------------------------------------
|
||||
// Set LED Color Cross Fade
|
||||
//------------------------------------------------------
|
||||
void LED_CROSS_FADE(uint8_t R, uint8_t G, uint8_t B, unsigned int Times)
|
||||
{
|
||||
for(int i=0; i<Times; i++)
|
||||
{
|
||||
LED_FADEIN(R, G, B);
|
||||
LED_FADEOUT(R, G, B);
|
||||
delay(BETWEEN_FADE);
|
||||
}
|
||||
}
|
||||
//------------------------------------------------------
|
||||
// REACTION GAME START LED SIGNAL
|
||||
//------------------------------------------------------
|
||||
void LED_SIGNAL_START()
|
||||
{
|
||||
// Cross Fade White Color To Get ready 3 Times
|
||||
LED_CROSS_FADE(255, 255, 255, 3);
|
||||
|
||||
// Set Strip Color Green
|
||||
LED_SET_COLOR(0, 255, 0, 255);
|
||||
}
|
||||
//------------------------------------------------------
|
||||
// REACTION GAME END SINGNAL LED SIGNAL
|
||||
//------------------------------------------------------
|
||||
void LED_SIGNAL_END()
|
||||
{
|
||||
// Blink Red Twice
|
||||
LED_BLINK(255, 0, 0, 2);
|
||||
|
||||
// Fade The Red Color To Nothing
|
||||
LED_FADEOUT(255, 0, 0);
|
||||
}
|
||||
//------------------------------------------------------
|
||||
// REACTION GAME START LED CELEBRATION
|
||||
//------------------------------------------------------
|
||||
void LED_SIGNAL_CELEBRATION()
|
||||
{
|
||||
// Display Rainbow Twice
|
||||
LED_RAINBOW_CYCLE(2);
|
||||
|
||||
// Grean Light OUT
|
||||
LED_FADEOUT(0, 255, 0);
|
||||
}
|
||||
//------------------------------------------------------
|
||||
// REACTION GAME RESET LED SIGNAL
|
||||
//------------------------------------------------------
|
||||
void LED_SIGNAL_RESET()
|
||||
{
|
||||
// Light Bright Blue
|
||||
LED_BLINK(0, 0, 255, 2);
|
||||
|
||||
// Wait For 1/4 Second
|
||||
delay(250);
|
||||
|
||||
// Fade Out The Blue
|
||||
LED_SET_COLOR(0, 255, 0, 255);
|
||||
|
||||
// Set Strip Color Green
|
||||
LED_SET_COLOR(0, 255, 0, 255);
|
||||
}
|
||||
//------------------------------------------------------
|
||||
// DISPLAY BAHRAIN FLAG
|
||||
//------------------------------------------------------
|
||||
void LED_BAHRAIN_FLAG()
|
||||
{
|
||||
LED_SET_BRIGHTNESS(255);
|
||||
LED_COLOR_WIPE(PIXEL_STRIP.Color(255, 255, 255), 30); // White
|
||||
delay(250);
|
||||
LED_COLOR_WIPE(PIXEL_STRIP.Color(255, 0, 0), 30); // Red
|
||||
delay(250);
|
||||
LED_FADEOUT(255, 0, 0);
|
||||
}
|
||||
//------------------------------------------------------
|
||||
// DISPLAY COLOMBIA FLAG
|
||||
//------------------------------------------------------
|
||||
void LED_COLOMBIA_FLAG()
|
||||
{
|
||||
LED_SET_BRIGHTNESS(255);
|
||||
LED_COLOR_WIPE(PIXEL_STRIP.Color(255, 255, 0), 30); // Yellow
|
||||
delay(250);
|
||||
LED_COLOR_WIPE(PIXEL_STRIP.Color(0, 0, 255), 30); // Blue
|
||||
delay(250);
|
||||
LED_COLOR_WIPE(PIXEL_STRIP.Color(255, 0, 0), 30); // Red
|
||||
delay(250);
|
||||
LED_FADEOUT(255, 0, 0);
|
||||
}
|
||||
|
||||
14
README.md
14
README.md
@ -8,19 +8,19 @@ TAKEONE Kicker, Hi-tech state of the art equipment, that will encourage you to b
|
||||
Kicking target is originally used in TaeKwonDo martial arts for light training where its meant to increase your focus, timing and speed training, how ever this target was a dead piece it was just a target for striking without any intelligence. it could not tell anything about the striker not measure the capabilities.
|
||||
|
||||
## The Science Behind The Kicker
|
||||
The science behind the kicker, is the basic understanding of martial arts training terminology and converting them to algorithms. Its based on registering the strikes magnitude and register their timestamp. This will open opportunities to calculate and measure the athletes capabilities and skills, not to mention that it can keep track of their progress. with the addition of an RGB interactive element it expands the possibilities to be able to measure skills that are related to your brain activity like reflex time, decision making and much more.
|
||||
|
||||
### Key Components
|
||||
|
||||
## Key Components
|
||||
|
||||
### Strike Sensing
|
||||
##### Strike Sensing
|
||||
Strikes are sensed with vibration sensor it gives an alternating voltage when struck and the amplitude increases proportionally with the force of the strike. how ever we don't measure the force of the strike accurately, so we give it a threshold in case this threshold is crossed that is considers a valid strike.
|
||||
|
||||
### Interactive Indication
|
||||
##### Interactive Indication
|
||||
Interactive indication is important so that user could understand the signals and knows what's going on. we use addressable RGB Neo Pixel Strip, to light up the strip with different patterns to signal the user to interact with the device.
|
||||
|
||||
### Device Controller
|
||||
in order to do accurate timing and measuring of the event of the games and the capabilities of the athletes who are using the device, we need and powerful brain that's is accurate and reliable with expandable memory wireless connectivity and can run a display and manage power consumption intelligently and keep the battery in safe conditions that will expand its life span. that brain is TAKEONE Board (ESP32 Weroom)
|
||||
##### Device Controller
|
||||
in order to do accurate timing and measuring of the event of the games and the capabilities of the athletes who are using the device, we need and powerful brain that's is accurate and reliable with expandable memory wireless connectivity and can run a display and manage power consumption intelligently and keep the battery in safe conditions that will expand its life span. that brain is [TAKEONE Board (ESP32)](https://github.com/GhassanYusuf/takeone-esp32-board)
|
||||
|
||||
# Circuit Diagram
|
||||
##### Circuit Diagram
|
||||
|
||||

|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user