Skip to content

Instantly share code, notes, and snippets.

@gibbedy
gibbedy / FastLED Beatsin16 Testing
Created November 26, 2017 13:11
This is how I think I'm zeroing beatsin16(..) value by passing it a timebase of GET_MILLIS() and a phase shift of 49151
//I have a test matrix setup with 5 x rows of 10 ws2811 LED's all wired left to right.
//I needed a way to zero beatsin16 for sinelon type effects and found through testing that a phase shift of 49151 does the job.
#include "FastLED.h"
#define NUM_LEDS 50
#define POWER 50 //power I want to limit my leds to.
// Data pin that led data will be written out over
@gibbedy
gibbedy / gist:dabcfdae1a8e1adb67ba0a78087e6e3c
Last active November 22, 2017 13:47
Example program to communicate between two teensy 3.2's using EasyTransfer. Load this on two teensy 3.2's that are connected by serail1 (tx->rx, rx->tx, gnd->gnd). uncomment one define to make that the sender. This simply means only one of the teensys will initiate what I'm calling ping pong comms.140 byte messages will then be sent back and for…
//easytransfer test using 2 teensy3.2's
//define one as sender (i think i need todo this)
//Now using RS485 half duplex
//**********************************************
#define NUMBER_OF_EASYTRANSFER_INTS 128
//#define IS_SENDER true
//**********************************************
#ifndef IS_SENDER