led test
This commit is contained in:
parent
c22afeba26
commit
1f4be5f0d4
@ -12,7 +12,7 @@ const uint8_t clockPin = 11;
|
||||
// Create an object for writing to the LED strip.
|
||||
APA102<dataPin, clockPin> ledStrip;
|
||||
|
||||
const uint16_t ledCount = 56;
|
||||
const uint16_t ledCount = 28;
|
||||
const uint8_t brightness = 1;
|
||||
const rgb_color RED = rgb_color(255, 0, 0);
|
||||
const rgb_color GREEN = rgb_color(0, 255, 0);
|
||||
@ -25,7 +25,6 @@ rgb_color colors[ledCount];
|
||||
float passed = 0;
|
||||
int state = 0;
|
||||
|
||||
|
||||
void setup()
|
||||
{
|
||||
Serial.begin(115200);
|
||||
@ -39,6 +38,7 @@ void loop()
|
||||
bool change = false;
|
||||
while (count < ROUND_COUNT)
|
||||
{
|
||||
// check HALL if turned
|
||||
if (digitalRead(HALL_PIN) == LOW)
|
||||
{
|
||||
if (!change)
|
||||
@ -52,6 +52,7 @@ void loop()
|
||||
change = false;
|
||||
}
|
||||
|
||||
// calc led for last turn
|
||||
float current_diff = micros() - start;
|
||||
|
||||
for (int i = 0; i < state_count; i++)
|
||||
|
Loading…
Reference in New Issue
Block a user