Skip to content

Instantly share code, notes, and snippets.

/*
* FloraGamepad
* Code for LCD Gaming Hoodie with 10x20 LED sequin display driven by two HT16K33. Controlled using capacative buttons hooked up to a 2nd microcontroller.
* This code is for the microcontroller that reads capacitive button presses, and stores the values to be read by the master I2C that runs the main program.
* Coded by Sofox
* Twitter: @TheSofox
*
* Code based on: http://learn.adafruit.com/plush-game-controller/
*/
/*
* PantherBack
* Code for LCD Gaming Hoodie with 10x20 LED sequin display driven by two HT16K33. Controlled using capacative buttons hooked up to a 2nd microcontroller.
* I2C used to communicate with LED drivers and gamepad controller
* Coded by Sofox
* Twitter: @TheSofox
*
*/
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_NeoMatrix.h>
#include <Adafruit_NeoPixel.h>
#define BLACK 0x0000
#define BLUE 0x001F
#define RED 0xF800
#define GREEN 0x07E0
#define CYAN 0x07FF
void setPixel(int x, int y){
int board = 0;
int nx = x;
int ny = y;
if(nx<8 && ny<16){
nx = 7 - x;
board = 0;
}
if(ny>=16){
#line 1 "ClockAdvancePendulum.ino"
/*
Pendulum Digital Clock
By Sofox
*/
#include "Arduino.h"
void setup();
void setSegment(int seg);
void fillLed();
void clearLed();
#include <Servo.h>
Servo myServo;
const int piezo = A0;
const int switchPin =2;
const int yellowLed =3;
const int greenLed = 4;
const int redLed = 5;
int knockVal;
int switchVal;