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
root@raspberrypi:/home/pi/sources/nodejs-examples# npm install spi | |
- | |
> spi@0.2.0 install /home/pi/sources/nodejs-examples/node_modules/spi | |
> node-gyp rebuild | |
gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/0.10.40" | |
gyp WARN EACCES attempting to reinstall using temporary dev dir "/home/pi/sources/nodejs-examples/node_modules/spi/.node-gyp" | |
make: Entering directory '/home/pi/sources/nodejs-examples/node_modules/spi/build' | |
CXX(target) Release/obj.target/_spi/src/spi_binding.o | |
In file included from ../src/spi_binding.cc:19:0: |
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
# From: http://stackoverflow.com/a/8842339 | |
# | |
# generic AVR makefile | |
# | |
# (c) July 2011 - Manuel Odendahl - wesen@ruinwesen.com | |
# | |
# include this into your main Makefile, after having defined TARGET and TARGET_OBJS | |
all: $(TARGET).hex |
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
// Plugged to socket D4 | |
int leftSwitch = 4; | |
int rightSwitch = 5; | |
void setup() { | |
Serial.begin(9600); | |
} | |
void loop() { | |
String switchStatus = (String)digitalRead(leftSwitch)+(String)digitalRead(rightSwitch); |