This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
volatile int state = HIGH; | |
volatile int flag = HIGH; | |
volatile int Aold = 0; | |
volatile int Anew = 0; | |
volatile int Bold = 0; | |
volatile int Bnew = 0; | |
static boolean rotating=false; // debounce management |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define PS2_clockpin PE_2 | |
#define PS2_datapin PE_3 | |
byte read_CLOCK() { | |
return digitalRead(PS2_clockpin); | |
} | |
byte read_DATA() { | |
return digitalRead(PS2_datapin); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// attempt at PS2 implementation | |
// code stolen from http://hippy.blogs.exetel.com.au/index.php?/archives/24-MA2onPC,-a-Trackball-and-a-Stellaris-Launchpad.html | |
#define CHECK_BIT(var,pos) ((var) & (1<<(pos))) | |
#define PS2_clockpin PE_2 | |
#define PS2_datapin PE_3 | |
// possible signal states | |
enum |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Playing around for midi_touch_v2. part 1 (redo 20) | |
* AS1107 on SPI0 connected to 8x8 matrix | |
* Rotary Encoder on ; | |
- PD0 | |
- PD1 (both sides of the rotary) | |
- PD2 to one of the switch pins | |
- rest of the rotary pins to ground |
NewerOlder