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
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 |
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 <Esplora.h> | |
int light; | |
int temp; | |
int slider; | |
void setup() { | |
Serial.begin(9600); | |
Keyboard.begin(); | |
} |
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 <Esplora.h> | |
int hammer; | |
int left; | |
void setup() { | |
Serial.begin(9600); | |
Keyboard.begin(); | |
} | |
void loop() { |
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 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 |
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 <Esplora.h> | |
#include <ScratchSensors.h> | |
ScratchSensors Scratchboard; | |
void setup() { | |
Scratchboard.init(); | |
} | |
void loop() { |
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
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 |
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
/* | |
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> |