Skip to content

Instantly share code, notes, and snippets.

View SimpleExampleWithModifiedRange.ino
/*
Connect SCLK, MISO, MOSI, and CSB of ADXL362 to
SCLK, MISO, MOSI, and DP 10 of Arduino
(check http://arduino.cc/en/Reference/SPI for details)
*/
#include <SPI.h>
@annem
annem / gist:73b2a8ff65063cb29024
Last active Aug 29, 2015
Notes from js meetup - Oct 7
View gist:73b2a8ff65063cb29024
function times(x){
return function(y) {
return(x*y);
}
}
//the value you pass in for x will always be trapped in the closure function.
// terminology
// Partial appliction
View EsploraScratchPicoBoard.ino
#include <Esplora.h>
#include <ScratchSensors.h>
ScratchSensors Scratchboard;
void setup() {
Scratchboard.init();
}
void loop() {
View FixItFelixHW.ino
// include Esplora library functions
#include <Esplora.h>
// declare variables used to store sensor data
int hammer;
int left;
// setup() block
// All lines in between { and } are part of the setup block, and run once, at the beginning
View Week2EsploraFixItFelix.ino
#include <Esplora.h>
int hammer;
int left;
void setup() {
Serial.begin(9600);
Keyboard.begin();
}
void loop() {
View Week2EsploraLightTemp.ino
#include <Esplora.h>
int light;
int temp;
int slider;
void setup() {
Serial.begin(9600);
Keyboard.begin();
}
@annem
annem / gist:3183536
Created Jul 26, 2012 — forked from petrockblog/gist:3051568
Download, compile, and install the Broadcom BCM 2835 library for the Raspberry Pi
View gist:3183536
cd;
// wget http://www.open.com.au/mikem/bcm2835/bcm2835-1.5.tar.gz; // My Pi can't figure out this URL
wget http://67.192.60.197/mikem/bcm2835/bcm2835-1.5.tar.gz
tar xvfz bcm2835-1.5.tar.gz;
cd bcm2835-1.5;
./configure;
make;
sudo make install
You can’t perform that action at this time.