Skip to content

Instantly share code, notes, and snippets.

View buzztiaan's full-sized avatar
🍑
peachy

buZz buzztiaan

🍑
peachy
View GitHub Profile
@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
@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 / 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);
}
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 / 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
#!/bin/bash
while true; do
OMGMAXYO=128
L32=$[ 1 + $[ RANDOM % $OMGMAXYO ]]
L33=$[ 1 + $[ RANDOM % $OMGMAXYO ]]
L34=$[ 1 + $[ RANDOM % $OMGMAXYO ]]
L35=$[ 1 + $[ RANDOM % $OMGMAXYO ]]
#!/bin/sh
# 2014-07-06
#
# This is the procedure to get oclvanitygen running with AMD Raedon 7xxx
# on a fresh install of Ubuntu 64-bit. (tested with Ubuntu 12.04 and 14.04)
# install tools, dependencies and driver
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) restricted"
// bitcointicker v0.04
// buZz / NURDspace
// libraries used;
//
// * https://github.com/squix78/esp8266-oled-ssd1306
// * https://github.com/tzapu/WiFiManager
#include <ESP8266WiFi.h>
#include <DNSServer.h>
import urllib
import random
import gzip
import time
import os
import re
user_agents = [
'Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11',
'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)',
@buzztiaan
buzztiaan / gist:1021cef65b314099c6fdf90d43e1b95e
Created December 2, 2016 16:54
QX70 stock config (cleanflight 1.13.0)
# version
# Cleanflight/SPRACINGF3EVO 1.13.0 Jun 6 2016 / 00:03:29 (a77bc76)
# dump master
# mixer
mixer QUADX
mmix reset
smix reset