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> | |
void writeI2CRegister8bit(int addr, int value) { | |
Wire.beginTransmission(addr); | |
Wire.write(value); | |
Wire.endTransmission(); | |
} | |
unsigned int readI2CRegister16bit(int addr, int reg) { | |
Wire.beginTransmission(addr); |
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
const int resetPin = 38; | |
void setup() { | |
Serial.begin(115200); | |
Serial.println("Starting WiFi"); | |
Serial1.begin(9600); | |
pinMode(resetPin, OUTPUT); |
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
float panMax = 540; | |
float tiltMax = 270; | |
void setRotate(int channel, float deg, float axisMax) { | |
float val = deg*255.0; | |
int coarse = floor(val); | |
int fine = round((val-coarse)*axisMax/fineMax); | |
dmxMsg(channel, coarse); |
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
import processing.video.*; | |
Capture feed; | |
BlurBox bb[] = new BlurBox[5]; | |
void setup() { | |
size(320, 240); | |
feed = new Capture(this, 320, 240, Capture.list()[0]); | |
feed.start(); |
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
int padPins[] = { | |
0}; | |
#define THRESHOLD 20 | |
#define WINDOW 10 | |
#define NUM_PADS 1 | |
struct Pad { | |
bool sampling; | |
int pin, value, peak; | |
}; |
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
package com.freefallhighscore.circles; | |
import android.app.Activity; | |
import android.graphics.Bitmap; | |
import android.graphics.Canvas; | |
import android.graphics.Paint; | |
import android.graphics.RectF; | |
import android.os.Bundle; | |
import android.os.Handler; |
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
import android.app.Activity; | |
import android.os.Bundle; | |
import android.widget.ListView; | |
import android.widget.SimpleAdapter; | |
import java.util.ArrayList; | |
import java.util.HashMap; | |
public class MyCustomListView extends Activity{ | |
static final ArrayList<HashMap<String,String>> myList = |
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
void setup(){ | |
Serial.begin(57600); | |
Serial.print("\r\n+INQ=1\r\n"); // Begin Inquiry | |
delay(500); | |
} | |
void loop(){ | |
Serial.println("Hello World"); | |
delay(1000); |
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
// Configuration commands for Bluetooth Bee | |
void setup(){ | |
Serial.begin(38400); | |
Serial.print("\r\n+STWMOD=0\r\n"); // Slave device | |
delay(200); | |
Serial.print("\r\n+STBD=57600\r\n"); // Baud rate | |
delay(200); |
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
// FourSquare Checkin | |
// EuroRSCG New York | |
// Emerging Technologies Lab | |
#include <SPI.h> | |
#include <Ethernet.h> | |
#include <EthernetDNS.h> | |
#include <EthernetDHCP.h> | |
#include <Wire.h> | |
#include <SL018.h> |
NewerOlder