Skip to content

Instantly share code, notes, and snippets.

View buzztiaan's full-sized avatar
🍑
peachy

buZz buzztiaan

🍑
peachy
View GitHub Profile
@buzztiaan
buzztiaan / menu_graphics.c
Created November 16, 2013 03:01
attempt at a overly graphical menu on a 8x8 led matrix
#include <Energia.h>
#include <SPI.h>
#include "EnergiaMax7219.h"
#include "font2.h"
#define numberofstars 8
#define LEFT 1
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
@buzztiaan
buzztiaan / ps2_synaptics.c
Last active May 15, 2020 00:52
Implementation of synaptics touchpad driver example NON-interrupt driven, just polling!
#define PS2_clockpin PE_2
#define PS2_datapin PE_3
byte read_CLOCK() {
return digitalRead(PS2_clockpin);
}
byte read_DATA() {
return digitalRead(PS2_datapin);
}
@buzztiaan
buzztiaan / ps2.c
Created November 1, 2013 20:31
working PS2 mousedriver for LM4F with energia!
// 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
@buzztiaan
buzztiaan / gist:7260296
Last active December 27, 2015 03:29
as1107 outputting font browser with rotary encoder interrupt based code
/*
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