30 Days Lost in Space: Week 4
Day 23: Launch system - 12/8/2025
Today we're bringing back the 7 segment display to countdown to a lift off.
- Software:
#definemacros- a way of creating a shortcut or alias
- set a keyword equal to a specific value or string of code
- kind of like a constant that stores a single value
- modulus
% - rounding up calculated values
- elapsed time without using
delay()calls. firstPage()/nextPage()graphics loop to save memory
For the graphic memory topic, the instructor walked through the differences of pushing a smiley face drawing through HERO memory to render on the OLED screen. One method would be to push the entire smiley face drawing at once, the downside being that the entire graphic takes up a ton of memory.
The alternative approach detailed here is to split up the image into distinct parts; for example the first eye, then the second eye, then the nose, then the mouth, then the face outline. You push each of these parts through memory to render one after another, very quickly; so quickly your eye probably wouldn't pick up on it. This method takes up a lot less memory.
The U8g2lib library uses a couple of functions to make this happen: firstPage() and nextPage() in conjunction with a do...while loop:
if (timeRemaining == 0) {Serial.println("Done!!");counter_display.setSegments(DONE);lander_display.firstPage();do {byte y_offset = drawString(0, 0, "Exploration Lander");y_offset = drawString(0, y_offset, "Lift off ABORTED");y_offset = lander_display.getDisplayHeight() - (4 * lander_display.getDisplayHeight());y_offset = drawString(0, y_offset, "Thrusters: OFF");y_offset = drawString(0, y_offset, "Systems: OFF");y_offset = drawString(0, y_offset, "Confirm: OFF");drawString(0, y_offset, "Countdown ABORT");displayLander(lander_display.getDisplayWidth() - LANDER_WIDTH,lander_display.getDisplayHeight() - LANDER_HEIGHT);} while (lander_display.nextPage());while (1);}
The countdown worked pretty well up to about 30 seconds, but anything greater than that it started in really weird amounts. Asked Astrid what was up and it said to update this line:
const unsigned long COUNTDOWN_MILLISECONDS = 5 * 1000;
To the following:
const unsigned long COUNTDOWN_MILLISECONDS = 5UL * 1000UL;
Otherwise everything else was stuff that we've covered before. It's wild how complex rendering is on the OLED screen. Here's today's final code:
#include "Arduino.h"#include "Wire.h"#include <TM1637Display.h>#include <U8g2lib.h>#define numberOfMinutes(_milliseconds_) (((_milliseconds_ + 999) / 1000) / 60)#define numberOfSeconds(_milliseconds_) (((_milliseconds_ + 999) / 1000) % 60)#define COUNTER_DISPLAY_CLK_PIN 5#define COUNTER_DISPLAY_DIO_PIN 4TM1637Display counter_display(COUNTER_DISPLAY_CLK_PIN, COUNTER_DISPLAY_DIO_PIN);U8G2_SH1106_128X64_NONAME_2_HW_I2C lander_display(U8G2_R0, U8X8_PIN_NONE);const byte LANDER_HEIGHT = 25;const byte LANDER_WIDTH = 20;const uint8_t DONE[] = {SEG_B | SEG_C | SEG_D | SEG_E | SEG_G,SEG_A | SEG_B | SEG_C | SEG_D | SEG_E | SEG_F,SEG_C | SEG_E | SEG_G,SEG_A | SEG_D | SEG_E | SEG_F | SEG_G};const unsigned long COUNTDOWN_MILLISECONDS = 5UL * 1000UL;void setup() {Serial.begin(9600);counter_display.setBrightness(7);counter_display.clear();lander_display.begin();lander_display.setFont(u8g2_font_6x10_tr);lander_display.setFontRefHeightText();lander_display.setFontPosTop();lander_display.firstPage();do {byte y_offset = drawString(0, 0, "Exploration Lander");drawString(0, y_offset, "Lift off Sequence");drawString(0, lander_display.getDisplayHeight() - lander_display.getMaxCharHeight(), "Countdown Active");displayLander(lander_display.getDisplayWidth() - LANDER_WIDTH,lander_display.getDisplayHeight() - LANDER_HEIGHT);} while (lander_display.nextPage());for (int i = 0; i < 4; i++) {counter_display.clear();delay(200);displayCounter(COUNTDOWN_MILLISECONDS);delay(200);}Serial.println("Countdown started...: ");}void loop() {static unsigned long timeRemaining = COUNTDOWN_MILLISECONDS;static unsigned long countdown_start_time = millis();Serial.println(timeRemaining);displayCounter(timeRemaining);if (timeRemaining == 0) {Serial.println("Done!!");counter_display.setSegments(DONE);lander_display.firstPage();do {byte y_offset = drawString(0, 0, "Exploration Lander");y_offset = drawString(0, y_offset, "Lift off ABORTED");y_offset = lander_display.getDisplayHeight() - (4 * lander_display.getDisplayHeight());y_offset = drawString(0, y_offset, "Thrusters: OFF");y_offset = drawString(0, y_offset, "Systems: OFF");y_offset = drawString(0, y_offset, "Confirm: OFF");drawString(0, y_offset, "Countdown ABORT");displayLander(lander_display.getDisplayWidth() - LANDER_WIDTH,lander_display.getDisplayHeight() - LANDER_HEIGHT);} while (lander_display.nextPage());while (1);}unsigned long elapsed_time = millis() - countdown_start_time;if (elapsed_time < COUNTDOWN_MILLISECONDS) {timeRemaining = COUNTDOWN_MILLISECONDS - elapsed_time;} else {timeRemaining = 0;}}void displayCounter(unsigned long milliseconds) {byte minutes = numberOfMinutes(milliseconds);byte seconds = numberOfSeconds(milliseconds);counter_display.showNumberDecEx(minutes, 0b01000000, true, 2, 0);counter_display.showNumberDecEx(seconds, 0, true, 2, 2);}byte drawString(byte x, byte y, char *string) {lander_display.drawStr(x, y, string);return (y + lander_display.getMaxCharHeight());}void displayLander(byte x_location, byte y_location) {lander_display.drawFrame(x_location + 7, y_location, 6, 5);lander_display.drawFrame(x_location + 5, y_location + 4, 10, 20);lander_display.drawFrame(x_location, y_location + 6, 6, 16);lander_display.drawFrame(x_location + 14, y_location + 6, 6, 16);lander_display.drawTriangle(x_location + 2, y_location + 21,x_location, y_location + 25,x_location + 4, y_location + 25);lander_display.drawTriangle(x_location + 18, y_location + 21,x_location + 15, y_location + 25,x_location + 20, y_location + 25);}
Day 24: Back to orbit - 12/9/2025
Today's the day we finally lift off from the planet we've been crash landed on for 23 days. We reintroduce the passive buzzer and the dip switch. The three switches on the dip switch control thrusters, system, and confirmation respectively. When they all get switched on, they start the countdown to lift off. If during the countdown any of the three switches are turned off, the countdown is aborted and won't be able to be restarted until all three switches are reset. If the countdown completes, our ship lifts off until it reaches orbit, at which point we have a success message. The passive buzzer also reflects aborted or successful state along the way.
- Software:
- enum
- ternary operation
The code for today is an order of magnitude more complex than what we've seen in previous weeks. Here is the completed code:
#include "Arduino.h"#include "Wire.h"#include <TM1637Display.h>#include <U8g2lib.h>#define numberOfMinutes(_milliseconds_) (((_milliseconds_ + 999) / 1000) / 60)#define numberOfSeconds(_milliseconds_) (((_milliseconds_ + 999) / 1000) % 60)const byte COUNTER_DISPLAY_DIO_PIN = 4;const byte COUNTER_DISPLAY_CLK_PIN = 5;TM1637Display counter_display(COUNTER_DISPLAY_CLK_PIN, COUNTER_DISPLAY_DIO_PIN);const byte THRUST_LEVER_PIN = 8;const byte SYSTEMS_LEVER_PIN = 7;const byte CONFIRM_LEVER_PIN = 6;const byte BUZZER_PIN = 9;U8G2_SH1106_128X64_NONAME_2_HW_I2C lander_display(U8G2_R0, U8X8_PIN_NONE);const byte LANDER_HEIGHT = 25;const byte LANDER_WIDTH = 20;const uint8_t DONE[] = {SEG_B | SEG_C | SEG_D | SEG_E | SEG_G,SEG_A | SEG_B | SEG_C | SEG_D | SEG_E | SEG_F,SEG_C | SEG_E | SEG_G,SEG_A | SEG_D | SEG_E | SEG_F | SEG_G};const unsigned long COUNTDOWN_MILLISECONDS = 70UL * 1000UL;enum LIFTOFF_STATE {INIT,PENDING,COUNTDOWN,LIFTOFF,ABORT};void setup() {Serial.begin(9600);counter_display.setBrightness(7);counter_display.clear();lander_display.begin();lander_display.setFont(u8g2_font_6x10_tr);lander_display.setFontRefHeightText();lander_display.setFontPosTop();pinMode(THRUST_LEVER_PIN, INPUT);pinMode(SYSTEMS_LEVER_PIN, INPUT);pinMode(CONFIRM_LEVER_PIN, INPUT);lander_display.clearDisplay();}const unsigned long MIN_LOOP_TIME = 200;void loop() {static unsigned long timeRemaining = COUNTDOWN_MILLISECONDS;static unsigned long countdown_start_time;static enum LIFTOFF_STATE liftoff_state = INIT;static bool loop_toggle = true;unsigned long loop_start_time = millis();bool thrust_lever = digitalRead(THRUST_LEVER_PIN);bool systems_lever = digitalRead(SYSTEMS_LEVER_PIN);bool confirm_lever = digitalRead(CONFIRM_LEVER_PIN);updateLanderDisplay(liftoff_state, thrust_lever, systems_lever, confirm_lever);if (liftoff_state == INIT) {if (!thrust_lever && !systems_lever && !confirm_lever) {noTone(BUZZER_PIN);liftoff_state = PENDING;} else {if (loop_toggle) {tone(BUZZER_PIN, 100);} else {noTone(BUZZER_PIN);}}} else if (liftoff_state == PENDING) {if (thrust_lever && systems_lever && confirm_lever) {for (int i = 0; i < 3; i++) {counter_display.clear();delay(MIN_LOOP_TIME);displayCounter(COUNTDOWN_MILLISECONDS);delay(MIN_LOOP_TIME);}countdown_start_time = millis();liftoff_state = COUNTDOWN;}} else if (liftoff_state == COUNTDOWN) {unsigned long elapsed_time = millis() - countdown_start_time;if (elapsed_time > COUNTDOWN_MILLISECONDS) {timeRemaining = 0;liftoff_state = LIFTOFF;} else {timeRemaining = COUNTDOWN_MILLISECONDS - elapsed_time;}if (!thrust_lever || !systems_lever || !confirm_lever) {liftoff_state = ABORT;}displayCounter (timeRemaining);} else if (liftoff_state == LIFTOFF) {counter_display.setSegments(DONE);tone(BUZZER_PIN, 300);delay(200);tone(BUZZER_PIN, 500);delay(400);tone(BUZZER_PIN, 38, 5000);while (true) {updateLanderDisplay(liftoff_state, true, true, true);}} else if (liftoff_state == ABORT) {tone(BUZZER_PIN, 100, 1000);delay(5000);liftoff_state = INIT;}unsigned long loop_time = millis() - loop_start_time;if (loop_time < MIN_LOOP_TIME) {delay(MIN_LOOP_TIME - loop_time);}loop_toggle = !loop_toggle;}const byte MAX_LANDER_SPEED = 5;void updateLanderDisplay(enum LIFTOFF_STATE liftoff_state,bool thruster_lever,bool systems_lever,bool confirm_lever) {static int lander_height = lander_display.getDisplayHeight() - LANDER_HEIGHT;static byte current_lander_speed = 1;lander_display.firstPage();do {lander_display.setFontPosTop();byte y_offset = drawString(0, 0, "Exploration Lander");y_offset = drawString(0, y_offset, "Lift off Sequence");if (liftoff_state == LIFTOFF) {const char LIFTOFF_TEXT[] = "Lift off!";byte y_center = y_offset + ((lander_display.getDisplayHeight() - y_offset) / 2);lander_display.setFontPosCenter();static byte text_width = lander_display.getStrWidth(LIFTOFF_TEXT);static byte x_left = ((lander_display.getDisplayWidth() - LANDER_WIDTH) / 2) - (text_width / 2);lander_display.drawStr(x_left, y_center, LIFTOFF_TEXT);} else if (liftoff_state == ABORT) {const char ABORT_TEXT[] = "ABORTED!";byte y_center = y_offset + ((lander_display.getDisplayHeight() - y_offset) / 2);lander_display.setFontPosCenter();static byte text_width = lander_display.getStrWidth(ABORT_TEXT);static byte x_left = ((lander_display.getDisplayWidth() - LANDER_WIDTH) / 2) - (text_width / 2);lander_display.drawStr(x_left, y_center, ABORT_TEXT);} else {y_offset = lander_display.getDisplayHeight() - (4 * lander_display.getMaxCharHeight());y_offset = drawString(0, y_offset, (String("Thrusters: ") + String(thruster_lever ? "ON" : "OFF")).c_str());y_offset = drawString(0, y_offset, (String("Systems. : ") + String(systems_lever ? "ON" : "OFF")).c_str());y_offset = drawString(0, y_offset, (String("Confirm. : " ) + String(confirm_lever ? "ON" :"OFF")).c_str());y_offset = lander_display.getDisplayHeight() - lander_display.getMaxCharHeight();drawString(0, y_offset, (String("Countdown ") + liftoffStateToString(liftoff_state)).c_str());}displayLander(lander_display.getDisplayWidth() - LANDER_WIDTH, lander_height);} while (lander_display.nextPage());if (liftoff_state == LIFTOFF) {lander_height -= current_lander_speed;if (lander_height < -LANDER_HEIGHT) {lander_height = lander_display.getHeight();}if (current_lander_speed < MAX_LANDER_SPEED) {current_lander_speed += 1;}}}String liftoffStateToString(enum LIFTOFF_STATE liftoff_state) {switch (liftoff_state) {case INIT:return ("Init");break;case PENDING:return ("Pending");break;case COUNTDOWN:return ("Active");break;case LIFTOFF:return ("Complete");break;case ABORT:return ("Abort");break;}}void displayCounter(unsigned long milliseconds) {byte minutes = numberOfMinutes(milliseconds);byte seconds = numberOfSeconds(milliseconds);counter_display.showNumberDecEx(minutes, 0b01000000, true, 2, 0);counter_display.showNumberDecEx(seconds, 0, true, 2, 2);}byte drawString(byte x, byte y, char *string) {lander_display.drawStr(x, y, string);return (y + lander_display.getMaxCharHeight());}void displayLander(byte x_location, int y_location) {lander_display.drawFrame(x_location + 7, y_location, 6, 5);lander_display.drawFrame(x_location + 5, y_location + 4, 10, 20);lander_display.drawFrame(x_location, y_location + 6, 6, 16);lander_display.drawFrame(x_location + 14, y_location + 6, 6, 16);lander_display.drawTriangle(x_location + 2, y_location + 21,x_location, y_location + 25,x_location + 4, y_location + 25);lander_display.drawTriangle(x_location + 18, y_location + 21,x_location + 15, y_location + 25,x_location + 20, y_location + 25);}
The hardware circuit diagram provided also wasn't accurate for today's lesson, which contributed to some difficulty. For one thing, the input pins in the diagram didn't match the provided code inputs, but that was a minor thing to correct. The other thing was that the Hero board they used in the diagram was different from previous weeks, and had an extra 5V pin that it used. It took me a while, but I was able to use the hardware I have by leaning into the bus strips and rearranging the wires. Ironically, I think I wound up learning more this route, but I can see how this would present a struggle, and it reveals the little ways that this entire course maybe just isn't as polished as I would expect for it to be, considering it's nearly $100 at its full price. Especially this far into the course, with much harder to understand software, a lot of people in the course platform comments section expressed a ton of frustration here. Additionally, some of the comments mention that the hardware diagram uses 220k Ohm resistors for the dip switch, but they needed to use 10k Ohm resistors for it to work. I used 220k and it worked for me so I don't really know.
Anyway, I figured it out and I'm pretty proud of that. I'm still getting a weird, continuous buzzing sound from the passive buzzer, which is pretty annoying; and the dip switch is still just physically hard to use without knocking the jumper wires out of their pin sockets. Oh well. I'm probably coming off more critical than I'm intending today. This was a cool lesson!
Day 25: Creative day #5 - 12/10/2025
Create your "flag on the moon", or a project on a foreign planet - something to let others know that I was the first one to occupy this planet. Hm.
Well, you asked for it. Behold, I have created the universe's most annoying musical instrument:
#include "Arduino.h"#include <TM1637Display.h>#include <BasicEncoder.h>const byte FREQUENCY_CONTROL_CLK_PIN = 2;const byte FREQUENCY_CONTROL_DT_PIN = 3;BasicEncoder frequency_control(FREQUENCY_CONTROL_CLK_PIN, FREQUENCY_CONTROL_DT_PIN);const byte BUZZER_PIN = 10;const byte FREQUENCY_DISPLAY_CLK_PIN = 6;const byte FREQUENCY_DISPLAY_DIO_PIN = 5;TM1637Display frequency_gauge = TM1637Display(FREQUENCY_DISPLAY_CLK_PIN, FREQUENCY_DISPLAY_DIO_PIN);void setup() {Serial.begin(9600);delay(1000);frequency_gauge.setBrightness(7);attachInterrupt(digitalPinToInterrupt(FREQUENCY_CONTROL_CLK_PIN), updateEncoder, CHANGE);attachInterrupt(digitalPinToInterrupt(FREQUENCY_CONTROL_DT_PIN), updateEncoder, CHANGE);}void loop() {static int frequency = 440;if (frequency_control.get_change()) {Serial.print("Encoder Count: ");Serial.println(frequency_control.get_count());frequency += frequency_control.get_count();}if (frequency >= 880) {frequency = 880;}if (frequency <= 220) {frequency = 220;}tone(BUZZER_PIN, frequency);frequency_gauge.showNumberDec(frequency);delay(10);}void updateEncoder() {frequency_control.service();}
Day 26: HERO_AUTOPILOT.EXE (Fun with bitmaps) - 12/11/2025
Ladies and gentlemen we are floating in space. Time to try and get to the mothership. We are going to use the OLED screen to become a graphical navigation system. Cool. We need an alternative approach to displaying large graphics on the small screen though.
- Software:
- bitmaps
- hexadecimal
- forward declarations
- pointers
The OLED screen has real estate of 128x64 pixels, giving us 8,192 pixels to play with. Knowing this, we can craft bitmaps to communicate which of those pixels to activate and which to deactivate.
A bitmap is...a mapping of bits. A bit is the smallest unit of data, either a 0 or 1 corresponding to true or false, on or off, etc. We can translate that 0 or 1 into various data formats (numbers 0 to 255; binary constants ex. 0b11101101), but today we'll use hexadecimal format. You can figure out what you want to display, turn it into an array or a map of bits to represent that image, and voila, you have yourself a bitmap.
Looking at today's code, the bitmaps are very, very long. We do want to declare and define them before the setup() and loop() functions, but we don't necessarily want to clutter our code with enormous bitmaps that aren't meaningful or functional parts of our software sketch.
We can use forward declarations and pointers to define the bitmaps toward the end of the file, but still make them available at the start of our program:
// Here are our forward declarationsextern const unsigned char niceRocketBro[] U8X8_PROGMEM;extern const unsigned char planetBitmap[] U8X8_PROGMEM;extern const unsigned char earthBitmap[] U8X8_PROGMEM;extern const unsigned char inventrCorpLogoBitmap[] U8X8_PROGMEM;// Here is an array of our pointers:const static char* bitmaps[] = {niceRocketBro,planetBitmap,earthBitmap,inventrCorpLogoBitmap,};
We also ran through a tool to generate bitmap images, https://javl.github.io/image2cpp/. Pretty nifty!
Here's today's final code, including an image I created:
#include "Arduino.h"#include <U8g2lib.h>#include "Wire.h"U8G2_SH1106_128X64_NONAME_2_HW_I2C lander_display(U8G2_R0, U8X8_PIN_NONE);extern const unsigned char niceRocketBro[] U8X8_PROGMEM;extern const unsigned char planetBitmap[] U8X8_PROGMEM;extern const unsigned char earthBitmap[] U8X8_PROGMEM;extern const unsigned char inventrCorpLogoBitmap[] U8X8_PROGMEM;extern const unsigned char epd_bitmap_howdy[] U8X8_PROGMEM;const static char* bitmaps[] = {niceRocketBro,planetBitmap,earthBitmap,inventrCorpLogoBitmap,epd_bitmap_howdy,};void setup(void) {Serial.begin(9600);lander_display.begin();}void loop(void) {int number_of_bitmaps = sizeof(bitmaps) / sizeof(bitmaps[0]);for (int i = 0; i < number_of_bitmaps; i++) {lander_display.firstPage();do {lander_display.drawXBMP(0, 0, 128, 64, bitmaps[i]);} while (lander_display.nextPage());delay(2000);}}static const unsigned char niceRocketBro[] U8X8_PROGMEM = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x80, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0xc0, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0xf0, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0xd0, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc4, 0x83, 0x03, 0x00, 0x00, 0x00, 0x00,0x00, 0xf8, 0xff, 0x5f, 0x02, 0x00, 0x00, 0x00, 0x80, 0xcd, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00,0x00, 0xfc, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x80, 0xcf, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x40, 0x87, 0x63, 0xd1, 0x00, 0x00, 0x00,0x80, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x40, 0x0e, 0x33, 0xdb, 0x01, 0x00, 0x00,0xe0, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x40, 0x0e, 0xbb, 0xdf, 0x01, 0x00, 0x00,0xc0, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x40, 0x1c, 0x3b, 0x1c, 0x00, 0x00, 0x00,0x80, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x40, 0x1c, 0x3b, 0x1c, 0x00, 0x00, 0x00,0xc0, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x40, 0x18, 0x33, 0x1a, 0x00, 0x00, 0x00,0xe0, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x40, 0x18, 0x63, 0x31, 0x00, 0x00, 0x00,0xe0, 0xff, 0xfd, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0xe8, 0xff, 0xf9, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0xf8, 0xef, 0xf0, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0xe0, 0xff, 0xc0, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0xf0, 0xff, 0xe0, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0xfc, 0xff, 0xe0, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0xfc, 0xdf, 0x00, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0xff, 0xcf, 0x00, 0x7e, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0xff, 0xc3, 0x20, 0x78, 0xfc, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0xff, 0xc7, 0x80, 0x72, 0xfd, 0x11, 0x00, 0x00, 0xc0, 0x03, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00,0xff, 0xc3, 0x00, 0x30, 0xfc, 0x03, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x38, 0x00, 0x00, 0x6c,0xff, 0x03, 0x80, 0xf3, 0xfb, 0x03, 0x00, 0x00, 0x80, 0x03, 0x80, 0x03, 0x38, 0x00, 0x00, 0x60,0xff, 0x03, 0xa0, 0xf3, 0xff, 0x03, 0x00, 0x00, 0x80, 0x03, 0x80, 0x03, 0x38, 0x00, 0x00, 0x48,0xf7, 0x03, 0xe8, 0xf1, 0xff, 0x01, 0x7e, 0x16, 0x96, 0x03, 0x9a, 0x03, 0xf8, 0xb9, 0xd1, 0x00,0xd7, 0x03, 0xf8, 0xf1, 0xff, 0x03, 0x6e, 0x33, 0xb3, 0x03, 0xbb, 0x03, 0xb8, 0xb3, 0xdf, 0x01,0xff, 0x01, 0xf0, 0xf1, 0x9f, 0x09, 0x6e, 0xf3, 0xbb, 0x8b, 0xbb, 0x03, 0x38, 0xb3, 0xdd, 0x01,0xfe, 0x01, 0xf0, 0xe1, 0x9f, 0x03, 0x0e, 0xf3, 0x83, 0x9f, 0x83, 0x03, 0x38, 0x33, 0xdc, 0x01,0xfe, 0x01, 0xe0, 0xe0, 0xc7, 0x02, 0x0e, 0xf3, 0x83, 0x9f, 0x83, 0x03, 0x38, 0x33, 0xdc, 0x01,0xfe, 0x01, 0x60, 0xc0, 0xe6, 0x00, 0x0e, 0x33, 0xa3, 0xbb, 0xa3, 0x7b, 0xb8, 0x33, 0xdc, 0x01,0xfe, 0x07, 0x40, 0xe0, 0xe7, 0x02, 0x0e, 0x36, 0x97, 0x3b, 0x17, 0x63, 0xb8, 0x31, 0xd8, 0x00,0xff, 0x07, 0x00, 0xe0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00,0xff, 0x0f, 0x00, 0x20, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00,0xff, 0x07, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0xff, 0x07, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0xff, 0x03, 0x00, 0x80, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0xff, 0x01, 0x00, 0xfc, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0xbf, 0x01, 0x00, 0x78, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x83, 0x01, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x61, 0x02, 0x00, 0x00, 0x84, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0xd1, 0x00, 0x00, 0x00, 0x38, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0xfc, 0x00, 0x00, 0x00, 0x80, 0x6d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x7e, 0x01, 0x00, 0x00, 0x40, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x1f, 0x00, 0x00, 0x00, 0x00, 0xc2, 0x00, 0x00, 0xfe, 0x19, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00,0x8f, 0x00, 0x00, 0x04, 0x08, 0x04, 0x00, 0x00, 0x08, 0x01, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00,0x09, 0x00, 0x00, 0x80, 0x00, 0x20, 0x00, 0x00, 0x48, 0xdd, 0x8e, 0xf7, 0x39, 0x77, 0x03, 0x00,0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x98, 0xc9, 0x24, 0x4c, 0x44, 0x06, 0x00,0x50, 0x01, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x78, 0x98, 0x99, 0x20, 0xc4, 0x44, 0x04, 0x00,0x00, 0x00, 0x00, 0x08, 0x00, 0x02, 0x00, 0x00, 0x48, 0x99, 0x19, 0x27, 0x04, 0x44, 0x04, 0x00,0x00, 0x0c, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x08, 0x99, 0x99, 0x2c, 0x05, 0x44, 0x04, 0x00,0x00, 0x04, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x08, 0x99, 0xd9, 0x6c, 0x4d, 0x44, 0x04, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xfd, 0xbf, 0xc7, 0x38, 0xff, 0x0e, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};static const unsigned char planetBitmap[] U8X8_PROGMEM = {0x10, 0x08, 0x82, 0x20, 0x08, 0x82, 0x20, 0x08, 0x82, 0x20, 0x08, 0x82,0x20, 0x08, 0x82, 0x20, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x05, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xFF,0x1F, 0x00, 0xEA, 0x1B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0xF0, 0xFF, 0x7F, 0xA0, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0xFD, 0xEF, 0xFF,0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0xFF,0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0xFE, 0xFF, 0xFF, 0xFF, 0x7F, 0xFA, 0x01, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0xF0,0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF,0xFF, 0x0F, 0x00, 0xF8, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x80, 0xFF, 0x7F, 0xFC, 0x0F, 0x00, 0xFC, 0x01, 0x00, 0x00, 0x80,0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0x3F, 0xFC, 0x1F, 0x00, 0xFE,0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0x3F,0xF8, 0x1F, 0x80, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0xE0, 0xFF, 0x3F, 0xFC, 0x1F, 0xE0, 0x3F, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x1F, 0xFF, 0xFE, 0x3F, 0xF0, 0x0F,0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x1F, 0xFE,0xFF, 0x3F, 0xFE, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0xFC, 0x0F, 0xFE, 0xFF, 0x7F, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x1F, 0xFF, 0xFF, 0xFF, 0xFF, 0x00,0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0xBF, 0xFF,0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00,0xF0, 0xFF, 0xFF, 0xFF, 0x3F, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0xFC, 0xF7, 0xFF, 0xFF, 0x3F, 0xFE, 0x03, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xE3, 0xFF, 0xFF,0x0F, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,0xFF, 0xE0, 0xFF, 0xFF, 0x07, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,0x00, 0x00, 0x00, 0xE0, 0x3F, 0xE0, 0xFF, 0xFF, 0x83, 0x3F, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xE0, 0x0F, 0xC0, 0xFF, 0xFF,0xC0, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0,0x07, 0xC0, 0x7F, 0x0B, 0xF0, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0xF8, 0x01, 0x80, 0x7F, 0x00, 0xF8, 0x0F, 0x00, 0x00,0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0xFC, 0x00, 0x80, 0x3F, 0x00,0xFE, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7C,0x00, 0xF0, 0x7F, 0xC0, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x3C, 0x6A, 0xFF, 0xFF, 0xFF, 0xFF, 0x03, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF,0xFF, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0xFC,0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0xF8, 0xFF, 0x7F, 0xF0, 0xFF, 0x7F, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xFF, 0x01, 0xC0, 0xFF,0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x84, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x41, 0x10, 0x04, 0x41,0x10, 0x04, 0x41, 0x88};static const unsigned char earthBitmap[] U8X8_PROGMEM = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00,0x00, 0xf8, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x1f, 0x00,0x00, 0xf8, 0xff, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x07, 0x00, 0x00, 0x00, 0x00, 0xff, 0x1f, 0x00,0x00, 0xf8, 0xff, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0x1f, 0x00,0x00, 0xf8, 0xff, 0x00, 0x00, 0x00, 0xf0, 0x7f, 0xc3, 0x03, 0x00, 0x00, 0x00, 0xff, 0x1f, 0x00,0x00, 0x08, 0x02, 0x00, 0x00, 0x00, 0xfe, 0x0f, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x40, 0x10, 0x00,0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x7f, 0x07, 0xe0, 0x3f, 0x00, 0x00, 0x00, 0x41, 0x10, 0x00,0x00, 0x08, 0x02, 0x00, 0x00, 0x80, 0xbf, 0x05, 0xc0, 0xff, 0x00, 0x00, 0x00, 0xf1, 0x10, 0x00,0x00, 0xf8, 0xff, 0x00, 0x00, 0x60, 0xc2, 0x04, 0x82, 0x97, 0x01, 0x00, 0x00, 0x03, 0x18, 0x00,0x00, 0xf8, 0xff, 0x00, 0x00, 0x10, 0xe1, 0xc0, 0x40, 0x62, 0x07, 0x00, 0x00, 0x07, 0x1e, 0x00,0x00, 0xf8, 0xff, 0x00, 0x00, 0xf8, 0xfb, 0xf0, 0x0f, 0x80, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0xf8, 0xff, 0x00, 0x00, 0xbc, 0x70, 0x20, 0xbf, 0xc2, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x08, 0x00, 0x00, 0x00, 0xfe, 0x10, 0xf1, 0x0f, 0x85, 0x3f, 0x00, 0x00, 0x03, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x38, 0xe0, 0x7f, 0xdb, 0x3c, 0x00, 0x00, 0x08, 0x00, 0x00,0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x28, 0xe0, 0x7f, 0xfe, 0x61, 0x00, 0x00, 0x50, 0x00, 0x00,0x00, 0x18, 0x00, 0x00, 0x00, 0xa0, 0x15, 0x74, 0xbe, 0x5f, 0xc3, 0x00, 0x00, 0x10, 0x03, 0x00,0x00, 0x08, 0x00, 0x00, 0x00, 0x40, 0x08, 0xf8, 0x70, 0x3f, 0xe2, 0x00, 0x00, 0x90, 0x0f, 0x00,0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x81, 0x62, 0xfe, 0x57, 0xf8, 0x01, 0x00, 0xf0, 0x1f, 0x00,0x00, 0xf8, 0xff, 0x00, 0x00, 0x0c, 0x40, 0xe1, 0xbf, 0x7e, 0x78, 0x00, 0x00, 0xfc, 0x0f, 0x00,0x00, 0xf8, 0xff, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x7f, 0x7e, 0x08, 0x00, 0x00, 0xff, 0x01, 0x00,0x00, 0xf8, 0xff, 0x00, 0x00, 0x02, 0x80, 0x7f, 0xff, 0x3c, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00,0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x40, 0xff, 0xf3, 0x72, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00,0x00, 0x08, 0x00, 0x00, 0x80, 0x00, 0x00, 0x18, 0xf8, 0x63, 0x40, 0x00, 0x00, 0x01, 0x00, 0x00,0x00, 0x18, 0x00, 0x00, 0x40, 0x11, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0xf8, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x10, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x7d, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x00, 0xff, 0x1f, 0x00,0x00, 0x00, 0x40, 0x00, 0xa0, 0x4e, 0x00, 0x00, 0x20, 0x00, 0x04, 0x00, 0x00, 0xff, 0x1f, 0x00,0x00, 0xe0, 0x80, 0x00, 0x00, 0x0d, 0x00, 0x04, 0x40, 0x01, 0x00, 0x00, 0x00, 0xff, 0x1f, 0x00,0x00, 0xf0, 0xfd, 0x00, 0x00, 0x07, 0x00, 0x02, 0x40, 0x41, 0x00, 0x00, 0x00, 0x41, 0x10, 0x00,0x00, 0xf0, 0xfd, 0x00, 0x80, 0xe1, 0x01, 0x00, 0xff, 0x9c, 0x00, 0x00, 0x00, 0x40, 0x10, 0x00,0x00, 0xf8, 0xff, 0x00, 0xe0, 0xe8, 0x13, 0xc0, 0xe4, 0xb7, 0x00, 0x00, 0x00, 0x40, 0x10, 0x00,0x00, 0x08, 0x02, 0x00, 0xe0, 0xff, 0x00, 0x80, 0xc5, 0x7f, 0x00, 0x00, 0x00, 0xff, 0x1f, 0x00,0x00, 0x08, 0x02, 0x00, 0x70, 0x60, 0x00, 0x60, 0x68, 0xff, 0x02, 0x00, 0x00, 0xbf, 0x0f, 0x00,0x00, 0x08, 0x82, 0x00, 0xf0, 0x12, 0x00, 0x10, 0x70, 0x7c, 0x00, 0x00, 0x00, 0xbf, 0x0f, 0x00,0x00, 0xf8, 0xff, 0x00, 0xf8, 0x96, 0x00, 0x00, 0xb8, 0x00, 0xc0, 0x00, 0x00, 0x01, 0x07, 0x00,0x00, 0xf8, 0xff, 0x00, 0xf8, 0x09, 0x02, 0x00, 0xf0, 0x03, 0xc0, 0x00, 0x00, 0x02, 0x00, 0x00,0x00, 0xf8, 0xff, 0x00, 0xe8, 0x03, 0x40, 0x00, 0xe0, 0x51, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x08, 0x00, 0x00, 0xf0, 0x02, 0x00, 0x00, 0xf2, 0x2f, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00,0x00, 0x00, 0x00, 0x00, 0xe0, 0x03, 0x00, 0x00, 0xdc, 0xd7, 0x01, 0x00, 0x00, 0x00, 0x18, 0x00,0x00, 0x00, 0x80, 0x00, 0x60, 0x01, 0x00, 0x00, 0xeb, 0x32, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00,0x00, 0x00, 0xf0, 0x00, 0xc0, 0x02, 0x00, 0x00, 0x5e, 0x78, 0x20, 0x00, 0x00, 0x00, 0x10, 0x00,0x00, 0x00, 0xfc, 0x00, 0xf0, 0x00, 0x80, 0xc0, 0x88, 0x49, 0x00, 0x00, 0x00, 0xff, 0x1f, 0x00,0x00, 0x80, 0xff, 0x00, 0x60, 0x00, 0xc0, 0x00, 0x0c, 0xf1, 0x00, 0x00, 0x00, 0xff, 0x1f, 0x00,0x00, 0xf0, 0x3f, 0x00, 0x60, 0x02, 0x81, 0xfc, 0x0a, 0x0e, 0x00, 0x01, 0x00, 0xff, 0x1f, 0x00,0x00, 0xf8, 0x0f, 0x00, 0x40, 0x6e, 0x61, 0xc0, 0x10, 0x08, 0xa8, 0x01, 0x00, 0x00, 0x10, 0x00,0x00, 0xf0, 0x09, 0x00, 0xc0, 0xe8, 0x3f, 0x05, 0x01, 0x44, 0xe0, 0x00, 0x00, 0x00, 0x10, 0x00,0x00, 0xc0, 0x08, 0x00, 0xc0, 0x00, 0xff, 0x02, 0x00, 0x40, 0x02, 0x00, 0x00, 0x00, 0x18, 0x00,0x00, 0x00, 0x0a, 0x00, 0x80, 0x01, 0xfe, 0x05, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00, 0x1e, 0x00,0x00, 0x00, 0x10, 0x00, 0x00, 0x41, 0x7c, 0x02, 0x82, 0x02, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0xc0, 0x00, 0x00, 0x02, 0xd8, 0x00, 0x07, 0x82, 0x1f, 0x00, 0x00, 0x00, 0x10, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x40, 0x49, 0x1e, 0x8a, 0x07, 0x00, 0x00, 0xff, 0x1f, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x01, 0x70, 0x49, 0x1e, 0x10, 0x00, 0x00, 0xff, 0x1f, 0x00,0x00, 0x78, 0xe0, 0x00, 0x00, 0x20, 0xc4, 0xc5, 0x0f, 0x0f, 0x0f, 0x00, 0x00, 0xff, 0x1f, 0x00,0x00, 0x18, 0xc0, 0x00, 0x00, 0xc0, 0x03, 0xec, 0x5f, 0x5d, 0x00, 0x00, 0x00, 0xff, 0x1f, 0x00,0x00, 0x08, 0x8f, 0x00, 0x00, 0x00, 0xff, 0xfe, 0xff, 0xb7, 0x01, 0x00, 0x00, 0x40, 0x10, 0x00,0x00, 0x08, 0x82, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xf7, 0xff, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00,0x00, 0x08, 0x02, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xf7, 0x3f, 0x00, 0x00, 0x00, 0x40, 0x10, 0x00,0x00, 0xf8, 0xff, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xf1, 0x0f, 0x00, 0x00, 0x00, 0xff, 0x1f, 0x00,0x00, 0xf8, 0xff, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xf3, 0x00, 0x00, 0x00, 0x00, 0xff, 0x1f, 0x00,0x00, 0xf8, 0xff, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x4e, 0x00, 0x00, 0x00, 0x00, 0xff, 0x1f, 0x00,0x00, 0xf8, 0xff, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x07, 0x00, 0x00, 0x00, 0x00, 0xff, 0x1f, 0x00,0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};static const unsigned char inventrCorpLogoBitmap[] U8X8_PROGMEM = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0xf0, 0x01, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x01, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x07, 0x00, 0x00, 0x00, 0x00, 0xf8,0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x07, 0x00,0x00, 0x00, 0x00, 0xfc, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0xff, 0x0f, 0x00, 0x00, 0x07, 0x00, 0xfe, 0x3f, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x0f, 0x00, 0xc0, 0x1f, 0x00, 0xfe,0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x0f, 0x00,0xe0, 0x3f, 0x00, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0xe0, 0xff, 0x0f, 0x00, 0xf0, 0x7f, 0x00, 0xfe, 0xff, 0x03, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x0f, 0x00, 0xf0, 0x7f, 0x00, 0xfe,0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x07, 0x00,0xf0, 0x7f, 0x00, 0xfc, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0xfc, 0xff, 0x07, 0x00, 0xf8, 0x7f, 0x00, 0xfc, 0xff, 0x7f, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x03, 0x00, 0xf8, 0x7f, 0x38, 0xf0,0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x01, 0x00,0xfc, 0x7f, 0x78, 0xe0, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x80,0xff, 0xff, 0x00, 0x00, 0xfc, 0x3f, 0xfc, 0xc1, 0xff, 0xff, 0x07, 0x00,0x00, 0x00, 0x00, 0xc0, 0xff, 0x7f, 0x00, 0x00, 0xfe, 0x3f, 0xfc, 0x03,0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x1f, 0x00, 0x03,0xfe, 0x1f, 0xfe, 0x0f, 0xfe, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xf0,0xff, 0x0f, 0x80, 0x03, 0xfe, 0x1f, 0xfe, 0x1f, 0xf8, 0xff, 0x7f, 0x00,0x00, 0x00, 0x00, 0xf8, 0xff, 0x07, 0x8c, 0x03, 0xff, 0x1f, 0xff, 0x7f,0xf0, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0xfc, 0xff, 0x07, 0x1f, 0x00,0xff, 0x0f, 0xff, 0xff, 0xc0, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0xfe,0xff, 0x03, 0x1f, 0x80, 0xff, 0x8f, 0xff, 0xff, 0x83, 0xff, 0xff, 0x03,0x00, 0x00, 0x00, 0xff, 0xff, 0x01, 0x1f, 0x80, 0xff, 0x87, 0xff, 0xff,0x07, 0xfe, 0xff, 0x07, 0x00, 0x00, 0x80, 0xff, 0xff, 0x00, 0x1e, 0xc0,0xff, 0x87, 0xff, 0xff, 0x1f, 0xfc, 0xff, 0x07, 0x00, 0x00, 0xc0, 0xff,0x7f, 0x38, 0xc0, 0xc0, 0xff, 0xc3, 0xff, 0xff, 0x3f, 0xf0, 0xff, 0x07,0x00, 0x00, 0xe0, 0xff, 0x3f, 0xfc, 0xc0, 0xc0, 0xff, 0xc3, 0xff, 0xff,0x7f, 0xf8, 0xff, 0x03, 0x00, 0x00, 0xf0, 0xff, 0x1f, 0xfe, 0x01, 0xe0,0xff, 0xe3, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0x03, 0x00, 0x00, 0xf0, 0xff,0x0f, 0xff, 0x03, 0xe0, 0xff, 0xe1, 0xff, 0xf3, 0x1f, 0xfe, 0xff, 0x01,0x00, 0x00, 0xfc, 0xff, 0x87, 0xff, 0x03, 0xf0, 0xff, 0xf1, 0xc3, 0xe3,0x0f, 0xff, 0xff, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xc3, 0xff, 0x07, 0xf0,0xff, 0xf0, 0xc1, 0xe3, 0x87, 0xff, 0x7f, 0x00, 0x00, 0x00, 0xff, 0xff,0xe1, 0xe7, 0x0f, 0xf8, 0xff, 0xf8, 0xc1, 0xf3, 0xc3, 0xff, 0x3f, 0x00,0x00, 0x80, 0xff, 0xff, 0xf0, 0xe7, 0xff, 0xf8, 0x7f, 0xf8, 0xe3, 0xff,0xe1, 0xff, 0x1f, 0x00, 0x00, 0xc0, 0xff, 0x7f, 0xf8, 0xff, 0x7f, 0xfc,0x7f, 0xfc, 0xff, 0xff, 0xf0, 0xff, 0x0f, 0x00, 0x00, 0xe0, 0xff, 0x3f,0xfc, 0xff, 0x7f, 0xfc, 0x7f, 0xfc, 0xff, 0x7f, 0xf8, 0xff, 0x07, 0x00,0x00, 0xf0, 0xff, 0x1f, 0xfe, 0xff, 0x3f, 0xfc, 0x3f, 0xfc, 0xff, 0x3f,0xfc, 0xff, 0x03, 0x00, 0x00, 0xf8, 0xff, 0x0f, 0xff, 0xcf, 0x3f, 0xfe,0x3f, 0xfe, 0xff, 0x1f, 0xfe, 0xff, 0x01, 0x00, 0x00, 0xf8, 0xff, 0x87,0xff, 0x87, 0x1f, 0xfe, 0x1f, 0xfa, 0xcf, 0x0f, 0xff, 0xff, 0x00, 0x00,0x00, 0xfc, 0xff, 0xc3, 0x8f, 0x87, 0x1f, 0xff, 0x1f, 0xe0, 0xcf, 0x87,0xff, 0x7f, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xe1, 0x87, 0x87, 0x1f, 0xff,0x0f, 0xc0, 0xff, 0xc3, 0xff, 0x3f, 0x00, 0x00, 0x80, 0xff, 0xff, 0xf0,0x8f, 0xcf, 0x8f, 0xff, 0x0f, 0x80, 0xff, 0xe1, 0xff, 0x1f, 0x00, 0x00,0x80, 0xff, 0x7f, 0xf8, 0xff, 0xff, 0x8f, 0xff, 0x07, 0x80, 0xff, 0xf0,0xff, 0x0f, 0x00, 0x00, 0xc0, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0xc7, 0xff,0x07, 0x02, 0x7f, 0xf8, 0xff, 0x07, 0x00, 0x00, 0xc0, 0xff, 0x1f, 0xfe,0xff, 0xff, 0xc7, 0xff, 0x07, 0x07, 0x3e, 0xfc, 0xff, 0x03, 0x00, 0x00,0xc0, 0xff, 0x3f, 0xf8, 0xff, 0xff, 0xc3, 0xff, 0x03, 0x72, 0x00, 0xfe,0xff, 0x01, 0x00, 0x00, 0xc0, 0xff, 0x7f, 0xf0, 0xff, 0xff, 0xe3, 0xff,0x03, 0xf0, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xc1,0xff, 0xff, 0xe1, 0xff, 0x01, 0xf8, 0x81, 0xff, 0x7f, 0x00, 0x00, 0x00,0x80, 0xff, 0xff, 0x83, 0xff, 0xff, 0xf1, 0xff, 0x01, 0xf8, 0xc0, 0xff,0x3f, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0x0f, 0xfe, 0xff, 0xf0, 0xff,0x80, 0xf1, 0xe0, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x1f,0xfc, 0xff, 0xf0, 0xff, 0xc0, 0x01, 0xf0, 0xff, 0x1f, 0x00, 0x00, 0x00,0x00, 0xfc, 0xff, 0x3f, 0xf0, 0x7f, 0xf8, 0xff, 0xc0, 0x01, 0xf8, 0xff,0x07, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, 0xc0, 0x7f, 0xf8, 0x7f,0x00, 0x00, 0xfc, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff,0x81, 0x7f, 0xfc, 0x7f, 0x00, 0x00, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00,0x00, 0xc0, 0xff, 0xff, 0x07, 0x3e, 0xfc, 0x3f, 0x00, 0x00, 0xff, 0xff,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x0f, 0x3c, 0xfe, 0x3f,0x00, 0x80, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff,0x3f, 0x18, 0xfe, 0x1f, 0x00, 0xc0, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0xf8, 0xff, 0x7f, 0x00, 0xff, 0x1f, 0x00, 0xe0, 0xff, 0x3f,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x7f, 0x00, 0xff, 0x1f,0x00, 0xe0, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff,0x7f, 0x00, 0xff, 0x0f, 0x00, 0xf0, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x80, 0xff, 0xff, 0x00, 0xff, 0x0f, 0x00, 0xf0, 0xff, 0x07,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x7f, 0x00, 0xff, 0x07,0x00, 0xf0, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc,0x7f, 0x00, 0xfe, 0x07, 0x00, 0xe0, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0xf0, 0x7f, 0x00, 0xfc, 0x03, 0x00, 0xe0, 0x7f, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x3f, 0x00, 0xf8, 0x00,0x00, 0xc0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,0x1f, 0x00, 0x00, 0x00, 0x00, 0x80, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00,0x00, 0x00, 0x00, 0x00};static const unsigned char epd_bitmap_howdy[] PROGMEM = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0xff, 0x5f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0xff, 0xbf, 0xef, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0xff, 0xdf, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc5, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0xff, 0xef, 0x9b, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0xff, 0x81, 0xbb, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xbf, 0xff, 0xff, 0xff, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xdf, 0xff, 0xff, 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xef, 0xff, 0xff, 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xdf, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xeb, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xd3, 0xff, 0x0f, 0xec, 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xfb, 0xff, 0xef, 0xed, 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xb9, 0xed, 0xae, 0xed, 0x7c, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xba, 0xfd, 0x3a, 0x77, 0xbd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xbf, 0x7d, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xef, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0x7f, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0xbf, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0xdf, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0xef, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0xef, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0xef, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0x6f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xe7, 0xff, 0xff, 0x9f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xf5, 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xae, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xee, 0xf3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0x3f, 0xc5, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0x9d, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0x19, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
Day 27: HERO_AUTOPILOT.EXE part 2 - 12/12/2025
We construct a 3-bit binary counter using the dip switch. Each switch will represent one bit, with 8 potential combinations. We'll display a distinct bitmap on the OLED screen for each of these permutations, as well as display a number, 0-7, for each permutation on the 7 segment display. As such, we are bringing back the dip switch and the 7 segment display.
- Software:
- partial bitmaps: a bitmap that occupies only a small portion of the OLED screen
- switches to binary
- creating include files: we do some further cleanup on our file by separating the bitmaps into a
switch_bitmaps.hfile that we include
To create the switch value, instead of doing a lengthy if / else or switch statement, we do the following:
byte switch_value = digitalRead(SWITCH_BIT_0_PIN) == HIGH ? 1 : 0;switch_value |= (digitalRead(SWITCH_BIT_1_PIN) == HIGH ? 1 : 0) << 1;switch_value |= (digitalRead(SWITCH_BIT_2_PIN) == HIGH ? 1 : 0) << 2;
Here's the value with everything off:
switch_value = 0b00000000
If the first switch is on then it is:
switch_value = 0b00000001
If the second switch is on then it is:
switch_value = 0b00000010
If the second switch is on then it is:
switch_value = 0b00000100
The bitwise shifting << just shifts that value by the specified number of places.
Final code for today:
// primary file#include "Arduino.h"#include <U8g2lib.h>#include "Wire.h"U8G2_SH1106_128X64_NONAME_2_HW_I2C lander_display(U8G2_R0, U8X8_PIN_NONE);#include "switch_bitmaps.h"const static char* SWITCH_BITMAPS[] = {SWITCHES_ZERO,SWITCHES_ONE,SWITCHES_TWO,SWITCHES_THREE,SWITCHES_FOUR,SWITCHES_FIVE,SWITCHES_SIX,SWITCHES_SEVEN,};#include <TM1637Display.h>const byte BITMAP_NUMBER_DISPLAY_DIO_PIN = 2;const byte BITMAP_NUMBER_DISPLAY_CLK_PIN = 3;TM1637Display bitmap_number_display(BITMAP_NUMBER_DISPLAY_CLK_PIN, BITMAP_NUMBER_DISPLAY_DIO_PIN);const byte SWITCH_BIT_0_PIN = A2;const byte SWITCH_BIT_1_PIN = A1;const byte SWITCH_BIT_2_PIN = A0;void setup(void) {Serial.begin(9600);bitmap_number_display.setBrightness(7);bitmap_number_display.clear();pinMode(SWITCH_BIT_0_PIN, INPUT);pinMode(SWITCH_BIT_1_PIN, INPUT);pinMode(SWITCH_BIT_2_PIN, INPUT);lander_display.begin();}void loop(void) {byte x_offset = (lander_display.getDisplayWidth() - BITMAP_WIDTH) / 2;byte y_offset = (lander_display.getDisplayHeight() - BITMAP_HEIGHT) / 2;byte switch_value = digitalRead(SWITCH_BIT_0_PIN) == HIGH ? 1 : 0;switch_value |= (digitalRead(SWITCH_BIT_1_PIN) == HIGH ? 1 : 0) << 1;switch_value |= (digitalRead(SWITCH_BIT_2_PIN) == HIGH ? 1 : 0) << 2;bitmap_number_display.showNumberDecEx(switch_value);lander_display.firstPage();do {lander_display.drawXBMP(x_offset, y_offset, BITMAP_WIDTH, BITMAP_HEIGHT, SWITCH_BITMAPS[switch_value]);} while (lander_display.nextPage());delay(100);}
// switch_bitmaps.hconst byte BITMAP_WIDTH = 71;const byte BITMAP_HEIGHT = 64;const unsigned char SWITCHES_ZERO [] PROGMEM = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff,0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f,0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0x01, 0xf8, 0x3f, 0x00, 0xfe, 0x0f, 0xc0, 0x7f, 0xff,0x01, 0xf8, 0x3f, 0x00, 0xfe, 0x0f, 0xc0, 0x7f, 0xff, 0x01, 0xf8, 0x3f, 0x00, 0xfe, 0x0f, 0xc0,0x7f, 0xff, 0x01, 0xf8, 0x3f, 0x00, 0xfe, 0x0f, 0xc0, 0x7f, 0xff, 0x01, 0xf8, 0x3f, 0x00, 0xfe,0x0f, 0xc0, 0x7f, 0xff, 0x01, 0xf8, 0x3f, 0x00, 0xfe, 0x0f, 0xc0, 0x7f, 0xff, 0x01, 0xf8, 0x3f,0x00, 0xfe, 0x0f, 0xc0, 0x7f, 0xff, 0x01, 0xf8, 0x3f, 0x00, 0xfe, 0x0f, 0xc0, 0x7f, 0xff, 0x01,0xf8, 0x3f, 0x00, 0xfe, 0x0f, 0xc0, 0x7f, 0xff, 0x01, 0xf8, 0x3f, 0x00, 0xfe, 0x0f, 0xc0, 0x7f,0xff, 0xf1, 0xf8, 0x3f, 0x1c, 0xfe, 0x8f, 0xc7, 0x7f, 0xff, 0xf1, 0xf8, 0x3f, 0x1c, 0xfe, 0x8f,0xc7, 0x7f, 0xff, 0xf1, 0xf8, 0x3f, 0x1c, 0xfe, 0x8f, 0xc7, 0x7f, 0xff, 0xf1, 0xf8, 0x3f, 0x1c,0xfe, 0x8f, 0xc7, 0x7f, 0xff, 0xf1, 0xf8, 0x3f, 0x1c, 0xfe, 0x8f, 0xc7, 0x7f, 0xff, 0xf1, 0xf8,0x3f, 0x1c, 0xfe, 0x8f, 0xc7, 0x7f, 0xff, 0xf1, 0xf8, 0x3f, 0x1c, 0xfe, 0x8f, 0xc7, 0x7f, 0xff,0xf1, 0xf8, 0x3f, 0x1c, 0xfe, 0x8f, 0xc7, 0x7f, 0xff, 0xf1, 0xf8, 0x3f, 0x1c, 0xfe, 0x8f, 0xc7,0x7f, 0xff, 0xf1, 0xf8, 0x3f, 0x1c, 0xfe, 0x8f, 0xc7, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f,0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0x3f, 0x00, 0xf0, 0x00, 0x00, 0x1c, 0x00, 0x80, 0x07, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x1c,0x00, 0x80, 0x07, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x1c, 0x00, 0x80, 0x07, 0x00, 0x00, 0xf0, 0x00,0x00, 0x1c, 0x00, 0x80, 0x07, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x1c, 0x00, 0x80, 0x07, 0x00, 0x00,0xf8, 0x00, 0x00, 0x3e, 0x00, 0x80, 0x0f, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x7f, 0x00, 0xc0, 0x1f,0x00, 0x00, 0xfe, 0x03, 0x80, 0xff, 0x00, 0xe0, 0x3f, 0x00, 0x00, 0xfe, 0x03, 0x80, 0xff, 0x00,0xe0, 0x3f, 0x00, 0x00, 0xfe, 0x03, 0x80, 0xff, 0x00, 0xe0, 0x3f, 0x00, 0x00, 0xfe, 0x03, 0x80,0xff, 0x00, 0xe0, 0x3f, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x7f, 0x00, 0xc0, 0x1f, 0x00, 0x00, 0xf8,0x01, 0x00, 0x7e, 0x00, 0xc0, 0x0f, 0x00, 0x00, 0x60, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x03, 0x00};const unsigned char SWITCHES_ONE [] PROGMEM = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0,0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0xe0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x3f, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0xe0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x3f, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x0f,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0xfe, 0xff,0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f,0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0x01, 0xf8, 0x3f, 0x00, 0xfe, 0x8f, 0xc7, 0x7f, 0xff,0x01, 0xf8, 0x3f, 0x00, 0xfe, 0x8f, 0xc7, 0x7f, 0xff, 0x01, 0xf8, 0x3f, 0x00, 0xfe, 0x8f, 0xc7,0x7f, 0xff, 0x01, 0xf8, 0x3f, 0x00, 0xfe, 0x8f, 0xc7, 0x7f, 0xff, 0x01, 0xf8, 0x3f, 0x00, 0xfe,0x8f, 0xc7, 0x7f, 0xff, 0x01, 0xf8, 0x3f, 0x00, 0xfe, 0x8f, 0xc7, 0x7f, 0xff, 0x01, 0xf8, 0x3f,0x00, 0xfe, 0x8f, 0xc7, 0x7f, 0xff, 0x01, 0xf8, 0x3f, 0x00, 0xfe, 0x8f, 0xc7, 0x7f, 0xff, 0x01,0xf8, 0x3f, 0x00, 0xfe, 0x8f, 0xc7, 0x7f, 0xff, 0x01, 0xf8, 0x3f, 0x00, 0xfe, 0x8f, 0xc7, 0x7f,0xff, 0xf1, 0xf8, 0x3f, 0x1c, 0xfe, 0x0f, 0xc0, 0x7f, 0xff, 0xf1, 0xf8, 0x3f, 0x1c, 0xfe, 0x0f,0xc0, 0x7f, 0xff, 0xf1, 0xf8, 0x3f, 0x1c, 0xfe, 0x0f, 0xc0, 0x7f, 0xff, 0xf1, 0xf8, 0x3f, 0x1c,0xfe, 0x0f, 0xc0, 0x7f, 0xff, 0xf1, 0xf8, 0x3f, 0x1c, 0xfe, 0x0f, 0xc0, 0x7f, 0xff, 0xf1, 0xf8,0x3f, 0x1c, 0xfe, 0x0f, 0xc0, 0x7f, 0xff, 0xf1, 0xf8, 0x3f, 0x1c, 0xfe, 0x0f, 0xc0, 0x7f, 0xff,0xf1, 0xf8, 0x3f, 0x1c, 0xfe, 0x0f, 0xc0, 0x7f, 0xff, 0xf1, 0xf8, 0x3f, 0x1c, 0xfe, 0x0f, 0xc0,0x7f, 0xff, 0xf1, 0xf8, 0x3f, 0x1c, 0xfe, 0x0f, 0xc0, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f,0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0x3f, 0x00, 0xf0, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x1c,0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00,0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00,0xf8, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x7f, 0x00, 0x00, 0x00,0x00, 0x00, 0xfe, 0x03, 0x80, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x03, 0x80, 0xff, 0x00,0x00, 0x00, 0x00, 0x00, 0xfe, 0x03, 0x80, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x03, 0x80,0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8,0x01, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00};const unsigned char SWITCHES_TWO [] PROGMEM = {0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x80, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff,0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f,0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0x01, 0xf8, 0x3f, 0x1c, 0xfe, 0x0f, 0xc0, 0x7f, 0xff,0x01, 0xf8, 0x3f, 0x1c, 0xfe, 0x0f, 0xc0, 0x7f, 0xff, 0x01, 0xf8, 0x3f, 0x1c, 0xfe, 0x0f, 0xc0,0x7f, 0xff, 0x01, 0xf8, 0x3f, 0x1c, 0xfe, 0x0f, 0xc0, 0x7f, 0xff, 0x01, 0xf8, 0x3f, 0x1c, 0xfe,0x0f, 0xc0, 0x7f, 0xff, 0x01, 0xf8, 0x3f, 0x1c, 0xfe, 0x0f, 0xc0, 0x7f, 0xff, 0x01, 0xf8, 0x3f,0x1c, 0xfe, 0x0f, 0xc0, 0x7f, 0xff, 0x01, 0xf8, 0x3f, 0x1c, 0xfe, 0x0f, 0xc0, 0x7f, 0xff, 0x01,0xf8, 0x3f, 0x1c, 0xfe, 0x0f, 0xc0, 0x7f, 0xff, 0x01, 0xf8, 0x3f, 0x1c, 0xfe, 0x0f, 0xc0, 0x7f,0xff, 0xf1, 0xf8, 0x3f, 0x00, 0xfe, 0x8f, 0xc7, 0x7f, 0xff, 0xf1, 0xf8, 0x3f, 0x00, 0xfe, 0x8f,0xc7, 0x7f, 0xff, 0xf1, 0xf8, 0x3f, 0x00, 0xfe, 0x8f, 0xc7, 0x7f, 0xff, 0xf1, 0xf8, 0x3f, 0x00,0xfe, 0x8f, 0xc7, 0x7f, 0xff, 0xf1, 0xf8, 0x3f, 0x00, 0xfe, 0x8f, 0xc7, 0x7f, 0xff, 0xf1, 0xf8,0x3f, 0x00, 0xfe, 0x8f, 0xc7, 0x7f, 0xff, 0xf1, 0xf8, 0x3f, 0x00, 0xfe, 0x8f, 0xc7, 0x7f, 0xff,0xf1, 0xf8, 0x3f, 0x00, 0xfe, 0x8f, 0xc7, 0x7f, 0xff, 0xf1, 0xf8, 0x3f, 0x00, 0xfe, 0x8f, 0xc7,0x7f, 0xff, 0xf1, 0xf8, 0x3f, 0x00, 0xfe, 0x8f, 0xc7, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f,0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0x3f, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00,0x00, 0x80, 0x07, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0xf0, 0x00,0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00,0xf8, 0x00, 0x00, 0x00, 0x00, 0x80, 0x0f, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x00, 0xc0, 0x1f,0x00, 0x00, 0xfe, 0x03, 0x00, 0x00, 0x00, 0xe0, 0x3f, 0x00, 0x00, 0xfe, 0x03, 0x00, 0x00, 0x00,0xe0, 0x3f, 0x00, 0x00, 0xfe, 0x03, 0x00, 0x00, 0x00, 0xe0, 0x3f, 0x00, 0x00, 0xfe, 0x03, 0x00,0x00, 0x00, 0xe0, 0x3f, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x00, 0xc0, 0x1f, 0x00, 0x00, 0xf8,0x01, 0x00, 0x00, 0x00, 0xc0, 0x0f, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00};const unsigned char SWITCHES_THREE [] PROGMEM = {0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x00, 0xc0,0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x00, 0xe0, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff,0x00, 0xe0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x00, 0xe0, 0x3f, 0x00, 0x00, 0x00, 0x00,0x80, 0xff, 0x00, 0xe0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x00, 0xe0, 0x3f, 0x00, 0x00,0x00, 0x00, 0x00, 0x7f, 0x00, 0xc0, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x80, 0x0f,0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00,0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,0x1c, 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x80, 0x07, 0x00, 0xfe, 0xff,0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f,0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0x01, 0xf8, 0x3f, 0x1c, 0xfe, 0x8f, 0xc7, 0x7f, 0xff,0x01, 0xf8, 0x3f, 0x1c, 0xfe, 0x8f, 0xc7, 0x7f, 0xff, 0x01, 0xf8, 0x3f, 0x1c, 0xfe, 0x8f, 0xc7,0x7f, 0xff, 0x01, 0xf8, 0x3f, 0x1c, 0xfe, 0x8f, 0xc7, 0x7f, 0xff, 0x01, 0xf8, 0x3f, 0x1c, 0xfe,0x8f, 0xc7, 0x7f, 0xff, 0x01, 0xf8, 0x3f, 0x1c, 0xfe, 0x8f, 0xc7, 0x7f, 0xff, 0x01, 0xf8, 0x3f,0x1c, 0xfe, 0x8f, 0xc7, 0x7f, 0xff, 0x01, 0xf8, 0x3f, 0x1c, 0xfe, 0x8f, 0xc7, 0x7f, 0xff, 0x01,0xf8, 0x3f, 0x1c, 0xfe, 0x8f, 0xc7, 0x7f, 0xff, 0x01, 0xf8, 0x3f, 0x1c, 0xfe, 0x8f, 0xc7, 0x7f,0xff, 0xf1, 0xf8, 0x3f, 0x00, 0xfe, 0x0f, 0xc0, 0x7f, 0xff, 0xf1, 0xf8, 0x3f, 0x00, 0xfe, 0x0f,0xc0, 0x7f, 0xff, 0xf1, 0xf8, 0x3f, 0x00, 0xfe, 0x0f, 0xc0, 0x7f, 0xff, 0xf1, 0xf8, 0x3f, 0x00,0xfe, 0x0f, 0xc0, 0x7f, 0xff, 0xf1, 0xf8, 0x3f, 0x00, 0xfe, 0x0f, 0xc0, 0x7f, 0xff, 0xf1, 0xf8,0x3f, 0x00, 0xfe, 0x0f, 0xc0, 0x7f, 0xff, 0xf1, 0xf8, 0x3f, 0x00, 0xfe, 0x0f, 0xc0, 0x7f, 0xff,0xf1, 0xf8, 0x3f, 0x00, 0xfe, 0x0f, 0xc0, 0x7f, 0xff, 0xf1, 0xf8, 0x3f, 0x00, 0xfe, 0x0f, 0xc0,0x7f, 0xff, 0xf1, 0xf8, 0x3f, 0x00, 0xfe, 0x0f, 0xc0, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f,0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0x3f, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0xfe, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x03, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0xfe, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x03, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8,0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};const unsigned char SWITCHES_FOUR [] PROGMEM = {0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x01, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0xfc, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x03, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x03,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0xfc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff,0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f,0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xf1, 0xf8, 0x3f, 0x00, 0xfe, 0x0f, 0xc0, 0x7f, 0xff,0xf1, 0xf8, 0x3f, 0x00, 0xfe, 0x0f, 0xc0, 0x7f, 0xff, 0xf1, 0xf8, 0x3f, 0x00, 0xfe, 0x0f, 0xc0,0x7f, 0xff, 0xf1, 0xf8, 0x3f, 0x00, 0xfe, 0x0f, 0xc0, 0x7f, 0xff, 0xf1, 0xf8, 0x3f, 0x00, 0xfe,0x0f, 0xc0, 0x7f, 0xff, 0xf1, 0xf8, 0x3f, 0x00, 0xfe, 0x0f, 0xc0, 0x7f, 0xff, 0xf1, 0xf8, 0x3f,0x00, 0xfe, 0x0f, 0xc0, 0x7f, 0xff, 0xf1, 0xf8, 0x3f, 0x00, 0xfe, 0x0f, 0xc0, 0x7f, 0xff, 0xf1,0xf8, 0x3f, 0x00, 0xfe, 0x0f, 0xc0, 0x7f, 0xff, 0xf1, 0xf8, 0x3f, 0x00, 0xfe, 0x0f, 0xc0, 0x7f,0xff, 0x01, 0xf8, 0x3f, 0x1c, 0xfe, 0x8f, 0xc7, 0x7f, 0xff, 0x01, 0xf8, 0x3f, 0x1c, 0xfe, 0x8f,0xc7, 0x7f, 0xff, 0x01, 0xf8, 0x3f, 0x1c, 0xfe, 0x8f, 0xc7, 0x7f, 0xff, 0x01, 0xf8, 0x3f, 0x1c,0xfe, 0x8f, 0xc7, 0x7f, 0xff, 0x01, 0xf8, 0x3f, 0x1c, 0xfe, 0x8f, 0xc7, 0x7f, 0xff, 0x01, 0xf8,0x3f, 0x1c, 0xfe, 0x8f, 0xc7, 0x7f, 0xff, 0x01, 0xf8, 0x3f, 0x1c, 0xfe, 0x8f, 0xc7, 0x7f, 0xff,0x01, 0xf8, 0x3f, 0x1c, 0xfe, 0x8f, 0xc7, 0x7f, 0xff, 0x01, 0xf8, 0x3f, 0x1c, 0xfe, 0x8f, 0xc7,0x7f, 0xff, 0x01, 0xf8, 0x3f, 0x1c, 0xfe, 0x8f, 0xc7, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f,0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c,0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00,0x00, 0x1c, 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x80, 0x07, 0x00, 0x00,0x00, 0x00, 0x00, 0x3e, 0x00, 0x80, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x00, 0xc0, 0x1f,0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x00, 0xe0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x00,0xe0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x00, 0xe0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x80,0xff, 0x00, 0xe0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x00, 0xc0, 0x1f, 0x00, 0x00, 0x00,0x00, 0x00, 0x7e, 0x00, 0xc0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x03, 0x00};const unsigned char SWITCHES_FIVE [] PROGMEM = {0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0xf8, 0x01, 0x00, 0x00, 0x00, 0xc0,0x0f, 0x00, 0x00, 0xfc, 0x03, 0x00, 0x00, 0x00, 0xe0, 0x1f, 0x00, 0x00, 0xfe, 0x03, 0x00, 0x00,0x00, 0xe0, 0x3f, 0x00, 0x00, 0xfe, 0x03, 0x00, 0x00, 0x00, 0xe0, 0x3f, 0x00, 0x00, 0xfe, 0x03,0x00, 0x00, 0x00, 0xe0, 0x3f, 0x00, 0x00, 0xfc, 0x03, 0x00, 0x00, 0x00, 0xe0, 0x3f, 0x00, 0x00,0xfc, 0x01, 0x00, 0x00, 0x00, 0xc0, 0x1f, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x80, 0x0f,0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00,0x80, 0x07, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0xf0, 0x00, 0x00,0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0xfe, 0xff,0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f,0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xf1, 0xf8, 0x3f, 0x00, 0xfe, 0x8f, 0xc7, 0x7f, 0xff,0xf1, 0xf8, 0x3f, 0x00, 0xfe, 0x8f, 0xc7, 0x7f, 0xff, 0xf1, 0xf8, 0x3f, 0x00, 0xfe, 0x8f, 0xc7,0x7f, 0xff, 0xf1, 0xf8, 0x3f, 0x00, 0xfe, 0x8f, 0xc7, 0x7f, 0xff, 0xf1, 0xf8, 0x3f, 0x00, 0xfe,0x8f, 0xc7, 0x7f, 0xff, 0xf1, 0xf8, 0x3f, 0x00, 0xfe, 0x8f, 0xc7, 0x7f, 0xff, 0xf1, 0xf8, 0x3f,0x00, 0xfe, 0x8f, 0xc7, 0x7f, 0xff, 0xf1, 0xf8, 0x3f, 0x00, 0xfe, 0x8f, 0xc7, 0x7f, 0xff, 0xf1,0xf8, 0x3f, 0x00, 0xfe, 0x8f, 0xc7, 0x7f, 0xff, 0xf1, 0xf8, 0x3f, 0x00, 0xfe, 0x8f, 0xc7, 0x7f,0xff, 0x01, 0xf8, 0x3f, 0x1c, 0xfe, 0x0f, 0xc0, 0x7f, 0xff, 0x01, 0xf8, 0x3f, 0x1c, 0xfe, 0x0f,0xc0, 0x7f, 0xff, 0x01, 0xf8, 0x3f, 0x1c, 0xfe, 0x0f, 0xc0, 0x7f, 0xff, 0x01, 0xf8, 0x3f, 0x1c,0xfe, 0x0f, 0xc0, 0x7f, 0xff, 0x01, 0xf8, 0x3f, 0x1c, 0xfe, 0x0f, 0xc0, 0x7f, 0xff, 0x01, 0xf8,0x3f, 0x1c, 0xfe, 0x0f, 0xc0, 0x7f, 0xff, 0x01, 0xf8, 0x3f, 0x1c, 0xfe, 0x0f, 0xc0, 0x7f, 0xff,0x01, 0xf8, 0x3f, 0x1c, 0xfe, 0x0f, 0xc0, 0x7f, 0xff, 0x01, 0xf8, 0x3f, 0x1c, 0xfe, 0x0f, 0xc0,0x7f, 0xff, 0x01, 0xf8, 0x3f, 0x1c, 0xfe, 0x0f, 0xc0, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f,0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00};const unsigned char SWITCHES_SIX [] PROGMEM = {0x00, 0x70, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x01, 0x00, 0x7f, 0x00, 0x00,0x00, 0x00, 0x00, 0xfc, 0x03, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x03, 0x80, 0xff,0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x03, 0x80, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x03,0x80, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x03, 0x80, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,0xfc, 0x01, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00,0x00, 0x00, 0xf0, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x1c, 0x00,0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00,0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff,0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f,0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xf1, 0xf8, 0x3f, 0x1c, 0xfe, 0x0f, 0xc0, 0x7f, 0xff,0xf1, 0xf8, 0x3f, 0x1c, 0xfe, 0x0f, 0xc0, 0x7f, 0xff, 0xf1, 0xf8, 0x3f, 0x1c, 0xfe, 0x0f, 0xc0,0x7f, 0xff, 0xf1, 0xf8, 0x3f, 0x1c, 0xfe, 0x0f, 0xc0, 0x7f, 0xff, 0xf1, 0xf8, 0x3f, 0x1c, 0xfe,0x0f, 0xc0, 0x7f, 0xff, 0xf1, 0xf8, 0x3f, 0x1c, 0xfe, 0x0f, 0xc0, 0x7f, 0xff, 0xf1, 0xf8, 0x3f,0x1c, 0xfe, 0x0f, 0xc0, 0x7f, 0xff, 0xf1, 0xf8, 0x3f, 0x1c, 0xfe, 0x0f, 0xc0, 0x7f, 0xff, 0xf1,0xf8, 0x3f, 0x1c, 0xfe, 0x0f, 0xc0, 0x7f, 0xff, 0xf1, 0xf8, 0x3f, 0x1c, 0xfe, 0x0f, 0xc0, 0x7f,0xff, 0x01, 0xf8, 0x3f, 0x00, 0xfe, 0x8f, 0xc7, 0x7f, 0xff, 0x01, 0xf8, 0x3f, 0x00, 0xfe, 0x8f,0xc7, 0x7f, 0xff, 0x01, 0xf8, 0x3f, 0x00, 0xfe, 0x8f, 0xc7, 0x7f, 0xff, 0x01, 0xf8, 0x3f, 0x00,0xfe, 0x8f, 0xc7, 0x7f, 0xff, 0x01, 0xf8, 0x3f, 0x00, 0xfe, 0x8f, 0xc7, 0x7f, 0xff, 0x01, 0xf8,0x3f, 0x00, 0xfe, 0x8f, 0xc7, 0x7f, 0xff, 0x01, 0xf8, 0x3f, 0x00, 0xfe, 0x8f, 0xc7, 0x7f, 0xff,0x01, 0xf8, 0x3f, 0x00, 0xfe, 0x8f, 0xc7, 0x7f, 0xff, 0x01, 0xf8, 0x3f, 0x00, 0xfe, 0x8f, 0xc7,0x7f, 0xff, 0x01, 0xf8, 0x3f, 0x00, 0xfe, 0x8f, 0xc7, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f,0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x1f,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0xe0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0xe0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x1f, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0xc0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00};const unsigned char SWITCHES_SEVEN [] PROGMEM = {0x00, 0x70, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x07, 0x00, 0x00, 0xf8, 0x01, 0x00, 0x7f, 0x00, 0xc0,0x0f, 0x00, 0x00, 0xfc, 0x03, 0x00, 0x7f, 0x00, 0xe0, 0x1f, 0x00, 0x00, 0xfe, 0x03, 0x80, 0xff,0x00, 0xe0, 0x3f, 0x00, 0x00, 0xfe, 0x03, 0x80, 0xff, 0x00, 0xe0, 0x3f, 0x00, 0x00, 0xfe, 0x03,0x80, 0xff, 0x00, 0xe0, 0x3f, 0x00, 0x00, 0xfc, 0x03, 0x80, 0xff, 0x00, 0xe0, 0x3f, 0x00, 0x00,0xfc, 0x01, 0x00, 0x7f, 0x00, 0xc0, 0x1f, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x3e, 0x00, 0x80, 0x0f,0x00, 0x00, 0xf0, 0x00, 0x00, 0x1c, 0x00, 0x80, 0x07, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x1c, 0x00,0x80, 0x07, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x1c, 0x00, 0x80, 0x07, 0x00, 0x00, 0xf0, 0x00, 0x00,0x1c, 0x00, 0x80, 0x07, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x1c, 0x00, 0x80, 0x07, 0x00, 0xfe, 0xff,0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f,0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xf1, 0xf8, 0x3f, 0x1c, 0xfe, 0x8f, 0xc7, 0x7f, 0xff,0xf1, 0xf8, 0x3f, 0x1c, 0xfe, 0x8f, 0xc7, 0x7f, 0xff, 0xf1, 0xf8, 0x3f, 0x1c, 0xfe, 0x8f, 0xc7,0x7f, 0xff, 0xf1, 0xf8, 0x3f, 0x1c, 0xfe, 0x8f, 0xc7, 0x7f, 0xff, 0xf1, 0xf8, 0x3f, 0x1c, 0xfe,0x8f, 0xc7, 0x7f, 0xff, 0xf1, 0xf8, 0x3f, 0x1c, 0xfe, 0x8f, 0xc7, 0x7f, 0xff, 0xf1, 0xf8, 0x3f,0x1c, 0xfe, 0x8f, 0xc7, 0x7f, 0xff, 0xf1, 0xf8, 0x3f, 0x1c, 0xfe, 0x8f, 0xc7, 0x7f, 0xff, 0xf1,0xf8, 0x3f, 0x1c, 0xfe, 0x8f, 0xc7, 0x7f, 0xff, 0xf1, 0xf8, 0x3f, 0x1c, 0xfe, 0x8f, 0xc7, 0x7f,0xff, 0x01, 0xf8, 0x3f, 0x00, 0xfe, 0x0f, 0xc0, 0x7f, 0xff, 0x01, 0xf8, 0x3f, 0x00, 0xfe, 0x0f,0xc0, 0x7f, 0xff, 0x01, 0xf8, 0x3f, 0x00, 0xfe, 0x0f, 0xc0, 0x7f, 0xff, 0x01, 0xf8, 0x3f, 0x00,0xfe, 0x0f, 0xc0, 0x7f, 0xff, 0x01, 0xf8, 0x3f, 0x00, 0xfe, 0x0f, 0xc0, 0x7f, 0xff, 0x01, 0xf8,0x3f, 0x00, 0xfe, 0x0f, 0xc0, 0x7f, 0xff, 0x01, 0xf8, 0x3f, 0x00, 0xfe, 0x0f, 0xc0, 0x7f, 0xff,0x01, 0xf8, 0x3f, 0x00, 0xfe, 0x0f, 0xc0, 0x7f, 0xff, 0x01, 0xf8, 0x3f, 0x00, 0xfe, 0x0f, 0xc0,0x7f, 0xff, 0x01, 0xf8, 0x3f, 0x00, 0xfe, 0x0f, 0xc0, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f,0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
We are slowly getting to where we use all of the provided hardware by the end of the 30 days, and that is very exciting. As always the dip switch is giving me some problems, but it's nothing I haven't seen before.
Day 28: Landing gear - 12/13/2025
We are going to start repairing and testing our docking gear prior to landing on the mothership. We'll build on the hardware circuit from yesterday to do so.
We'll use the dip switch to activate thrusters, systems, and confirm, and then we will use the 4x4 keypad to lower and raise the landing gear.
- Software:
- using analog pins as digital pins
- enum with defined values
There's not really a lot of new stuff in this lesson, just some more involved conditionals to track the three switches, and if all three are on, then track the raised or lowered state of the gears. This last part will toggle a couple of animations on the OLED screen.
Here is the final code for today's lesson:
// primary file#include "Arduino.h"#include <U8g2lib.h>#include "Wire.h"U8G2_SH1106_128X64_NONAME_2_HW_I2C lander_display(U8G2_R0, U8X8_PIN_NONE);#include "landing_gear_bitmaps.h"const static char* SWITCH_BITMAPS[] = {LANDING_1,LANDING_2,LANDING_3,LANDING_4};#include <TM1637Display.h>const byte BITMAP_NUMBER_DISPLAY_DIO_PIN = 2;const byte BITMAP_NUMBER_DISPLAY_CLK_PIN = 3;TM1637Display bitmap_number_display(BITMAP_NUMBER_DISPLAY_CLK_PIN, BITMAP_NUMBER_DISPLAY_DIO_PIN);const byte CONFIRM_LEVER_PIN = A2;const byte SYSTEMS_LEVER_PIN = A1;const byte THRUST_LEVER_PIN = A0;#include <Keypad.h>const byte ROWS = 4;const byte COLS = 4;byte colPins[ROWS] = { 10, 11, 12, 13 };byte rowPins[COLS] = { 9, 8, 7, 6 };char buttons[ROWS][COLS] = {{ '1', '2', '3', 'A' },{ '4', '5', '6', 'B' },{ '7', '8', '9', 'C' },{ '*', '0', '#', 'D' },};Keypad myAwesomePad = Keypad(makeKeymap(buttons), rowPins, colPins, ROWS, COLS);enum APPROACH_STATE {APPROACH_INIT,APPROACH_PREFLIGHT,APPROACH_FINAL,};const int GEAR_BITMAP_COUNT = sizeof(SWITCH_BITMAPS) / sizeof(SWITCH_BITMAPS[0]);enum GEAR_STATE {GEAR_IDLE = 0,GEAR_LOWERING = 1,GEAR_RAISING = -1,};void setup(void) {Serial.begin(9600);bitmap_number_display.setBrightness(7);bitmap_number_display.clear();pinMode(CONFIRM_LEVER_PIN, INPUT);pinMode(SYSTEMS_LEVER_PIN, INPUT);pinMode(THRUST_LEVER_PIN, INPUT);lander_display.begin();lander_display.setFont(u8g2_font_6x10_tr);lander_display.setFontRefHeightText();lander_display.setFontPosTop();}void loop(void) {static int current_gear_bitmap = 0;static enum APPROACH_STATE approach_state = APPROACH_INIT;static enum GEAR_STATE gear_state = GEAR_IDLE;static char last_key = -1;bool thrust_lever = digitalRead(THRUST_LEVER_PIN);bool systems_lever = digitalRead(SYSTEMS_LEVER_PIN);bool confirm_lever = digitalRead(CONFIRM_LEVER_PIN);switch (approach_state) {case APPROACH_INIT:if (!thrust_lever && !systems_lever && !confirm_lever) {approach_state = APPROACH_PREFLIGHT;}break;case APPROACH_PREFLIGHT:if (thrust_lever && systems_lever && confirm_lever) {approach_state = APPROACH_FINAL;}break;case APPROACH_FINAL:char customKey = myAwesomePad.getKey();if (customKey && customKey != last_key) {Serial.println(customKey);last_key = customKey;}switch (customKey) {case 'A':if (current_gear_bitmap != GEAR_BITMAP_COUNT - 1) {gear_state = GEAR_LOWERING;}break;case 'B':if (current_gear_bitmap != 0) {gear_state = GEAR_RAISING;}}break;}current_gear_bitmap += gear_state;if (current_gear_bitmap == 0 || current_gear_bitmap == GEAR_BITMAP_COUNT -1) {gear_state = GEAR_IDLE;}Serial.print("Gear: ");Serial.println(current_gear_bitmap);lander_display.firstPage();do {switch (approach_state) {case APPROACH_INIT:case APPROACH_PREFLIGHT:preflightDisplay(approach_state, thrust_lever, systems_lever, confirm_lever);break;case APPROACH_FINAL:finalDisplay(current_gear_bitmap);break;}} while (lander_display.nextPage());delay(100);}void preflightDisplay(enum APPROACH_STATE approach_state,bool thruster_lever,bool systems_lever,bool confirm_lever) {lander_display.setFontPosTop();byte y_offset = drawString(0, 0, "Exploration Lander");y_offset = drawString(0, y_offset, "Approach Sequence");y_offset = lander_display.getDisplayHeight() - (4 * lander_display.getMaxCharHeight());y_offset = drawString(0, y_offset, (String("Thrusters: ") + String(thruster_lever ? "ON" : "OFF")).c_str());y_offset = drawString(0, y_offset, (String("Systems : ") + String(systems_lever ? "ON" : "OFF")).c_str());y_offset = drawString(0, y_offset, (String("Confirm : ") + String(confirm_lever ? "ON" : "OFF")).c_str());y_offset = lander_display.getDisplayHeight() - lander_display.getMaxCharHeight();drawString(0, y_offset, (String("Countdown ") + liftoffStateToString(approach_state)).c_str());}void finalDisplay(int current_gear_bitmap) {byte x_offset = (lander_display.getDisplayWidth() - LANDING_GEAR_BITMAP_WIDTH) / 2;byte y_offset = (lander_display.getDisplayHeight() - LANDING_GEAR_BITMAP_HEIGHT) / 2;lander_display.drawXBMP(x_offset, y_offset, LANDING_GEAR_BITMAP_WIDTH, LANDING_GEAR_BITMAP_HEIGHT, SWITCH_BITMAPS[current_gear_bitmap]);}String liftoffStateToString(enum APPROACH_STATE approach_state) {switch (approach_state) {case APPROACH_INIT:return ("Init");break;case APPROACH_PREFLIGHT:return ("Preflight");break;}}byte drawString(byte x, byte y, char* string) {lander_display.drawStr(x, y, string);return (y + lander_display.getMaxCharHeight());}
// landing_gear_bitmaps.h// '1', 98x44pxconst byte LANDING_GEAR_BITMAP_WIDTH = 98;const byte LANDING_GEAR_BITMAP_HEIGHT = 44;const unsigned char LANDING_1 [] PROGMEM = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xf8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x70, 0xfd, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0xf8, 0xff, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x3f, 0x08,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x80, 0xff, 0x1f, 0x1a, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0xe0, 0xff, 0x0f, 0x0d, 0x01, 0x00, 0x0c, 0x00, 0x00, 0xc0,0x0f, 0x00, 0x00, 0xf8, 0xff, 0x83, 0x82, 0x01, 0x00, 0x0e, 0x00, 0x00, 0xf0, 0x43, 0x00, 0x00,0xfc, 0xff, 0xe1, 0xe1, 0x01, 0x00, 0x0f, 0x00, 0x00, 0xfc, 0xf1, 0x00, 0x00, 0xff, 0xff, 0xd0,0xf8, 0x01, 0x80, 0x87, 0x00, 0x00, 0x7f, 0xfc, 0x01, 0x80, 0xff, 0x3f, 0x6c, 0xfe, 0x01, 0x80,0x87, 0x00, 0xc0, 0x1f, 0xfe, 0x03, 0xe0, 0x60, 0x30, 0x16, 0xff, 0x01, 0xc0, 0x63, 0x01, 0xa0,0x87, 0xff, 0x03, 0xf0, 0x60, 0x60, 0xaf, 0xff, 0x01, 0xe0, 0x63, 0x02, 0xa0, 0xe1, 0xf7, 0x03,0x7c, 0x30, 0xe0, 0xde, 0xff, 0xff, 0xff, 0x71, 0x00, 0xe0, 0xe0, 0xff, 0xf1, 0xff, 0x33, 0xc0,0xef, 0xff, 0xe7, 0xbf, 0xb0, 0x01, 0xe0, 0x5c, 0x7f, 0xf8, 0xff, 0xe7, 0xff, 0xf3, 0x7f, 0xfb,0x97, 0xb8, 0x00, 0x98, 0xff, 0x37, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xbf, 0xff, 0xf7, 0xf0, 0x00,0x04, 0xfe, 0x0d, 0xff, 0xff, 0xff, 0xff, 0xff, 0xdf, 0xff, 0x7f, 0x48, 0x00, 0x02, 0xbc, 0x43,0xff, 0xff, 0xff, 0xff, 0xff, 0xef, 0xff, 0xff, 0x57, 0x00, 0x01, 0xf8, 0xf1, 0xff, 0xff, 0xff,0xff, 0x7c, 0x37, 0xff, 0x07, 0x2e, 0x00, 0x01, 0x78, 0xf8, 0xff, 0x1f, 0xfc, 0xff, 0xe7, 0x1b,0xff, 0x03, 0x3c, 0x00, 0x01, 0x18, 0xfe, 0xff, 0x1f, 0xfe, 0xff, 0xe3, 0xfd, 0xff, 0x01, 0x18,0x00, 0x01, 0x08, 0xff, 0xff, 0x0f, 0xfe, 0xff, 0xe3, 0xef, 0xff, 0x00, 0x18, 0x00, 0x01, 0x08,0xff, 0xff, 0x0f, 0xff, 0xff, 0x23, 0x00, 0x9c, 0x00, 0x10, 0x00, 0x12, 0x0c, 0xd8, 0x3e, 0x8c,0x0f, 0xfe, 0x23, 0x80, 0x83, 0x00, 0x10, 0x00, 0x06, 0x06, 0xd6, 0x3e, 0x86, 0x07, 0xfe, 0x23,0x60, 0x80, 0x00, 0x10, 0x00, 0x9c, 0x03, 0xb8, 0x1e, 0xc6, 0x03, 0xff, 0x23, 0x08, 0x80, 0x00,0x10, 0x00, 0xf0, 0x00, 0xc0, 0x1f, 0xe3, 0x81, 0xf7, 0x23, 0x00, 0x80, 0x41, 0x18, 0x00, 0x00,0x00, 0x00, 0x1f, 0xe7, 0xc0, 0xf3, 0x23, 0x00, 0x00, 0x51, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x8e,0x7f, 0xf0, 0xf1, 0x03, 0x00, 0x00, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x8e, 0x3f, 0x78, 0xf0,0x13, 0x00, 0x00, 0xdc, 0x03, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x17, 0x3c, 0xf0, 0x0b, 0x00, 0x00,0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86, 0x03, 0x1e, 0xf0, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x86, 0x01, 0x0f, 0xfc, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0xc4, 0x81, 0x07, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xc0, 0xc3,0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x62, 0xe0, 0xf1, 0x01, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x72, 0x78, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x7c, 0x3c, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0xff, 0xdf, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf5, 0xff,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7d, 0x3f, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x9e, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};// '2', 98x44pxconst unsigned char LANDING_2 [] PROGMEM = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xf8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x70, 0xfd, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0xf8, 0xff, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x3f, 0x08,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x80, 0xff, 0x1f, 0x1a, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0xe0, 0xff, 0x0f, 0x0d, 0x01, 0x00, 0x0c, 0x00, 0x00, 0xc0,0x0f, 0x00, 0x00, 0xf8, 0xff, 0x83, 0x82, 0x01, 0x00, 0x0e, 0x00, 0x00, 0xf0, 0x43, 0x00, 0x00,0xfc, 0xff, 0xe1, 0xe1, 0x01, 0x00, 0x0f, 0x00, 0x00, 0xfc, 0xf1, 0x00, 0x00, 0xff, 0xff, 0xd0,0xf8, 0x01, 0x80, 0x87, 0x00, 0x00, 0x7f, 0xfc, 0x01, 0x80, 0xff, 0x3f, 0x6c, 0xfe, 0x01, 0x80,0x87, 0x00, 0xc0, 0x1f, 0xfe, 0x03, 0xe0, 0x60, 0x30, 0x16, 0xff, 0x01, 0xc0, 0x63, 0x01, 0xa0,0x87, 0xff, 0x03, 0xf0, 0x60, 0x60, 0xaf, 0xff, 0x01, 0xe0, 0x63, 0x02, 0xa0, 0xe1, 0xf7, 0x03,0x7c, 0x30, 0xe0, 0xde, 0xff, 0xff, 0xff, 0x71, 0x00, 0xe0, 0xe0, 0xff, 0xf1, 0xff, 0x33, 0xc0,0xef, 0xff, 0xe7, 0xbf, 0xb0, 0x01, 0xe0, 0x5c, 0x7f, 0xf8, 0xff, 0xe7, 0xff, 0xf3, 0x7f, 0xfb,0x97, 0xb8, 0x00, 0x98, 0xff, 0x37, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xbf, 0xff, 0xf7, 0xf0, 0x00,0x04, 0xfe, 0x0d, 0xff, 0xff, 0xff, 0xff, 0xff, 0xdf, 0xff, 0x7f, 0x48, 0x00, 0x02, 0xbc, 0x43,0xff, 0xff, 0xff, 0xff, 0xff, 0xef, 0xff, 0xff, 0x57, 0x00, 0x01, 0xf8, 0xf1, 0xff, 0xff, 0xff,0xff, 0x7c, 0x37, 0xff, 0x07, 0x2e, 0x00, 0x01, 0x78, 0xf8, 0xff, 0x1f, 0xfc, 0xff, 0xe7, 0x1b,0xff, 0x03, 0x3c, 0x00, 0x01, 0x18, 0xfe, 0xff, 0x1f, 0xfe, 0xff, 0xe3, 0xfd, 0xff, 0x01, 0x18,0x00, 0x01, 0x08, 0xff, 0xff, 0x0f, 0xfe, 0xff, 0xe3, 0xef, 0xff, 0x00, 0x18, 0x00, 0x01, 0x08,0xff, 0xff, 0x0f, 0xff, 0xff, 0x23, 0x00, 0x9c, 0x00, 0x10, 0x00, 0x12, 0x0c, 0xd8, 0x3e, 0x8c,0x0f, 0xfe, 0x23, 0x80, 0x83, 0x00, 0x10, 0x00, 0x06, 0x06, 0xd6, 0x3e, 0x86, 0x07, 0xfe, 0x23,0x60, 0x80, 0x00, 0x10, 0x00, 0x9c, 0x83, 0xbf, 0x1e, 0xc6, 0x03, 0xff, 0x23, 0x68, 0x83, 0x00,0x10, 0x00, 0xf0, 0x00, 0xc0, 0x1f, 0xe3, 0x81, 0xf7, 0x23, 0xc0, 0x80, 0x41, 0x18, 0x00, 0x00,0x00, 0x3e, 0x1f, 0xe7, 0xc0, 0xf3, 0x23, 0x78, 0x00, 0x51, 0x0c, 0x00, 0x00, 0x60, 0x02, 0x8e,0x7f, 0xf0, 0xf1, 0x03, 0x00, 0x0e, 0x06, 0x06, 0x00, 0x00, 0x60, 0x01, 0x8e, 0x3f, 0x78, 0xf0,0x13, 0x80, 0x0c, 0xdc, 0x03, 0x00, 0x00, 0x60, 0x0a, 0x0e, 0x17, 0x3c, 0xf0, 0x0b, 0xb0, 0x0e,0xf0, 0x00, 0x00, 0x00, 0x70, 0x19, 0x86, 0x03, 0x1e, 0xf0, 0x07, 0xb0, 0x1d, 0x00, 0x00, 0x00,0x00, 0x38, 0x1d, 0x86, 0x01, 0x0f, 0xfc, 0x07, 0xf0, 0x19, 0x00, 0x00, 0x00, 0x00, 0x98, 0x0f,0xc4, 0x81, 0x07, 0xff, 0x03, 0x60, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x38, 0x06, 0xe0, 0xc0, 0xc3,0x3f, 0x00, 0x60, 0x18, 0x00, 0x00, 0x00, 0x00, 0x10, 0x06, 0x62, 0xe0, 0xf1, 0x01, 0x00, 0xe0,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x72, 0x78, 0x7c, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x02, 0x7c, 0x3c, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0xff, 0xdf, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf5, 0xff,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7d, 0x3f, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x9e, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};// '3', 98x44pxconst unsigned char LANDING_3 [] PROGMEM = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xf8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x70, 0xfd, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0xf8, 0xff, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x3f, 0x08,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x80, 0xff, 0x1f, 0x1a, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0xe0, 0xff, 0x0f, 0x0d, 0x01, 0x00, 0x0c, 0x00, 0x00, 0xc0,0x0f, 0x00, 0x00, 0xf8, 0xff, 0x83, 0x82, 0x01, 0x00, 0x0e, 0x00, 0x00, 0xf0, 0x43, 0x00, 0x00,0xfc, 0xff, 0xe1, 0xe1, 0x01, 0x00, 0x0f, 0x00, 0x00, 0xfc, 0xf1, 0x00, 0x00, 0xff, 0xff, 0xd0,0xf8, 0x01, 0x80, 0x87, 0x00, 0x00, 0x7f, 0xfc, 0x01, 0x80, 0xff, 0x3f, 0x6c, 0xfe, 0x01, 0x80,0x87, 0x00, 0xc0, 0x1f, 0xfe, 0x03, 0xe0, 0x60, 0x30, 0x16, 0xff, 0x01, 0xc0, 0x63, 0x01, 0xa0,0x87, 0xff, 0x03, 0xf0, 0x60, 0x60, 0xaf, 0xff, 0x01, 0xe0, 0x63, 0x02, 0xa0, 0xe1, 0xf7, 0x03,0x7c, 0x30, 0xe0, 0xde, 0xff, 0xff, 0xff, 0x71, 0x00, 0xe0, 0xe0, 0xff, 0xf1, 0xff, 0x33, 0xc0,0xef, 0xff, 0xe7, 0xbf, 0xb0, 0x01, 0xe0, 0x5c, 0x7f, 0xf8, 0xff, 0xe7, 0xff, 0xf3, 0x7f, 0xfb,0x97, 0xb8, 0x00, 0x98, 0xff, 0x37, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xbf, 0xff, 0xf7, 0xf0, 0x00,0x04, 0xfe, 0x0d, 0xff, 0xff, 0xff, 0xff, 0xff, 0xdf, 0xff, 0x7f, 0x48, 0x00, 0x02, 0xbc, 0x43,0xff, 0xff, 0xff, 0xff, 0xff, 0xef, 0xff, 0xff, 0x57, 0x00, 0x01, 0xf8, 0xf1, 0xff, 0xff, 0xff,0xff, 0x7c, 0x37, 0xff, 0x07, 0x2e, 0x00, 0x01, 0x78, 0xf8, 0xff, 0x1f, 0xfc, 0xff, 0xe7, 0x1b,0xff, 0x03, 0x3c, 0x00, 0x01, 0x18, 0xfe, 0xff, 0x1f, 0xfe, 0xff, 0xe3, 0xfd, 0xff, 0x01, 0x18,0x00, 0x01, 0x08, 0xff, 0xff, 0x0f, 0xfe, 0xff, 0xe3, 0xef, 0xff, 0x00, 0x18, 0x00, 0x01, 0x08,0xff, 0xff, 0x0f, 0xff, 0xff, 0x23, 0x00, 0x9c, 0x00, 0x10, 0x00, 0x12, 0x0c, 0xd8, 0x3e, 0x8c,0x0f, 0xfe, 0x23, 0x80, 0x83, 0x00, 0x10, 0x00, 0x06, 0x06, 0xd7, 0x3e, 0x86, 0x07, 0xfe, 0x23,0xe0, 0x81, 0x00, 0x10, 0x00, 0x9c, 0x03, 0xbc, 0x1e, 0xc6, 0x03, 0xff, 0x23, 0x78, 0x80, 0x00,0x10, 0x00, 0xf0, 0x40, 0xe4, 0x1f, 0xe3, 0x81, 0xf7, 0x23, 0x22, 0x82, 0x41, 0x18, 0x00, 0x00,0x00, 0x44, 0x1f, 0xe7, 0xc0, 0xf3, 0x23, 0x00, 0x00, 0x51, 0x0c, 0x00, 0x00, 0x00, 0x17, 0x8e,0x7f, 0xf0, 0xf1, 0x03, 0xc4, 0x00, 0x06, 0x06, 0x00, 0x00, 0x00, 0x2f, 0x8e, 0x3f, 0x78, 0xf0,0x13, 0x90, 0x00, 0xdc, 0x03, 0x00, 0x00, 0x20, 0x07, 0x0e, 0x17, 0x3c, 0xf0, 0x0b, 0xc0, 0x04,0xf0, 0x00, 0x00, 0x00, 0x60, 0x03, 0x86, 0x03, 0x1e, 0xf0, 0x07, 0x00, 0x04, 0x00, 0x00, 0x00,0x00, 0x80, 0x05, 0x86, 0x01, 0x0f, 0xfc, 0x07, 0x70, 0x01, 0x00, 0x00, 0x00, 0x00, 0x80, 0x09,0xc4, 0x81, 0x07, 0xff, 0x03, 0x30, 0x01, 0x00, 0x00, 0x00, 0x00, 0xb8, 0x00, 0xe0, 0xc0, 0xc3,0x3f, 0x00, 0x80, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x9c, 0x00, 0x62, 0xe0, 0xf1, 0x01, 0x00, 0x40,0x1e, 0x00, 0x00, 0x00, 0x00, 0x4c, 0x07, 0x72, 0x78, 0x7c, 0x00, 0x00, 0x60, 0x3a, 0x00, 0x00,0x00, 0x00, 0x6c, 0x03, 0x7c, 0x3c, 0x0f, 0x00, 0x00, 0xe0, 0x33, 0x00, 0x00, 0x00, 0x00, 0xcc,0x03, 0xff, 0xdf, 0x03, 0x00, 0x00, 0x40, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x03, 0xf5, 0xff,0x00, 0x00, 0x00, 0xc0, 0x70, 0x00, 0x00, 0x00, 0x00, 0x86, 0x03, 0x7d, 0x3f, 0x00, 0x00, 0x00,0xc0, 0x21, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00,0x00, 0x00, 0x00, 0xc0, 0x00, 0x9e, 0x03, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};// '4', 98x44pxconst unsigned char LANDING_4 [] PROGMEM = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xf8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x70, 0xfd, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0xf8, 0xff, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x3f, 0x08,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x80, 0xff, 0x1f, 0x1a, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0xe0, 0xff, 0x0f, 0x0d, 0x01, 0x00, 0x0c, 0x00, 0x00, 0xc0,0x0f, 0x00, 0x00, 0xf8, 0xff, 0x83, 0x82, 0x01, 0x00, 0x0e, 0x00, 0x00, 0xf0, 0x43, 0x00, 0x00,0xfc, 0xff, 0xe1, 0xe1, 0x01, 0x00, 0x0f, 0x00, 0x00, 0xfc, 0xf1, 0x00, 0x00, 0xff, 0xff, 0xd0,0xf8, 0x01, 0x80, 0x87, 0x00, 0x00, 0x7f, 0xfc, 0x01, 0x80, 0xff, 0x3f, 0x6c, 0xfe, 0x01, 0x80,0x87, 0x00, 0xc0, 0x1f, 0xfe, 0x03, 0xe0, 0x60, 0x30, 0x16, 0xff, 0x01, 0xc0, 0x63, 0x01, 0xa0,0x87, 0xff, 0x03, 0xf0, 0x60, 0x60, 0xaf, 0xff, 0x01, 0xe0, 0x63, 0x02, 0xa0, 0xe1, 0xf7, 0x03,0x7c, 0x30, 0xe0, 0xde, 0xff, 0xff, 0xff, 0x71, 0x00, 0xe0, 0xe0, 0xff, 0xf1, 0xff, 0x33, 0xc0,0xef, 0xff, 0xe7, 0xbf, 0xb0, 0x01, 0xe0, 0x5c, 0x7f, 0xf8, 0xff, 0xe7, 0xff, 0xf3, 0x7f, 0xfb,0x97, 0xb8, 0x00, 0x98, 0xff, 0x37, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xbf, 0xff, 0xf7, 0xf0, 0x00,0x04, 0xfe, 0x0d, 0xff, 0xff, 0xff, 0xff, 0xff, 0xdf, 0xff, 0x7f, 0x48, 0x00, 0x02, 0xbc, 0x43,0xff, 0xff, 0xff, 0xff, 0xff, 0xef, 0xff, 0xff, 0x57, 0x00, 0x01, 0xf8, 0xf1, 0xff, 0xff, 0xff,0xff, 0x7c, 0x37, 0xff, 0x07, 0x2e, 0x00, 0x01, 0x78, 0xf8, 0xff, 0x1f, 0xfc, 0xff, 0xe7, 0x1b,0xff, 0x03, 0x3c, 0x00, 0x01, 0x18, 0xfe, 0xff, 0x1f, 0xfe, 0xff, 0xe3, 0xfd, 0xff, 0x01, 0x18,0x00, 0x01, 0x08, 0xff, 0xff, 0x0f, 0xfe, 0xff, 0xe3, 0xef, 0xff, 0x00, 0x18, 0x00, 0x01, 0x08,0xff, 0xff, 0x0f, 0xff, 0xff, 0x23, 0x00, 0x9c, 0x00, 0x10, 0x00, 0x12, 0x0c, 0xd8, 0x3e, 0x8c,0x0f, 0xfe, 0x23, 0x80, 0x93, 0x00, 0x10, 0x00, 0x06, 0x16, 0xd6, 0x3e, 0x86, 0x07, 0xfe, 0x23,0xe0, 0x94, 0x00, 0x10, 0x00, 0x9c, 0x53, 0xba, 0x1e, 0xc6, 0x03, 0xff, 0x23, 0x98, 0x84, 0x00,0x10, 0x00, 0xf0, 0x50, 0xea, 0x1f, 0xe3, 0x81, 0xf7, 0x23, 0xc0, 0x81, 0x41, 0x18, 0x00, 0x00,0x80, 0x08, 0x1f, 0xe7, 0xc0, 0xf3, 0x23, 0x20, 0x02, 0x51, 0x0c, 0x00, 0x00, 0x00, 0x07, 0x8e,0x7f, 0xf0, 0xf1, 0x03, 0xc0, 0x01, 0x06, 0x06, 0x00, 0x00, 0x00, 0x03, 0x8e, 0x3f, 0x78, 0xf0,0x13, 0xc0, 0x00, 0xdc, 0x03, 0x00, 0x00, 0x20, 0x22, 0x0e, 0x17, 0x3c, 0xf0, 0x0b, 0x98, 0x0c,0xf0, 0x00, 0x00, 0x00, 0xe0, 0x0f, 0x86, 0x03, 0x1e, 0xf0, 0x07, 0x48, 0x0d, 0x00, 0x00, 0x00,0x00, 0x00, 0x03, 0x86, 0x01, 0x0f, 0xfc, 0x07, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,0xc4, 0x81, 0x07, 0xff, 0x03, 0xc0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x70, 0x31, 0xe0, 0xc0, 0xc3,0x3f, 0x00, 0x98, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x70, 0x39, 0x62, 0xe0, 0xf1, 0x01, 0x00, 0xb8,0x0d, 0x00, 0x00, 0x00, 0x00, 0x70, 0x7a, 0x72, 0x78, 0x7c, 0x00, 0x00, 0xb8, 0x0d, 0x00, 0x00,0x00, 0x00, 0x70, 0x7b, 0x7c, 0x3c, 0x0f, 0x00, 0x00, 0xb8, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x70,0x7b, 0xff, 0xdf, 0x03, 0x00, 0x00, 0xf8, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x79, 0xf5, 0xff,0x00, 0x00, 0x00, 0xb8, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x78, 0x7d, 0x3f, 0x00, 0x00, 0x00,0x38, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x70, 0x78, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x38, 0x0c, 0x00,0x00, 0x00, 0x00, 0x70, 0x78, 0x9e, 0x03, 0x00, 0x00, 0x00, 0x38, 0x0c, 0x00, 0x00, 0x00, 0x00,0x70, 0x30, 0x78, 0x00, 0x00, 0x00, 0x00, 0x18, 0x0c, 0x00, 0x00, 0x00};
Day 29: Landing gear part 2 - 12/14/2025
Today we wrap things up and finally attempt to land safely on the mothership. The hardware is the same as yesterday (I guess they couldn't get the passive buzzer and the rotary encoder to work nicely with all of the other stuff going on - but I get it), and the software is basically the same, just bringing the 7 segment display back online and throwing a lot more conditionals in.
In addition to checking the three dip switches (thrusters, systems, and confirmation) and the landing gear status (up or down), we'll be calculating things like our thruster speed and the position of our ship relative to the mothership. If we miss the ship, land at too high of a velocity, or land with our landing gear retracted, we fail. If all of the correct conditions are met, we succeed and survive.
- Software:
- Random numbers (
randomSeed()andrandom()) sprintf()
- Random numbers (
Here is the final code for today's lesson:
// primary file#include "Arduino.h"#include <U8g2lib.h>#include "Wire.h"U8G2_SH1106_128X64_NONAME_2_HW_I2C lander_display(U8G2_R0, U8X8_PIN_NONE);#include "radar_arrows.h"#include "small_landing_gear_bitmaps.h"#include "ending_bitmaps.h"const static char* LANDER_BITMAPS[] = {LANDING_GEAR_1,LANDING_GEAR_2,LANDING_GEAR_3,LANDING_GEAR_4,};const int GEAR_BITMAP_COUNT = sizeof(LANDER_BITMAPS) / sizeof(LANDER_BITMAPS[0]);enum GEAR_STATE {GEAR_IDLE = 0,GEAR_LOWERING = 1,GEAR_RAISING = -1};#include <TM1637Display.h>const byte DISTANCE_DISPLAY_DIO_PIN = 4;const byte DISTANCE_DISPLAY_CLK_PIN = 5;TM1637Display distance_display(DISTANCE_DISPLAY_CLK_PIN, DISTANCE_DISPLAY_DIO_PIN);const byte CONFIRM_LEVER_PIN = A2;const byte SYSTEMS_LEVER_PIN = A1;const byte THRUST_LEVER_PIN = A0;#include <Keypad.h>const byte CONTROL_ROW_COUNT = 4;const byte CONTROL_COLUMN_COUNT = 4;const byte COLUMN_PINS[CONTROL_COLUMN_COUNT] = { 10, 11, 12, 13 };const byte ROW_PINS[CONTROL_ROW_COUNT] = { 9, 8, 7, 6 };enum LANDER_CONTROLS {UNUSED,STEER_UP,STEER_DOWN,STEER_LEFT,STEER_RIGHT,STEER_UP_RIGHT,STEER_UP_LEFT,STEER_DOWN_RIGHT,STEER_DOWN_LEFT,LOWER_GEAR,RAISE_GEAR,RAISE_SPEED,LOWER_SPEED,};char control_buttons[CONTROL_ROW_COUNT][CONTROL_COLUMN_COUNT] = {{ STEER_UP_LEFT, STEER_UP, STEER_UP_RIGHT, LOWER_GEAR },{ STEER_LEFT, UNUSED, STEER_RIGHT, RAISE_GEAR },{ STEER_DOWN_LEFT, STEER_DOWN, STEER_DOWN_RIGHT, RAISE_SPEED },{ UNUSED, UNUSED, UNUSED, LOWER_SPEED },};Keypad lander_controls = Keypad(makeKeymap(control_buttons), ROW_PINS, COLUMN_PINS, CONTROL_ROW_COUNT, CONTROL_COLUMN_COUNT);enum APPROACH_STATE {APPROACH_INIT,APPROACH_PREFLIGHT,APPROACH_IN_FLIGHT,APPROACH_FINAL};const int INITIAL_DISTANCE = 1394;const byte MAX_MOTHER_SHIP_WIDTH = 21;const byte MAX_MOTHER_SHIP_HEIGHT = 15;void setup(void) {Serial.begin(9600);randomSeed(analogRead(A3));lander_display.begin();lander_display.setFont(u8g2_font_6x10_tr);lander_display.setFontRefHeightText();lander_display.setFontPosTop();distance_display.setBrightness(7);distance_display.clear();pinMode(CONFIRM_LEVER_PIN, INPUT);pinMode(SYSTEMS_LEVER_PIN, INPUT);pinMode(THRUST_LEVER_PIN, INPUT);}void loop(void) {static unsigned long approach_start_time = 0;static int current_gear_bitmap_index = 0;static enum APPROACH_STATE approach_state = APPROACH_INIT;static enum GEAR_STATE gear_state = GEAR_IDLE;static int lander_distance = INITIAL_DISTANCE;static int lander_speed = 0;static int mother_ship_x_offset = 0;static int mother_ship_y_offset = 0;bool thrust_lever = digitalRead(THRUST_LEVER_PIN);bool systems_lever = digitalRead(SYSTEMS_LEVER_PIN);bool confirm_lever = digitalRead(CONFIRM_LEVER_PIN);switch (approach_state) {case APPROACH_INIT:if (!thrust_lever && !systems_lever && !confirm_lever) {approach_state = APPROACH_PREFLIGHT;}break;case APPROACH_PREFLIGHT:if (thrust_lever && systems_lever && confirm_lever) {approach_state = APPROACH_IN_FLIGHT;}break;case APPROACH_FINAL:case APPROACH_IN_FLIGHT:switch (controlButtonPressed()) {case RAISE_SPEED:lander_speed++;if (approach_start_time == 0) {approach_start_time = millis();}break;case LOWER_SPEED:if (lander_speed > 0) {lander_speed--;}break;case LOWER_GEAR:if (approach_state == APPROACH_FINAL) {if (current_gear_bitmap_index != GEAR_BITMAP_COUNT - 1) {gear_state = GEAR_LOWERING;}}break;case RAISE_GEAR:if (current_gear_bitmap_index != 0) {gear_state = GEAR_RAISING;}case STEER_UP:mother_ship_y_offset++;break;case STEER_DOWN:mother_ship_y_offset--;break;case STEER_LEFT:mother_ship_x_offset++;break;case STEER_RIGHT:mother_ship_x_offset--;break;case STEER_UP_RIGHT:mother_ship_x_offset--;mother_ship_y_offset++;break;case STEER_UP_LEFT:mother_ship_x_offset++;mother_ship_y_offset++;break;case STEER_DOWN_RIGHT:mother_ship_x_offset--;mother_ship_y_offset--;break;case STEER_DOWN_LEFT:mother_ship_x_offset++;mother_ship_y_offset--;break;}const byte MAX_DRIFT = 18;mother_ship_x_offset += getRandomDrift();mother_ship_y_offset += getRandomDrift();if (mother_ship_x_offset > MAX_DRIFT) mother_ship_x_offset = MAX_DRIFT;if (mother_ship_x_offset < -MAX_DRIFT) mother_ship_x_offset = -MAX_DRIFT;if (mother_ship_y_offset > MAX_DRIFT) mother_ship_y_offset = MAX_DRIFT;if (mother_ship_y_offset < -MAX_DRIFT) mother_ship_y_offset = -MAX_DRIFT;if (lander_distance < (INITIAL_DISTANCE / 10)) {approach_state = APPROACH_FINAL;}break;}current_gear_bitmap_index += gear_state;if (current_gear_bitmap_index == 0 || current_gear_bitmap_index == GEAR_BITMAP_COUNT - 1) {gear_state = GEAR_IDLE;}lander_display.firstPage();do {switch (approach_state) {case APPROACH_INIT:case APPROACH_PREFLIGHT:displayPreFlight(approach_state, thrust_lever, systems_lever, confirm_lever);break;case APPROACH_FINAL:displayFinal(current_gear_bitmap_index);case APPROACH_IN_FLIGHT:displayInFlight(lander_distance, lander_speed, mother_ship_x_offset, mother_ship_y_offset);break;}} while (lander_display.nextPage());lander_distance -= lander_speed;char* ending_bitmp;if (lander_distance <= 0) {if (abs(mother_ship_x_offset) < ((MAX_MOTHER_SHIP_WIDTH + 1) / 2)&& abs(mother_ship_y_offset) < ((MAX_MOTHER_SHIP_HEIGHT + 1) / 2)) {lander_distance = 0;if (lander_speed <= 2) {if (current_gear_bitmap_index == GEAR_BITMAP_COUNT - 1) {ending_bitmp = ENDING_BITMAP_SUCCESS;} else {ending_bitmp = ENDING_BITMAP_NO_GEAR;}} else {ending_bitmp = ENDING_BITMAP_TOO_FAST;}} else {ending_bitmp = ENDING_BITMAP_MISSED_MOTHER_SHIP;}distance_display.showNumberDec(0);unsigned long elapsed_time = millis() - approach_start_time;char buffer[20];sprintf(buffer, "%4lu.%03lu Sec", elapsed_time / 1000, elapsed_time % 1000);do {lander_display.firstPage();do {lander_display.drawStr(0, 0, buffer);lander_display.drawXBMP(0, 10, ENDING_BITMAP_WIDTH, ENDING_BITMAP_HEIGHT, ending_bitmp);} while (lander_display.nextPage());delay(2000);lander_display.firstPage();do {displayFinal(current_gear_bitmap_index);displayInFlight(lander_distance, lander_speed,mother_ship_x_offset, mother_ship_y_offset);} while (lander_display.nextPage());delay(2000);} while (true);}delay(100);}void displayPreFlight(enum APPROACH_STATE approach_state, bool thruster_lever, bool systems_lever, bool confirm_lever) {lander_display.setFontPosTop();byte y_offset = drawString(0, 0, "Exploration Lander");y_offset = drawString(0, y_offset, "Approach Sequence");y_offset = lander_display.getDisplayHeight() - (4 * lander_display.getMaxCharHeight());y_offset = drawString(0, y_offset, (String("Thrusters: ") + String(thruster_lever ? "ON" : "OFF")).c_str());y_offset = drawString(0, y_offset, (String("Systems : ") + String(systems_lever ? "ON" : "OFF")).c_str());y_offset = drawString(0, y_offset, (String("Confirm : ") + String(confirm_lever ? "ON" : "OFF")).c_str());drawString(0, y_offset, (String("Countdown ") + liftoffStateToString(approach_state)).c_str());}void displayInFlight(int lander_distance, int lander_speed, int mother_ship_x_offset, int mother_ship_y_offset) {const unsigned int SEGMENT_SIZE = INITIAL_DISTANCE / (MAX_MOTHER_SHIP_WIDTH - 1);byte segment_number = lander_distance / SEGMENT_SIZE;int mother_ship_width = MAX_MOTHER_SHIP_WIDTH - segment_number;int mother_ship_height = MAX_MOTHER_SHIP_HEIGHT - segment_number;if (mother_ship_height < 1) {mother_ship_height = 1;}distance_display.showNumberDec(lander_distance);const byte RADAR_CENTER_X = (lander_display.getDisplayWidth() / 2 / 2);const byte RADAR_CENTER_Y = (lander_display.getDisplayHeight() / 2);const byte RADAR_RADIUS = 25;lander_display.setBitmapMode(1);lander_display.drawCircle(RADAR_CENTER_X, RADAR_CENTER_Y, RADAR_RADIUS);lander_display.drawPixel(RADAR_CENTER_X, RADAR_CENTER_Y);const int DRIFT_BEFORE_ARROW_X = 2;const int DRIFT_BEFORE_ARROW_Y = 2;if (mother_ship_x_offset < -DRIFT_BEFORE_ARROW_X) {if (mother_ship_y_offset < -DRIFT_BEFORE_ARROW_Y) {lander_display.drawXBMP(9, 9, ARROW_SIZE_X, ARROW_SIZE_Y, ARROW_UP_LEFT);} else if (mother_ship_y_offset > DRIFT_BEFORE_ARROW_Y) {lander_display.drawXBMP(8, 45, ARROW_SIZE_X, ARROW_SIZE_Y, ARROW_DOWN_LEFT);} else {lander_display.drawXBMP(1, 27, ARROW_SIZE_X, ARROW_SIZE_Y, ARROW_LEFT);}} else if (mother_ship_x_offset > DRIFT_BEFORE_ARROW_X) {if (mother_ship_y_offset < -DRIFT_BEFORE_ARROW_Y) {lander_display.drawXBMP(45, 8, ARROW_SIZE_X, ARROW_SIZE_Y, ARROW_UP_RIGHT);} else if (mother_ship_y_offset > DRIFT_BEFORE_ARROW_Y) {lander_display.drawXBMP(45, 45, ARROW_SIZE_X, ARROW_SIZE_Y, ARROW_DOWN_RIGHT);} else {lander_display.drawXBMP(53, 27, ARROW_SIZE_X, ARROW_SIZE_Y, ARROW_RIGHT);}} else {if (mother_ship_y_offset < -DRIFT_BEFORE_ARROW_Y) {lander_display.drawXBMP(27, 1, ARROW_SIZE_X, ARROW_SIZE_Y, ARROW_UP);} else if (mother_ship_y_offset > DRIFT_BEFORE_ARROW_Y) {lander_display.drawXBMP(27, 53, ARROW_SIZE_X, ARROW_SIZE_Y, ARROW_DOWN);}}char buffer[9];sprintf(buffer, "SPD: %2d", lander_speed);int width = lander_display.getStrWidth(buffer);lander_display.drawStr(lander_display.getDisplayWidth() - width, 0, buffer);byte x_offset = RADAR_CENTER_X + mother_ship_x_offset - (mother_ship_width / 2);byte y_offset = RADAR_CENTER_Y + mother_ship_y_offset - (mother_ship_height / 2);lander_display.drawFrame(x_offset, y_offset, mother_ship_width, mother_ship_height);}void displayFinal(int current_gear_bitmap_index) {int gear_down_index = GEAR_BITMAP_COUNT - 1;byte x_offset = (lander_display.getDisplayWidth() / 2) + 11;byte y_offset = lander_display.getMaxCharHeight() * 2;if (current_gear_bitmap_index == 0) {lander_display.drawStr(x_offset, y_offset, "Drop gear");} else if (current_gear_bitmap_index < gear_down_index) {lander_display.drawStr(x_offset, y_offset, "Lowering");} else {lander_display.drawStr(x_offset, y_offset, "Gear OK");}x_offset = (lander_display.getDisplayWidth() / 2); // 64x_offset += ((lander_display.getDisplayWidth() - x_offset) - LANDING_GEAR_BITMAP_WIDTH) / 2;y_offset = lander_display.getDisplayHeight() - (lander_display.getMaxCharHeight() * 3);y_offset += ((lander_display.getDisplayHeight() - y_offset) - LANDING_GEAR_BITMAP_HEIGHT) / 2;lander_display.drawXBMP(x_offset, y_offset, LANDING_GEAR_BITMAP_WIDTH, LANDING_GEAR_BITMAP_HEIGHT, LANDER_BITMAPS[current_gear_bitmap_index]);}String liftoffStateToString(enum APPROACH_STATE approach_state) {switch (approach_state) {case APPROACH_INIT:return ("Init");break;case APPROACH_PREFLIGHT:return ("Preflight");break;}}byte drawString(byte x, byte y, char* string) {lander_display.drawStr(x, y, string);return (y + lander_display.getMaxCharHeight());}enum LANDER_CONTROLS controlButtonPressed() {static char last_key = NO_KEY;char current_key = lander_controls.getKey();if (current_key != NO_KEY) {last_key = current_key;}if (lander_controls.getState() == RELEASED) {last_key = NO_KEY;current_key = NO_KEY;} else {current_key = last_key;}return (current_key);}const byte DRIFT_CONTROL = 3;int getRandomDrift() {int drift = random(-1, DRIFT_CONTROL);if (drift > 1) {drift = 0;}return (drift);}
// radar_arrows.hconst byte ARROW_SIZE_X = 11;const byte ARROW_SIZE_Y = 11;// 'RIGHT', 11x11pxconst unsigned char ARROW_RIGHT [] PROGMEM = {0x00, 0x00, 0x40, 0x00, 0xc0, 0x00, 0xff, 0x01, 0xff, 0x03, 0xff, 0x07, 0xff, 0x03, 0xff, 0x01,0xc0, 0x00, 0x40, 0x00, 0x00, 0x00};// 'UP', 11x11pxconst unsigned char ARROW_UP [] PROGMEM = {0x20, 0x00, 0x70, 0x00, 0xf8, 0x00, 0xfc, 0x01, 0xfe, 0x03, 0xf8, 0x00, 0xf8, 0x00, 0xf8, 0x00,0xf8, 0x00, 0xf8, 0x00, 0xf8, 0x00};// 'UP_RIGHT', 11x11pxconst unsigned char ARROW_UP_RIGHT [] PROGMEM = {0x00, 0x00, 0xf8, 0x03, 0xf0, 0x03, 0xf0, 0x03, 0xf8, 0x03, 0xfc, 0x03, 0xfe, 0x03, 0x7c, 0x02,0x38, 0x00, 0x10, 0x00, 0x00, 0x00};// 'UP_LEFT', 11x11pxconst unsigned char ARROW_UP_LEFT [] PROGMEM = {0x00, 0x00, 0xfe, 0x00, 0x7e, 0x00, 0x7e, 0x00, 0xfe, 0x00, 0xfe, 0x01, 0xfe, 0x03, 0xf2, 0x01,0xe0, 0x00, 0x40, 0x00, 0x00, 0x00};// 'DOWN', 11x11pxconst unsigned char ARROW_DOWN [] PROGMEM = {0xf8, 0x00, 0xf8, 0x00, 0xf8, 0x00, 0xf8, 0x00, 0xf8, 0x00, 0xf8, 0x00, 0xfe, 0x03, 0xfc, 0x01,0xf8, 0x00, 0x70, 0x00, 0x20, 0x00};// 'DOWN_RIGHT', 11x11pxconst unsigned char ARROW_DOWN_RIGHT [] PROGMEM = {0x00, 0x00, 0x18, 0x00, 0x3c, 0x00, 0x7e, 0x02, 0xfe, 0x03, 0xfc, 0x03, 0xf8, 0x03, 0xf0, 0x03,0xf0, 0x03, 0xf8, 0x03, 0x00, 0x00};// 'DOWN_LEFT', 11x11pxconst unsigned char ARROW_DOWN_LEFT [] PROGMEM = {0x00, 0x00, 0x40, 0x00, 0xe0, 0x00, 0xf2, 0x01, 0xfe, 0x03, 0xfe, 0x03, 0xfe, 0x01, 0xfe, 0x00,0x7e, 0x00, 0xfe, 0x00, 0x00, 0x00};// 'LEFT', 11x11pxconst unsigned char ARROW_LEFT [] PROGMEM = {0x00, 0x00, 0x10, 0x00, 0x18, 0x00, 0xfc, 0x07, 0xfe, 0x07, 0xff, 0x07, 0xfe, 0x07, 0xfc, 0x07,0x18, 0x00, 0x10, 0x00, 0x00, 0x00};
// small_landing_gear_bitmaps.hconst byte LANDING_GEAR_BITMAP_WIDTH = 48;const byte LANDING_GEAR_BITMAP_HEIGHT = 34;// 'LANDING_GEAR_1', 48x34pxconst unsigned char LANDING_GEAR_1 [] PROGMEM = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0xf8, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x04, 0x30, 0x00, 0x00,0x00, 0x00, 0x06, 0x20, 0x00, 0x00, 0x00, 0x00, 0x03, 0x60, 0x00, 0x00, 0x00, 0x00, 0x01, 0xc0,0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0x00, 0x00, 0xff, 0x83, 0xff, 0xff, 0xc1, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0xff, 0x83, 0xff, 0xff, 0xc1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0x83, 0xff, 0xff, 0xc1, 0xff, 0x00, 0x80, 0xff, 0xff, 0x01, 0x00, 0x00, 0x80, 0xff, 0xff,0x01, 0x00, 0x00, 0x80, 0xff, 0xff, 0x01, 0x00, 0x00, 0x80, 0xff, 0xff, 0x01, 0x00, 0x00, 0x80,0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};// 'LANDING_GEAR_2', 48x34pxconst unsigned char LANDING_GEAR_2 [] PROGMEM = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0xf8, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x04, 0x30, 0x00, 0x00,0x00, 0x00, 0x06, 0x20, 0x00, 0x00, 0x00, 0x00, 0x03, 0x60, 0x00, 0x00, 0x00, 0x00, 0x01, 0xc0,0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0x00, 0x00, 0xff, 0x83, 0xff, 0xff, 0xc1, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0xff, 0x83, 0xff, 0xff, 0xc1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0x83, 0xff, 0xff, 0xc1, 0xff, 0x08, 0x80, 0xff, 0xff, 0x01, 0x08, 0x08, 0x80, 0xff, 0xff,0x01, 0x08, 0xff, 0x80, 0xff, 0xff, 0x81, 0xff, 0xff, 0x80, 0xff, 0xff, 0x01, 0x00, 0x00, 0x80,0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};// 'LANDING_GEAR_3', 48x34pxconst unsigned char LANDING_GEAR_3 [] PROGMEM = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0xf8, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x04, 0x30, 0x00, 0x00,0x00, 0x00, 0x06, 0x20, 0x00, 0x00, 0x00, 0x00, 0x03, 0x60, 0x00, 0x00, 0x00, 0x00, 0x01, 0xc0,0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0x00, 0x00, 0xff, 0x83, 0xff, 0xff, 0xc1, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0xff, 0x83, 0xff, 0xff, 0xc1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0x83, 0xff, 0xff, 0xc1, 0xff, 0x28, 0x80, 0xff, 0xff, 0x01, 0x0a, 0x38, 0x80, 0xff, 0xff,0x01, 0x0e, 0x18, 0x80, 0xff, 0xff, 0x01, 0x0c, 0x18, 0x80, 0xff, 0xff, 0x01, 0x0c, 0x08, 0x80,0xff, 0xff, 0x01, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x08, 0xff, 0x00, 0x00, 0x00, 0x80, 0xff,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};// 'LANDING_GEAR_4', 48x34pxconst unsigned char LANDING_GEAR_4 [] PROGMEM = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0xf8, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x04, 0x30, 0x00, 0x00,0x00, 0x00, 0x06, 0x20, 0x00, 0x00, 0x00, 0x00, 0x03, 0x60, 0x00, 0x00, 0x00, 0x00, 0x01, 0xc0,0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0x00, 0x00, 0xff, 0x83, 0xff, 0xff, 0xc1, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0xff, 0xff, 0x83, 0xff, 0xff, 0xc1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0x83, 0xff, 0xff, 0xc1, 0xff, 0xc8, 0x80, 0xff, 0xff, 0x81, 0x09, 0xc8, 0x80, 0xff, 0xff,0x81, 0x09, 0x68, 0x80, 0xff, 0xff, 0x01, 0x0b, 0x28, 0x80, 0xff, 0xff, 0x01, 0x0a, 0x38, 0x80,0xff, 0xff, 0x01, 0x0e, 0x18, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x08, 0x00, 0x00, 0x00, 0x00, 0x0c,0x08, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x08, 0xff, 0x00, 0x00, 0x00,0x80, 0xff, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
// ending_bitmaps.hconst byte ENDING_BITMAP_WIDTH = 128;const byte ENDING_BITMAP_HEIGHT = 54;// ENDING_BITMAP_NO_GEAR, 128x54pxconst unsigned char ENDING_BITMAP_NO_GEAR [] PROGMEM = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x1f, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x38, 0x1f, 0x23, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x20, 0x80, 0xa3, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00,0x28, 0x84, 0xa2, 0x10, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00,0x28, 0x44, 0xa0, 0x10, 0x05, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00,0x48, 0x44, 0x20, 0x18, 0x05, 0xfc, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00,0x48, 0x15, 0x20, 0x99, 0x04, 0xfe, 0x07, 0x70, 0x00, 0x00, 0x40, 0x00, 0x80, 0x4f, 0x00, 0x00,0x00, 0x35, 0x21, 0x99, 0x04, 0xfe, 0x0f, 0x20, 0x00, 0x00, 0x5c, 0x00, 0x80, 0x27, 0x00, 0x00,0x80, 0x24, 0x00, 0x1a, 0x00, 0x1c, 0x1f, 0x60, 0x00, 0x00, 0x79, 0x03, 0xc0, 0x57, 0x00, 0x00,0x80, 0x0e, 0x00, 0x7e, 0x00, 0x00, 0x1e, 0xe0, 0x00, 0x80, 0xf8, 0x05, 0xe0, 0x3b, 0x00, 0x00,0x00, 0x1f, 0x00, 0x18, 0x00, 0x00, 0x3e, 0xc0, 0x00, 0x80, 0xf8, 0x0f, 0xf0, 0x1d, 0x00, 0x00,0x00, 0x16, 0x00, 0x3c, 0x00, 0x00, 0x3e, 0xc0, 0x00, 0x00, 0xf9, 0x1f, 0xf8, 0x0e, 0x00, 0x00,0xd0, 0xe7, 0x40, 0xbd, 0x02, 0x00, 0x3e, 0xc0, 0x01, 0x00, 0xfa, 0x33, 0x7c, 0x07, 0x00, 0x00,0x50, 0xcf, 0x01, 0x5a, 0x00, 0xf0, 0x1f, 0x40, 0x1d, 0x10, 0xfc, 0x67, 0xbc, 0x07, 0x00, 0x00,0x50, 0x8b, 0x40, 0xef, 0x02, 0xfc, 0x1f, 0x40, 0x78, 0x18, 0xf0, 0xff, 0xfe, 0x03, 0x00, 0x00,0x00, 0x0a, 0x00, 0x24, 0x00, 0xfe, 0x0f, 0x80, 0x41, 0x04, 0xf8, 0xff, 0xdf, 0x01, 0x00, 0x00,0x00, 0x06, 0x00, 0x18, 0x00, 0xfe, 0x03, 0xf8, 0xc3, 0x48, 0xf0, 0xff, 0xef, 0x00, 0x00, 0x00,0x00, 0x0c, 0x00, 0x3c, 0x00, 0x1c, 0x00, 0x04, 0xc2, 0x60, 0xe0, 0xc7, 0x77, 0x00, 0x00, 0x00,0x30, 0xc4, 0xc1, 0x00, 0x03, 0x08, 0x00, 0x02, 0xc4, 0x11, 0xe0, 0xdf, 0x7b, 0x00, 0x10, 0x00,0x78, 0xee, 0xe1, 0x20, 0x0f, 0x00, 0x00, 0x02, 0xd8, 0x00, 0x81, 0xff, 0x3f, 0x00, 0x38, 0x00,0xf8, 0xee, 0xf1, 0x20, 0xcf, 0x01, 0x00, 0x02, 0xf8, 0x81, 0xf9, 0xff, 0x3f, 0x00, 0x70, 0x00,0xf8, 0xe4, 0xf1, 0x38, 0xef, 0x03, 0x00, 0x00, 0xa8, 0x03, 0xb0, 0xff, 0x7f, 0x00, 0xc0, 0x00,0xf8, 0xe6, 0xf1, 0x18, 0xef, 0x03, 0x00, 0x02, 0x48, 0x00, 0x80, 0xff, 0xbf, 0x00, 0x80, 0x03,0xf8, 0xec, 0xf1, 0x34, 0xcf, 0x03, 0x00, 0x02, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x07, 0x00, 0x07,0xf8, 0xf6, 0xf1, 0x3c, 0x0f, 0x00, 0x00, 0x04, 0x04, 0x00, 0xf0, 0xff, 0x3b, 0x03, 0x00, 0x0e,0xf8, 0xfc, 0xf1, 0x24, 0x0f, 0x00, 0x00, 0x08, 0x03, 0x00, 0xf0, 0xff, 0x1f, 0x1e, 0x00, 0x1c,0xf8, 0xe0, 0xf1, 0x00, 0x0f, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0xff, 0xf0, 0x3f, 0x00, 0x28,0xf8, 0xe0, 0xf1, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xf1, 0x3f, 0x00, 0x20,0xf8, 0xe0, 0xf1, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xf1, 0x3f, 0x00, 0x1f,0xf8, 0xe0, 0xf1, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xf3, 0x3f, 0x80, 0x41,0xf8, 0xe0, 0xf1, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xa3, 0xff, 0xc0, 0x00,0x78, 0xe0, 0xe1, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xbf, 0x27, 0x0e, 0x83, 0x80,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0xf7, 0x27, 0x0e, 0x00, 0x80,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x63, 0x7f, 0x0e, 0x00, 0x80,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xe3, 0x4f, 0xfe, 0x80, 0x80,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xc1, 0x3f, 0x06, 0x80, 0x00,0x38, 0xe7, 0x01, 0x3c, 0x7f, 0x38, 0xfc, 0x38, 0x00, 0x00, 0xfe, 0x80, 0x3f, 0x06, 0x00, 0x61,0x78, 0xf3, 0x03, 0x7e, 0x7f, 0x78, 0xfc, 0x39, 0x00, 0x00, 0x7f, 0x80, 0x7f, 0x06, 0x00, 0x1c,0x78, 0x73, 0x03, 0x7e, 0x3f, 0x7c, 0xdc, 0x39, 0x00, 0x80, 0x7f, 0x00, 0x7f, 0x06, 0x00, 0x00,0x78, 0x3b, 0x07, 0x77, 0x07, 0x7c, 0xcc, 0x39, 0x00, 0x80, 0x3f, 0x00, 0x7f, 0x02, 0x00, 0x00,0xf8, 0x3b, 0x07, 0x07, 0x3f, 0xec, 0xec, 0x39, 0x00, 0xc0, 0x1f, 0x00, 0xfe, 0x00, 0x00, 0x00,0xd8, 0x3b, 0x07, 0x73, 0x3f, 0xee, 0xfe, 0x18, 0x00, 0xe0, 0x0f, 0x00, 0xfe, 0x00, 0x00, 0x00,0xd8, 0x3b, 0x03, 0x7b, 0x0f, 0xfe, 0x7e, 0x1c, 0x00, 0xe0, 0x0f, 0x00, 0x7c, 0x01, 0x00, 0x00,0xd8, 0xbb, 0x03, 0x79, 0x03, 0xfe, 0xee, 0x1c, 0x00, 0xf0, 0x07, 0x00, 0x1c, 0x00, 0x00, 0x00,0x98, 0xfb, 0x03, 0x7f, 0x7f, 0xff, 0xee, 0x1c, 0x00, 0xf0, 0x03, 0x00, 0x1c, 0x00, 0x00, 0x00,0x98, 0xf3, 0x01, 0x3f, 0x7f, 0xc7, 0xce, 0x1d, 0x00, 0xf0, 0x01, 0x00, 0x18, 0x00, 0x00, 0x00,0x98, 0xe3, 0x00, 0x1c, 0x3f, 0xc7, 0x4f, 0x08, 0x00, 0xe8, 0x01, 0x00, 0x40, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};// ENDING_BITMAP_SUCCESS, 128x54pxconst unsigned char ENDING_BITMAP_SUCCESS [] PROGMEM = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x18, 0x0f, 0x00, 0x00, 0x00, 0xe0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0xdf, 0xff, 0x00, 0x00, 0x00, 0x18, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0xf8, 0xe3, 0x0f, 0x00, 0x00, 0x0c, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0xe0, 0xff, 0x77, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x80, 0x00, 0xff, 0x60, 0x7f, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x01, 0x1c, 0x81, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x0c, 0x08, 0xf0, 0xf1, 0x03, 0x08, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x30, 0x08, 0xfa, 0xf9, 0xe3, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x80, 0x44, 0x7e, 0xfe, 0x1f, 0x20, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x40, 0x00, 0xce, 0xdf, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x01, 0x40, 0x00, 0xf8, 0x3f, 0xfe, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x03, 0x60, 0x02, 0xea, 0x23, 0x9c, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x07, 0x84, 0x10, 0xe7, 0x40, 0x88, 0x0f, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00,0x8e, 0x03, 0x31, 0x3c, 0x80, 0x18, 0x07, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,0x5c, 0x1c, 0x00, 0x7c, 0x00, 0x31, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x28, 0x38, 0x00, 0x98, 0x00, 0x7e, 0x06, 0x00, 0x00, 0x00, 0x04, 0x80, 0x01, 0x02, 0x00, 0x00,0x68, 0x38, 0x00, 0x00, 0x02, 0x20, 0x0c, 0x00, 0x00, 0x00, 0x02, 0x80, 0x01, 0x02, 0x00, 0x00,0xf0, 0xe1, 0x00, 0x00, 0x08, 0x60, 0x0c, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x02, 0x20, 0x03,0x0c, 0x7e, 0x00, 0x00, 0x20, 0xc0, 0x08, 0x00, 0x00, 0x00, 0x00, 0x60, 0x80, 0x00, 0xe0, 0x07,0x06, 0xfc, 0x00, 0x00, 0x80, 0x80, 0x01, 0x00, 0x00, 0x80, 0x00, 0x20, 0xc0, 0xe0, 0x70, 0x06,0x02, 0x80, 0x00, 0x00, 0x00, 0x06, 0x13, 0x00, 0x10, 0x40, 0x80, 0x01, 0x03, 0xfc, 0x30, 0x03,0x02, 0x88, 0x00, 0x01, 0x00, 0x18, 0x02, 0x00, 0x18, 0x03, 0x86, 0x91, 0x63, 0x3e, 0x98, 0x01,0x02, 0x88, 0x12, 0x01, 0x00, 0xe0, 0x01, 0x00, 0x98, 0x33, 0xc6, 0x81, 0x33, 0x0c, 0xd8, 0x00,0x02, 0x08, 0x58, 0x80, 0x00, 0x80, 0x00, 0x00, 0x98, 0x11, 0xc3, 0xcd, 0x23, 0x46, 0x6c, 0x00,0x00, 0x04, 0x44, 0x00, 0x00, 0x00, 0x30, 0x00, 0x8c, 0x11, 0xe1, 0xe1, 0x1a, 0x7b, 0x3c, 0x00,0x04, 0x04, 0x38, 0x00, 0x00, 0x00, 0x7f, 0x00, 0xec, 0x89, 0xf3, 0xe7, 0x03, 0x0f, 0xbe, 0x03,0x18, 0x03, 0x38, 0x01, 0x00, 0xe0, 0x36, 0x00, 0xbc, 0x81, 0xb1, 0x73, 0x0f, 0x0f, 0xfe, 0x7f,0x40, 0x00, 0xf4, 0x00, 0x00, 0x60, 0x72, 0x00, 0xa6, 0xc4, 0xb9, 0x73, 0x87, 0x11, 0x07, 0x00,0x00, 0x00, 0x36, 0x00, 0x00, 0xe0, 0x66, 0x00, 0x9e, 0xc3, 0x98, 0x33, 0x87, 0x19, 0x03, 0x00,0x00, 0x00, 0x20, 0x00, 0x00, 0xc0, 0x7c, 0x00, 0xce, 0xc3, 0x98, 0x31, 0x83, 0x0f, 0x01, 0x00,0x00, 0x00, 0x60, 0x02, 0x00, 0xe0, 0xed, 0x00, 0x4f, 0xc1, 0x8c, 0x11, 0x02, 0x07, 0x01, 0x00,0x00, 0x00, 0x40, 0x03, 0x00, 0xc0, 0xc0, 0x00, 0xc7, 0x41, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x0e, 0x07, 0x00, 0xc0, 0xe1, 0x00, 0xc7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x0e, 0x06, 0x00, 0x80, 0x03, 0x00, 0xc2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0xec, 0x07, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0xfe, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0xdc, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x0c, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x0c, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};// ENDING_BITMAP_TOO_FAST, 128x54pxconst unsigned char ENDING_BITMAP_TOO_FAST [] PROGMEM = {0x00, 0x39, 0x80, 0x7d, 0x02, 0x80, 0x10, 0x00, 0x00, 0x40, 0x00, 0x00, 0x5e, 0x60, 0xe0, 0x1f,0x00, 0x64, 0x00, 0xd6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2d, 0x80, 0xf8, 0x07,0x03, 0x90, 0x01, 0xac, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x81, 0x0e, 0x2c, 0xfe, 0xc0,0x1f, 0x00, 0x06, 0xb0, 0x06, 0x00, 0x02, 0x00, 0x00, 0x00, 0x20, 0x44, 0x05, 0x80, 0x3f, 0xf0,0x7f, 0xfe, 0xff, 0xff, 0x0f, 0x00, 0x00, 0xc0, 0x07, 0x00, 0x17, 0xa0, 0x00, 0xc0, 0x0d, 0xfc,0xbf, 0xff, 0xff, 0xff, 0x3f, 0x00, 0xc0, 0x00, 0x0e, 0x81, 0x03, 0x58, 0x00, 0x70, 0x03, 0xff,0xff, 0x01, 0x00, 0x00, 0x70, 0x04, 0xfc, 0x07, 0x3c, 0xc3, 0x00, 0x18, 0x00, 0x5c, 0xe0, 0x1b,0xdb, 0xfe, 0xff, 0xff, 0xef, 0xff, 0xff, 0x0f, 0xfc, 0x77, 0x10, 0x08, 0x00, 0x12, 0xf8, 0xc0,0xd8, 0xff, 0xff, 0xff, 0x6f, 0xf1, 0xe3, 0xff, 0xff, 0x3f, 0x10, 0x04, 0x80, 0x04, 0x1e, 0xf8,0xc0, 0xff, 0xff, 0xff, 0x6f, 0x00, 0xc0, 0xff, 0xff, 0x0f, 0x50, 0x02, 0x20, 0xc0, 0x03, 0x1f,0xcf, 0xff, 0xff, 0xff, 0x6f, 0x0f, 0xc0, 0xff, 0xff, 0x07, 0x00, 0x00, 0x08, 0x70, 0xe0, 0x01,0xdf, 0x0f, 0x11, 0x11, 0xef, 0x7f, 0xc0, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x18, 0x38, 0x00,0xdb, 0xcf, 0xd5, 0x5d, 0x6f, 0xfe, 0xff, 0xff, 0xff, 0x07, 0x20, 0x00, 0x00, 0x03, 0x03, 0x00,0xc0, 0x9f, 0x11, 0x51, 0x6e, 0xfc, 0xff, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x40, 0x40, 0x00, 0x00,0xc1, 0x7f, 0xdd, 0x5d, 0x6f, 0xfc, 0x07, 0xff, 0xff, 0x0f, 0x10, 0x00, 0x00, 0x00, 0x00, 0x70,0xdf, 0x6f, 0xdd, 0x5d, 0x6f, 0xfc, 0x00, 0xfe, 0xff, 0x1f, 0x4a, 0x00, 0x00, 0x00, 0x00, 0x03,0xdf, 0x9f, 0x1d, 0x91, 0xef, 0x3f, 0x00, 0xfc, 0xff, 0xdf, 0x4f, 0x00, 0x00, 0x00, 0x30, 0x00,0xdf, 0xff, 0xff, 0xff, 0xef, 0x07, 0x00, 0xfe, 0xf0, 0xc7, 0x47, 0x00, 0x00, 0x00, 0x01, 0x00,0xc0, 0x7f, 0x4b, 0xc5, 0x6f, 0x00, 0x1e, 0x3f, 0x00, 0xd0, 0x1f, 0x00, 0x00, 0x10, 0x00, 0xe0,0xc1, 0x7f, 0x4b, 0xed, 0x6f, 0x00, 0xe0, 0x0f, 0x00, 0xf0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00,0xc0, 0x7f, 0x0b, 0xed, 0x6f, 0x00, 0x00, 0x00, 0x00, 0xdc, 0xff, 0x00, 0x00, 0x00, 0x00, 0xc0,0xc0, 0x7f, 0x0b, 0xed, 0x6f, 0x00, 0x00, 0x00, 0x00, 0xce, 0xc3, 0x01, 0x00, 0x00, 0x80, 0x1f,0xdf, 0x7f, 0x0b, 0xed, 0x6f, 0x00, 0x00, 0x00, 0x80, 0xdf, 0x03, 0x10, 0x00, 0x00, 0x00, 0xc0,0xdf, 0x7f, 0x2a, 0xed, 0x6f, 0x00, 0x00, 0x00, 0x60, 0xf8, 0x3f, 0x08, 0x00, 0x00, 0xe0, 0xff,0xdf, 0xff, 0x0f, 0xff, 0x6f, 0x00, 0x00, 0x00, 0x30, 0x2c, 0xf0, 0x07, 0x00, 0xf0, 0xff, 0x07,0xdf, 0xff, 0x03, 0xf8, 0x6f, 0x00, 0x00, 0x00, 0x38, 0x1c, 0x68, 0x04, 0x00, 0x00, 0x00, 0x00,0xc3, 0xff, 0x01, 0xf0, 0x6f, 0x00, 0x00, 0x00, 0xbe, 0x9f, 0x0f, 0x04, 0x00, 0x00, 0x00, 0x00,0xdf, 0xff, 0x00, 0xe0, 0x6f, 0x00, 0x00, 0x80, 0x1d, 0x1f, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00,0xdf, 0xff, 0x00, 0xe0, 0x6f, 0x00, 0x00, 0xc0, 0x1d, 0x0e, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00,0xc0, 0xff, 0x00, 0xe0, 0x6f, 0x00, 0x00, 0xc0, 0x8f, 0x07, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00,0xc0, 0xff, 0x00, 0xe0, 0x6f, 0x00, 0x00, 0xc0, 0x17, 0x07, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00,0xd8, 0xff, 0x00, 0xf0, 0x6f, 0x00, 0x00, 0xd0, 0xc1, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,0xc0, 0xcf, 0x0c, 0x76, 0x6f, 0x00, 0x00, 0x70, 0xa0, 0x66, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00,0xc0, 0xcf, 0x9c, 0x77, 0x6e, 0x00, 0x00, 0x18, 0xa0, 0x1e, 0x00, 0x00, 0xc0, 0x3f, 0x00, 0x00,0xc0, 0x8f, 0x9c, 0x27, 0x6f, 0x00, 0x00, 0x08, 0x4c, 0x06, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x00,0xd0, 0x0f, 0x4d, 0x16, 0x6e, 0x00, 0x00, 0x00, 0x41, 0x07, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff,0xc3, 0x0f, 0x41, 0x08, 0x6e, 0x00, 0x00, 0x48, 0x00, 0x04, 0x00, 0x00, 0x30, 0x00, 0x00, 0xff,0xc0, 0xff, 0x07, 0xfc, 0x6f, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x08, 0xc0,0xdf, 0xff, 0x07, 0xfe, 0x6f, 0x02, 0x00, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x78, 0x00, 0x03,0xdf, 0xff, 0x1b, 0xfb, 0x6f, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x80, 0x0f, 0x60,0xdf, 0x3f, 0x98, 0x83, 0x6f, 0x00, 0x00, 0x40, 0x04, 0x00, 0x00, 0x00, 0x00, 0x20, 0xfc, 0x01,0xc0, 0x7f, 0xf8, 0xc3, 0x6f, 0x00, 0x00, 0x80, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe3, 0x3f,0xdc, 0xff, 0xfc, 0xe7, 0x6f, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x40, 0x00, 0x38, 0xfe,0xdb, 0xfe, 0xff, 0xff, 0x6f, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xc0, 0xf3,0xff, 0x01, 0x00, 0x00, 0xf0, 0x3c, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x3e,0xff, 0xff, 0xff, 0xff, 0x3f, 0x70, 0x04, 0xc0, 0x1f, 0x00, 0x00, 0x00, 0x02, 0x60, 0x00, 0xf0,0x7f, 0xff, 0xff, 0xff, 0x1f, 0xf0, 0x0f, 0x60, 0x2f, 0x00, 0x00, 0x00, 0x08, 0x80, 0x03, 0x81,0x1f, 0x04, 0xff, 0xff, 0x7f, 0xf8, 0x7f, 0x20, 0x1c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x1e, 0x08,0xc3, 0xe0, 0x07, 0x00, 0xff, 0xff, 0xff, 0x20, 0x0c, 0x00, 0x00, 0x00, 0xc0, 0x00, 0xf0, 0x40,0x38, 0xfe, 0x01, 0x90, 0xff, 0xff, 0xff, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x80, 0x03, 0xc0, 0x07,0xc7, 0x7f, 0xff, 0x80, 0xff, 0xff, 0xff, 0xcf, 0x20, 0x00, 0x00, 0x00, 0x08, 0x0e, 0x10, 0x3f,0xf8, 0x9f, 0xf8, 0xff, 0xff, 0xff, 0xff, 0x4f, 0x40, 0x00, 0x00, 0x00, 0x01, 0x18, 0x40, 0xfc,0xff, 0x07, 0xf8, 0xff, 0xff, 0xff, 0x3f, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xf3,0xff, 0x00, 0xf2, 0xff, 0xff, 0xff, 0x3f, 0x20, 0x40, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x8c};// ENDING_BITMAP_MISSED_MOTHER_SHIP, 128x54pxconst unsigned char ENDING_BITMAP_MISSED_MOTHER_SHIP [] PROGMEM = {0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x1f, 0x80, 0xc0, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0xfe, 0xe3, 0xff, 0x7f, 0x1f, 0xf9, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x40, 0x80, 0xff, 0x07, 0x10, 0x50, 0xcf, 0x3c, 0x2c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0xff, 0xcf, 0x00, 0x03, 0x20, 0xfc, 0xff, 0xff, 0x7f, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00,0xff, 0x7f, 0xe0, 0x07, 0x30, 0x3c, 0xf8, 0xdf, 0xdf, 0x87, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00,0xff, 0x3f, 0x00, 0xfe, 0x01, 0x1e, 0x80, 0x87, 0xf8, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00,0xff, 0x1f, 0xfb, 0x0f, 0x00, 0x1f, 0x80, 0x33, 0xfb, 0xfb, 0xfe, 0x01, 0x00, 0x00, 0x00, 0x00,0x1c, 0xbf, 0xfd, 0x13, 0x9c, 0x1f, 0xc0, 0xad, 0xff, 0xff, 0xff, 0xff, 0x07, 0x02, 0x00, 0x00,0x04, 0x40, 0xfe, 0x09, 0xde, 0x87, 0xc3, 0xff, 0xdf, 0xfb, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00,0x04, 0x20, 0xff, 0x04, 0xee, 0xff, 0x7f, 0xff, 0xdf, 0xfe, 0xdf, 0xff, 0xff, 0x01, 0x00, 0x00,0x04, 0xd0, 0x7f, 0x02, 0xe2, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00,0x04, 0x00, 0x3c, 0x01, 0x02, 0x20, 0xb0, 0xdf, 0x06, 0x07, 0x00, 0x00, 0xe0, 0x01, 0x00, 0x00,0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x24, 0x02, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0xc0, 0x03, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0e, 0x00, 0x80, 0x00, 0x02, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x0e, 0xc0, 0xf6, 0xff, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x06, 0xfb, 0xff, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x86, 0x3f, 0x00, 0x00, 0xfe, 0x00, 0x00,0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x06, 0x0e, 0x00, 0x00, 0xe7, 0xff, 0x01, 0x00,0x00, 0x00, 0x00, 0x80, 0x87, 0x07, 0x00, 0x80, 0x0f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x03, 0x00,0x00, 0x00, 0x00, 0x00, 0x80, 0x0f, 0x01, 0x00, 0xf8, 0x01, 0x00, 0x00, 0xfe, 0xff, 0x07, 0x00,0x00, 0x00, 0x08, 0x00, 0x80, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x01, 0xef, 0x07,0x00, 0x00, 0x00, 0x80, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x3f, 0xfe, 0x03,0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x00, 0x04,0x00, 0xf8, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x8f, 0x01, 0x02,0x00, 0xfe, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,0x80, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,0xc0, 0x0f, 0xf0, 0xf3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44,0xe0, 0x03, 0xc0, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x8f, 0x0f, 0x30,0xf0, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0xcd, 0xf3, 0x7f, 0x00,0x70, 0xf0, 0x0f, 0x9f, 0x03, 0x00, 0x00, 0x00, 0x38, 0xf0, 0x00, 0xc0, 0xff, 0x71, 0x1f, 0x00,0x38, 0xf8, 0x1f, 0xe6, 0x07, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x07, 0x00, 0x30, 0xbe, 0x1f, 0x00,0x38, 0xfe, 0x3f, 0xf1, 0x03, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x0f, 0x00, 0x00, 0xac, 0x3f, 0x00,0x1c, 0x1e, 0x78, 0xfc, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x1f, 0x00, 0x23, 0x1f, 0x33, 0x00,0x1c, 0x0f, 0x30, 0x38, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x3f, 0x00, 0xa0, 0x27, 0x26, 0x00,0x1c, 0x07, 0xc0, 0x38, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x07, 0x3c, 0x00, 0x20, 0x83, 0x46, 0x00,0x8e, 0xc3, 0xe3, 0x38, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x78, 0x40, 0xb1, 0x01, 0x0c, 0x00,0x8e, 0xe3, 0xc1, 0x31, 0x1c, 0xc6, 0x7c, 0x7c, 0x1e, 0xff, 0x73, 0x60, 0xc4, 0x06, 0x30, 0x01,0x8e, 0x63, 0xc6, 0x31, 0x3c, 0xe7, 0x7e, 0x7e, 0x1e, 0xf8, 0x77, 0x00, 0x00, 0x40, 0x40, 0x00,0x8e, 0xe3, 0xc7, 0x31, 0x3c, 0x77, 0x6e, 0x6e, 0x0e, 0x00, 0xf4, 0x1c, 0x00, 0x00, 0x2e, 0x00,0x8e, 0xc3, 0xe3, 0x38, 0xbc, 0x77, 0x6f, 0x6f, 0x0e, 0x00, 0xc0, 0x63, 0x00, 0x00, 0x00, 0x01,0x1c, 0x07, 0xe0, 0x38, 0xfc, 0x77, 0x0f, 0x0f, 0x0e, 0x00, 0x80, 0xc2, 0x00, 0x00, 0x00, 0x00,0x1c, 0x0f, 0xf0, 0x38, 0xfc, 0x77, 0x3e, 0x3e, 0x0e, 0x00, 0x00, 0xf2, 0x00, 0x00, 0x00, 0x00,0x1c, 0x1e, 0x78, 0x3c, 0xfc, 0x7f, 0x7c, 0x7c, 0x06, 0x00, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00,0x38, 0xfc, 0x3f, 0x1c, 0xfc, 0x7f, 0x70, 0x70, 0x07, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,0x78, 0xf8, 0x1f, 0x1e, 0xfc, 0x7e, 0x73, 0x73, 0x07, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,0x70, 0xe0, 0x07, 0x0f, 0xfc, 0x7e, 0x7f, 0x7f, 0x07, 0x00, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00,0xf0, 0x01, 0x80, 0x07, 0x1c, 0x7f, 0x3f, 0x3f, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0xe0, 0x03, 0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00,0xc0, 0x0f, 0xf0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0xfe, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
For posterity, my best landing time is 91.204 seconds.
Day 30: Home sweet home! - 12/15/2025
Well, we did it. We survived the crash landing, fixed our battery, buffed up security, propelled our ship to the ocean surface, made it into orbit, and then made it to the mothership.
This course was a lot of fun. I don't even remember when this kit crossed my path and I purchased it, but I am glad that I did, and extra happy that I finally committed to doing it over the last couple of months. I actually stuck to it pretty regularly, minus a week where I went out of town for a work trip. When it comes to any course or project, I always feel like momentum is the greatest benefit and the hardest thing to lose.
I definitely feel a lot more comfortable with basic Arduino connections, breadboards and jumper wires. It was a really cool, gradual progression from brass tacks of writing code to light up simple LEDs to using libraries with complex hardware like the OLED screen and the 7 segment display.
I wish I had gotten a little more work with the different resistors. From what I can tell all we used were four 220k Ohm resistors, one 1000k Ohm resistor, three 10k Ohm resistors, and we didn;t touch the 100k Ohm resistors at all; the also kit came with a few extra LED bulbs we didn't use. But beyond that (and a few extraneous jumper wires), we used just about everything in the adventure kit.
It took me about a week and a half to figure out a good approach for each lesson:
- Read through the commented code first
- Analyze the wiring diagram and wire it up myself
- Hand write the code myself, following along the provided code; compile it and run it
- Other than the bitmaps in these last couple of days, there was only one day where I just copied and pasted the whole thing, and I called that out in this blog post
- Finally, watch the video for an explainer of the the software and hardware that I didn't grasp going through it myself
The videos were each 35 minutes or shorter, so all of these extra steps definitely made this a longer time commitment (especially the last couple of days). But overall I feel like I have a decent grasp on the course material. I can look through the code and offer an explanation for what each piece is doing, and I can follow the current flow of the circuits.
From here I want to keep learning how to build circuits. I have a couple of other small kits - alarm clocks, theremins, that kind of thing. Those require soldering. I also have a guitar pedal kit I've been wanting to try out.
I also have Electronics for Beginners by Jonathan Bartlett on the way. A few times in this course, for the creative days, I designed my own circuits and that felt extremely powerful. But I still feel very limited, and a few more projects under my belt might get the creative juices flowing a bit more.
Lastly, I feel like this course barely scratched the surface of what an Arduino can do. There are so many other pins and components on the board that we didn't touch, and it feels like I've only taken a small peek at a vast world of possibility.
Anyway, for a small first step into the hardware world, this was pretty fun. Over and out.