|
@@ -0,0 +1,99 @@
|
|
|
+void tristan()
|
|
|
+{
|
|
|
+ pixel_clear();
|
|
|
+ pixels.setPixelColor(0, pixels.Color(32,178,170));
|
|
|
+ pixels.show();
|
|
|
+ in_error=0;
|
|
|
+}
|
|
|
+
|
|
|
+void ethan()
|
|
|
+{
|
|
|
+ pixel_clear();
|
|
|
+ pixels.setPixelColor(2, pixels.Color(255,165,0)); // Moderately bright green color.
|
|
|
+ pixels.show(); // This sends the updated pixel color to the hardware.
|
|
|
+ in_error=0;
|
|
|
+}
|
|
|
+void valentin()
|
|
|
+{
|
|
|
+ pixel_clear();
|
|
|
+ pixels.setPixelColor(1, pixels.Color(255,0,255)); // Moderately bright green color.
|
|
|
+ pixels.show(); // This sends the updated pixel color to the hardware.
|
|
|
+ in_error=0;
|
|
|
+}
|
|
|
+
|
|
|
+void one()
|
|
|
+{
|
|
|
+ pixel_clear();
|
|
|
+ pixels.setPixelColor(0, pixels.Color(0,255,0)); // Moderately bright green color.
|
|
|
+ pixels.show(); // This sends the updated pixel color to the hardware.
|
|
|
+ in_error=0;
|
|
|
+}
|
|
|
+
|
|
|
+void two()
|
|
|
+{
|
|
|
+ pixel_clear();
|
|
|
+ pixels.setPixelColor(0, pixels.Color(0,255,0)); // Moderately bright green color.
|
|
|
+ pixels.setPixelColor(1, pixels.Color(0,255,0)); // Moderately bright green color.
|
|
|
+ pixels.show(); // This sends the updated pixel color to the hardware.
|
|
|
+ in_error=0;
|
|
|
+}
|
|
|
+
|
|
|
+void three()
|
|
|
+{
|
|
|
+ pixel_clear();
|
|
|
+ pixels.setPixelColor(0, pixels.Color(0,255,0)); // Moderately bright green color.
|
|
|
+ pixels.setPixelColor(1, pixels.Color(0,255,0)); // Moderately bright green color.
|
|
|
+ pixels.setPixelColor(2, pixels.Color(0,255,0)); // Moderately bright green color.
|
|
|
+ pixels.show(); // This sends the updated pixel color to the hardware.
|
|
|
+ in_error=0;
|
|
|
+}
|
|
|
+
|
|
|
+void more()
|
|
|
+{
|
|
|
+ pixel_clear();
|
|
|
+ pixels.setPixelColor(0, pixels.Color(0,0,255)); // Moderately bright green color.
|
|
|
+ pixels.setPixelColor(1, pixels.Color(0,0,255)); // Moderately bright green color.
|
|
|
+ pixels.setPixelColor(2, pixels.Color(0,0,255)); // Moderately bright green color.
|
|
|
+ pixels.show(); // This sends the updated pixel color to the hardware.
|
|
|
+ in_error=0;
|
|
|
+}
|
|
|
+
|
|
|
+void error_blink()
|
|
|
+{
|
|
|
+ if (flag == 0){
|
|
|
+ for(uint16_t i=0; i<pixels.numPixels(); i++) {
|
|
|
+ pixels.setPixelColor(i, pixels.Color(255,0,0)); // Moderately bright green color.
|
|
|
+ pixels.show();
|
|
|
+ }
|
|
|
+ flag=1 ;
|
|
|
+ delay (100);
|
|
|
+ }
|
|
|
+ if (flag == 1){
|
|
|
+ for(uint16_t i=0; i<pixels.numPixels(); i++) {
|
|
|
+ pixels.setPixelColor(i, pixels.Color(0,0,0)); // Moderately bright green color.
|
|
|
+ pixels.show();
|
|
|
+ }
|
|
|
+ flag=0 ;
|
|
|
+ delay (300);
|
|
|
+ }
|
|
|
+ error_count++;
|
|
|
+ if (error_count >= 5) {
|
|
|
+ buzzer_bip(30);
|
|
|
+ error_count=0;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+void off_()
|
|
|
+{
|
|
|
+ pixel_clear();
|
|
|
+ in_error = 0;
|
|
|
+}
|
|
|
+
|
|
|
+void pixel_clear()
|
|
|
+{
|
|
|
+ for(uint16_t i=0; i<pixels.numPixels(); i++) {
|
|
|
+ pixels.setPixelColor(i, pixels.Color(0,0,0)); // Moderately bright green color.
|
|
|
+ pixels.show(); // This sends the updated pixel color to the hardware.
|
|
|
+ }
|
|
|
+}
|
|
|
+
|