Take a look through the iterations of the Super Smash Board
In our first iteration, we intended on using a full size breadboard and space the buttons out so that a hand can rest all 5 fingers comfortably.
Check out our Python and Arduino C++ code for the inner workings of the Super Smash Board:
#Python code to move and control cursor from button inputs
from alert import start, cursor_selection
import serial
from serial import Serial
ser = serial.Serial('COM3', 9600)
# Pyautogiu is a downloadable library that has access
# to cursor controls and commmands (ie. click, scroll, etc.)
# Serial is a common API ised to read serial outputs from an arduino.
# ------------------------------------------------------------
start()
while True:
try:
# Reads line from serial output
ser_bytes = str(ser.readline(1000))
# Puts this value into a reaedable format
cursor_selection(ser_bytes)
except RuntimeError as error:
continue
//C++ code to take button inputs and return the correct mouse process
const int pinButton1 = 7;
const int pinButton2 = 6;
const int pinButton3 = 5;
const int pinButton4 = 4;
const int pinButton5 = 3;
void setup() {
Serial.begin(9600);
}
void loop() {
int stateButton1 = digitalRead(pinButton1);
int stateButton2 = digitalRead(pinButton2);
int stateButton3 = digitalRead(pinButton3);
int stateButton4 = digitalRead(pinButton4);
int stateButton5 = digitalRead(pinButton5);
if (stateButton1 == 1) {
Serial.println("BUTTON 1 WAS PRESSED");
} else if (stateButton2 == 1) {
Serial.println("BUTTON 2 WAS PRESSED");
} else if (stateButton3 == 1){
Serial.println("BUTTON 3 WAS PRESSED");
} else if (stateButton4 == 1) {
Serial.println("BUTTON 4 WAS PRESSED");
} else if (stateButton5 == 1) {
Serial.println("BUTTON 5 WAS PRESSED");
}
delay(100);
}