 #include <SPI.h>
 #include <Adafruit_GFX.h>
 #include <Adafruit_SSD1306.h>
+
+// flag for reading/entering right to left or left to right
+// true = right to left (least significant bit to most)
+// false = left to right (most significant bit to least)
+#define USE_RIGHT_TO_LEFT false
 
 // button pins
 #define BUTTON_ZERO 8

// deals with a keypress
void keypress(int val)
{
	// keep showing last value until next keypress
	if (index == 0) { keyStroke = 0; }
	keyStroke += val << index;
	index++;
	if (index > 7)
	{
		//Keyboard.write((char)keyStroke);
		sendVal((char)keyStroke);
		index = 0;
	}
}

void sendVal(char val)

	display.clearDisplay();
	display.setCursor(0, 0);
	display.setTextColor(WHITE);
	display.print("Binary Keyboard!\ngithub.com/\n     Chris-Johnston");
	display.display();
	delay(1000);
	// wipes the screen away with an effect
