Skip to content

Instantly share code, notes, and snippets.

View partlyhuman's full-sized avatar

Roger Braunstein partlyhuman

View GitHub Profile
@partlyhuman
partlyhuman / rotary_encoder_volume_power.ino
Last active March 12, 2024 19:21
Power/media button for arcade cabinet
//
// Connect a rotary encoder to pins 2, 3, 4
// Made for a MAME cabinet to act as a volume controller
// Adds additional functions when encoder button depressed
//
// Arduino libraries required:
// EncoderTool https://www.arduino.cc/reference/en/libraries/encodertool/
// HID-Project https://www.arduino.cc/reference/en/libraries/hid-project/
//
#include <HID-Project.h>
@partlyhuman
partlyhuman / rotary_encoder_mame.ino
Created January 5, 2023 18:47
DIY Arcade Spinner with Arduino Pro Micro 5V
#include <Mouse.h>
#include <Keyboard.h>
#include "EncoderTool.h"
#include "Bounce2.h"
using namespace EncoderTool;
// #undef P2 for player 1, #define P2 for player 2
#undef P2
#undef DEBUG