Strobe
#include "cubelet.h"
unsigned int last_flash_counter = 0;
{
}
{
if (block_value != 0){
if (last_flash_counter > 5+(255-block_value)) {
last_flash_counter = 0;
set_flashlight(255);
set_flashlight(0);
}
else {
last_flash_counter++;
}
}
}
uint8_t weighted_average(void)
Calculates a block value based on the on the weighted average of neighbors block values.
void setup()
Function ran just a single time. Used for setting up variables or timers.
Definition bargraph.c:3
void loop()
The loop() function gets called repeatedly while a Cubelet is powered on.
Definition bargraph.c:8
void wait(uint16_t delay)
Function to delay execution for a specified amount of time.