This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "application.h" | |
#include "ctrl.h" | |
Ctrl::Ctrl() | |
{ | |
init(); | |
} | |
Ctrl::~Ctrl(){ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define MICROPHONE_PIN A5 | |
#define AUDIO_BUFFER_MAX 8192 | |
int audioStartIdx = 0, audioEndIdx = 0; | |
uint16_t audioBuffer[AUDIO_BUFFER_MAX]; | |
uint16_t txBuffer[AUDIO_BUFFER_MAX]; | |
// version without timers | |
unsigned long lastRead = micros(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define MICROPHONE_PIN A5 | |
#define AUDIO_BUFFER_MAX 8192 | |
int audioStartIdx = 0, audioEndIdx = 0; | |
uint16_t audioBuffer[AUDIO_BUFFER_MAX]; | |
uint16_t txBuffer[AUDIO_BUFFER_MAX]; | |
// version without timers | |
unsigned long lastRead = micros(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*------------------------------------------------------------------------- | |
Spark Core library to control WS2811/WS2812 based RGB | |
LED devices such as Adafruit NeoPixel strips. | |
Currently handles 800 KHz and 400kHz bitstream on Spark Core, | |
WS2812, WS2812B and WS2811. | |
Also supports: | |
- Radio Shack Tri-Color Strip with TM1803 controller 400kHz bitstream. | |
- TM1829 pixels |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "application.h" | |
#define NUM_SENSORS 1 | |
#ifndef OneWire_h | |
#define OneWire_h | |
#include <inttypes.h> | |
// you can exclude onewire_search by defining that to 0 | |
#ifndef ONEWIRE_SEARCH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define publish_delay 10000 | |
#define PUBLISH_TO "some_private_event_1" | |
#define PUBLIC_EVENT "some_public_event_1" | |
unsigned int lastPublish = 0; | |
void setup() { | |
Serial.begin(115200); | |
//the firmware uses the event name to figure out which handler it should toss things to, and doesn't select based on privacy, so we need to also make the event names differ in this example. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SYSTEM_MODE(MANUAL); | |
void setup() { | |
Serial.begin(9600); | |
Serial1.begin(9600); | |
pinMode(D7, OUTPUT); | |
} | |
void loop() { | |
if (Serial1.available()) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int laser = 0; | |
unsigned int lastPublish = 0; | |
bool lastState = false; | |
void setup() { | |
pinMode(A0, INPUT_PULLDOWN); | |
pinMode(D7, OUTPUT); | |
} | |
void loop() { |