Skip to content

Instantly share code, notes, and snippets.

@mpflaga
mpflaga / IrMagicWandDuelNeoPixel.ino
Last active July 2, 2018 17:42
IrMagicWandDuelNeoPixel- code for home made Magic Wand Kiosk receiver, using a Arduino with NeoPixels. It is an upgrade to TinyIRduel.ino
/*
* IrMagicWandDuelNeoPixel: IRrecvDump - dump details of IR codes with IRrecv
* https://gist.github.com/mpflaga/fe91612db2ed75d21489b2e17c08b387
* IR detector/demodulator must be connected to the input RECV_PIN.
* IR Transmitter to JAM must be connected
* schematic https://drive.google.com/open?id=1Sr9TtA06r71xR5ZPSr_fqb461YxncRx6
* Version 0.1 July, 2016
* Author: 2016 Michael P. Flaga
* This is an alternative to the TinyIRduel.ino
@mpflaga
mpflaga / Synner_ET_SdCard
Last active April 15, 2016 13:49
Read a SdCard File and send contents over EasyTransfer library, support hot-swap of SdCard
#include <SPI.h>
#include <SD.h>
#include <EasyTransfer.h>
#define LENGTH_OF_ARRAY(x)((sizeof(x) / sizeof(x[0])))
//create object
EasyTransfer ET;
//Timer
const long intervalFileRead = 5 * 1000; // seconds
#include <EasyTransfer.h>
#define LENGTH_OF_ARRAY(x)((sizeof(x) / sizeof(x[0])))
//create object
EasyTransfer ET;
struct SEND_DATA_STRUCTURE {
//put your variable definitions here for the data you want to send
//THIS MUST BE EXACTLY THE SAME ON THE OTHER ARDUINO
int arraydata[5];
@mpflaga
mpflaga / sparkyvixen.ino
Last active January 23, 2022 15:33
Sketch to daisy chain Arduino Mega's from a PC running Vixen, as to get infinite Cue's.
/*
This sketch is used with Vixen Sequence to allow Arduino's to be daisy chained.
see for details.
http://stackoverflow.com/questions/27172147/arduino-serial-communcation-with-vixen
*/
#define FIRST_IN_CHAIN 1 // set this to 1 for the first in Chain
#define SIZE_OF_ARRAY(X) (sizeof(X)/sizeof(X[0])) //total length divided by length of one element
// As specified in Vixen's General Serial Port Setup "Send a Text Footer"
@mpflaga
mpflaga / DirectDriveLED_CSM58261EG.ino
Last active August 29, 2015 14:10
Arduino sketch to directly drive the pins of a CSM58261EG 8x5 Red/Green LED Matrix
/*
* Show messages on an 8x5 led matrix,
* scrolling from right to left.
*
* Uses FrequencyTimer2 library to
* constantly run an interrupt routine
* at a specified frequency. This
* refreshes the display without the
* main loop having to do anything.
*
@mpflaga
mpflaga / FilePlayer.ino
Created November 23, 2014 15:28
FilePlayer.ino, tweaked to allow space for Leo build.
/**
* \file FilePlayer.ino
*
* \brief Example sketch of using the MP3Shield Arduino driver, with flexible list of files and formats
* \remarks comments are implemented with Doxygen Markdown format
*
* \author Bill Porter
* \author Michael P. Flaga
*
* This sketch listens for commands from a serial terminal (such as the Serial
@mpflaga
mpflaga / 9BitSerial1test
Last active September 16, 2021 02:55
Leonardo or Arduino Micro Using Serial1 to USB Serial where Serial1 supports 9 Bits
// For Leonardo or Arduino Micro Using Serial1 to USB Serial
#define TXB8 0
#define RXB8 1
char buffer[4];
#define buffer_size sizeof(buffer)/sizeof(buffer[0])
int8_t buffer_pos = 0;
void setup() {
//Initialize serial and wait for port to open:
@mpflaga
mpflaga / strstrSerial.ino
Last active August 29, 2015 14:05
Example of looking for specific text from serial input stream
char buffer[5];
#define buffer_size sizeof(buffer)/sizeof(buffer[0])
int8_t buffer_pos = 0;
void setup() {
//Initialize serial and wait for port to open:
Serial.begin(115200);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
}
@mpflaga
mpflaga / MP3ButtonPlayer.ino
Last active December 21, 2015 23:29
Short Example of how to use Bounce Library to control SFEMP3Shield library
/**
* \file MP3ButtonPlayer.ino
*
* \brief Example sketch of using the MP3Shield Arduino driver using buttons,
* with improved debounce library
* \remarks comments are implemented with Doxygen Markdown format
*
* \author Michael P. Flaga
*
* This sketch demonstrates the use of digital input pins used as buttons as
@mpflaga
mpflaga / TinyIRduel.ino
Last active February 14, 2024 18:50
TinyIRdual - code for home made Magic Wand Kiosk reciever, using a DigiSpark (ATtiny85) Arduino
/*
* TinyIRDuel: IRrecvDump - dump details of IR codes with IRrecv
* IR detector/demodulator must be connected to the input RECV_PIN.
* IR Transmitter to JAM must be connected ot
* Version 0.1 July, 2013
* Author: 2013 Michael P. Flaga
*/
//List of wand ID's
#define WAND_RED1 0x1AEDC601