This file contains hidden or 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
# -*- coding: utf-8 -*- | |
# NOTE: The WAV file must be 16bit-PCM format. | |
# It must be encoded at 22050Hz. | |
# Only mono audio files supported at this time. | |
# Steps to create the file in Audacity: | |
# 1) Open the WAV file in Audacity. | |
# 2) If it is stereo, split the Stereo track to mono | |
# 3) Delete one of the channels | |
# 4) Set the Project Rate to 22050Hz | |
# 5) Set the Sample Format to 16-bit PCM |
This file contains hidden or 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
/* | |
SFE_TSL2561 illumination sensor library for Arduino | |
Mike Grusin, SparkFun Electronics | |
This library provides functions to access the TAOS TSL2561 | |
Illumination Sensor. | |
Our example code uses the "beerware" license. You can do anything | |
you like with this code. No really, anything. If you find it useful, | |
buy me a beer someday. |
This file contains hidden or 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
/* | |
SFE_TSL2561 illumination sensor library for Arduino | |
Mike Grusin, SparkFun Electronics | |
This library provides functions to access the TAOS TSL2561 | |
Illumination Sensor. | |
Our example code uses the "beerware" license. You can do anything | |
you like with this code. No really, anything. If you find it useful, | |
buy me a beer someday. |
This file contains hidden or 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 <FatReader.h> | |
#include <SdReader.h> | |
#include <avr/pgmspace.h> | |
#include "WaveUtil.h" | |
#include "WaveHC.h" | |
SdReader card; // This object holds the information for the card | |
FatVolume vol; // This holds the information for the partition on the card | |
FatReader root; // This holds the information for the filesystem on the card | |
FatReader f; // This holds the information for the file we're play |
This file contains hidden or 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 "EmonLib.h" // Include Emon Library | |
EnergyMonitor Emon1; // Create an instance | |
int LedPin = 5; | |
int BasketDownPin = 2; // Will pulse this pin 10ms when the basket drops | |
int BasketUpPin = 3; // Will pulse this pin 10ms when the basket raises | |
double IrmsBase = 0.0; // Baseline current sampled at startup | |
int BaseLen = 5; | |
double Baseline[5]; // History for baseline so we update baseline overtime | |
String States[3] = {"Waiting", "Heating", "Basket"}; |
This file contains hidden or 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
# Call this from casperjs cli like this | |
# casperjs pge_scrape.coffee --user=<your_username> --password=<your_password> | |
# Works on Phantom 1.98 and Casper 1.1 beta | |
casper = require('casper').create | |
viewportSize: {width: 800, height: 600}, | |
pageSettings: {webSecurityEnabled: false} | |
user = casper.cli.get('user') | |
password = casper.cli.get('pass') |
This file contains hidden or 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 <Wire.h> | |
#include "Adafruit_LEDBackpack.h" | |
#include "Adafruit_GFX.h" | |
#include <SPI.h> | |
#include <Adafruit_BLE_UART.h> | |
#include "DHT.h" | |
#define ADAFRUITBLE_REQ 10 | |
#define ADAFRUITBLE_RDY 3 | |
#define ADAFRUITBLE_RST 9 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
#ifndef __PACKET_H__ | |
#define __PACKET_H__ | |
#include <stdint.h> | |
/* IMPORTANT!! | |
This file defines the constants and packet structure for the communication | |
between the router and the dispensers. These values are duplicated in | |
the python code in ui/bartendro/router/driver.py. This should be improved | |
at some point. |
This file contains hidden or 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 "packet.h" | |
#include <stdint.h> | |
#define SYNC_PIN 4 | |
#define BUTTON_PIN 3 | |
void setup() | |
{ | |
Serial.begin(9600); | |
delay(100); |