Skip to content

Instantly share code, notes, and snippets.

View connornishijima's full-sized avatar

Lixie Labs connornishijima

View GitHub Profile
//*****************************************************************************
// OUTPUT of MIDUINO 3.1 for Arduino Mega (6 Timers)
// Processed in just 0.138 seconds by www.world.emotiscope.co/miduino
//*****************************************************************************
// Use of this code is subject to the
// Creative Commons Attribution Non-Commercial license:
// https://creativecommons.org/licenses/by-nc/3.0/us/
// Midi to Arcuino C conversion by Len Shustek
/*
* Arduino Anti-GPS Silliness
* by Connor Nishijima 2016
*
* By reading the frequency of AC cycles in your house using an open analog pin,
* I can tell you for sure what countries you AREN'T in. Pretty god damn useless,
* but fun, nonetheless.
*
* You'll need an Arduino Mega to fit the array of Strings below, Uno doesn't cut it
* even with use of PROGMEM. The Sketch is also written to use the Seeed Studio TFT
const byte score [] PROGMEM = {
// YOUR BYTE STREAM GOES HERE!
};
const byte voicePins[] PROGMEM = {2, 3, 4, 5, 6, 7};
byte voiceEnabled[6];
byte voiceType[6];
const byte voicePins[] PROGMEM = {2, 3, 4, 5, 6, 7};
byte voiceEnabled[6];
byte voiceType[6];
byte states[6];
byte noiseCount[6];
unsigned long start[6];
unsigned int periods[6];
unsigned long nextFlip[6];
byte noise = 0;
const byte voicePins[] PROGMEM = {2, 3, 4, 5, 6, 7};
byte voiceEnabled[6];
byte voiceType[6];
byte states[6];
byte noiseCount[6];
unsigned long start[6];
unsigned int periods[6];
unsigned long nextFlip[6];
byte noise = 0;
const byte voicePins[] PROGMEM = {2, 3, 4, 5, 6, 7};
byte voiceEnabled[6];
byte voiceType[6];
byte states[6];
byte noiseCount[6];
unsigned long start[6];
unsigned int periods[6];
unsigned long nextFlip[6];
byte noise = 0;
@connornishijima
connornishijima / lixie_installer.py
Created January 1, 2017 09:46
Installer script for Lixie Python library!
import os
import time
logo = ""
logo += "888 8888888 Y88b d88P 8888888 8888888888\n"
logo += "888 888 Y88b d88P 888 888 \n"
logo += "888 888 Y88o88P 888 888 \n"
logo += "888 888 Y888P 888 8888888 \n"
logo += "888 888 d888b 888 888 \n"
logo += "888 888 d88888b 888 888 \n"
#include "digitalwritefast.h"
const uint8_t PROGMEM score[] = {0x90,83,0x91,77,0x92,66,0x93,72,1,212,0x80,0x81,0x82,0x83,0,31,0x90,82,0x91,65,0x92,71,0x93,76,1,212,0x80,0x81,0x82,0x83,0,31,0x90,81,0x91,64,0x92,75,0x93,70,1,212,0x80,0x81,0x82,0x83,0,31,0x90,74,0x91,63,0x92,69,0x93,80,1,212,0x81,0x82,0x83,0,31,0x91,79,0x92,73,0x93,62,0x94,68,0x80,1,25,0x81,0x82,0x83,0x84,0,52,0x90,78,0x91,72,0x92,67,0x93,61,1,56,0x80,0x81,0x82,0x83,0,20,0x90,60,0x91,71,0x92,66,0x93,77,10,242,0x82,0,31,0x80,0x81,0x83,1,244,0x90,67,0x91,62,0,68,0x80,0x81,0,34,0x90,67,0x91,62,0,68,0x80,0x81,0,34,0x90,68,0x91,63,0,68,0x80,0x81,0,34,0x90,67,0x91,62,0,68,0x80,0x81,0,34,0x90,67,0x91,62,0,68,0x80,0x81,0,34,0x90,63,0x91,68,0,68,0x80,0x81,0,34,0x90,67,0x91,62,0,68,0x80,0x81,0,34,0x90,67,0x91,62,0,68,0x80,0x81,0,34,0x90,68,0x91,63,0,68,0x80,0x81,0,34,0x90,67,0x91,62,0,68,0x80,0x81,0,34,0x90,62,0x91,67,0,68,0x80,0x81,0,34,0x90,68,0x91,63,0,68,0x80,0x81,0,34,0x90,62,0x91,67,0,68,0x80,0x81,0,34,0x90,63,0x91,68,0,68,0x80,0x81,0,34,0x90,67,0x
@connornishijima
connornishijima / sstv_test.ino
Created March 2, 2020 02:20
ROBOT12 BW on Arduino Uno w/ tone() function and timers! ---- (320x120 image is 1-bit BW stored in PROGMEM bytes)
volatile bool broadcast_done = false;
volatile uint8_t bit_index = 0;
volatile uint16_t byte_index = 0;
volatile uint8_t sync_count = 0;
uint8_t pixel_bit = 0;
uint8_t pixel_byte = 0;
bool bit_changed = false;
const uint8_t image[4800] PROGMEM = {
0, 15, 143, 255, 255, 255, 255, 255, 255, 255, 0, 31, 254, 0, 63, 252, 7, 128, 0, 0, 0, 0, 0, 15, 143, 255, 255, 255, 255, 255, 255, 255, 0, 31, 254, 0, 63, 252, 7, 128, 0, 30, 7, 128, 15, 255, 0, 31, 255, 255, 128, 15, 255, 0, 31, 254, 14, 0, 0, 0, 0, 0, 0, 31, 7, 128, 15, 255, 0, 31, 255, 255, 128, 15, 255, 0, 15, 254, 15, 0, 0, 124, 3, 192, 7, 255, 128, 15, 255, 255, 192, 3, 255, 128, 7, 255, 60, 0, 0, 0, 0, 0, 0, 60, 3, 192, 7, 255, 128, 15, 255, 255, 224, 3, 255, 128, 7, 255, 28, 0, 0, 248, 1, 224, 3, 255, 192, 7, 255, 255, 240, 1, 255, 192, 3, 255, 248, 0, 0, 0, 0, 0, 0, 248, 1, 224, 1, 255, 192, 3, 255, 255, 240, 1, 255, 224, 3, 255, 248, 0, 255, 240, 1, 240, 1, 255, 224, 3, 255, 255, 248, 0, 255, 240, 1, 255, 240, 0, 255, 255, 255, 255, 255, 240, 0, 240,
# Pixie driver test abusing SPI bus for clean data transfer at any speed
# If this works, let me know so I can simplify usage!
# Currently it sends a raw byte array below to render images to connected
# Pixies, flashing between a PIX_SMILE icon and a solid color at a visible rate.
# -------------------------------------------------------------------------
# SPI must be enabled using "sudo raspi-config" under "Interfacing Options"
# -------------------------------------------------------------------------
import spidev