Skip to content

Instantly share code, notes, and snippets.

@sjsd
sjsd / arduino-serial-blink.ino
Created September 13, 2015 14:00
Les av en verdi vis serial fra Processing og blink en LED like mange ganger.
@sjsd
sjsd / pingled.ino
Last active September 1, 2015 20:26
Example of using Ping (ultrasonic sensor) with Arduino and three LEDs. See more at https://helgejohnsen.wordpress.com/2015/09/01/arduino-og-ping-ultrasonisk-sensor/
const int pingPin = 7;
void setup() {
Serial.begin(9600);
pinMode(2, OUTPUT); // Led red
pinMode(3, OUTPUT); // Led orange
pinMode(4, OUTPUT); // Led green
}
void loop()
@sjsd
sjsd / serial_inpit
Created April 12, 2013 21:13
This is a simple setup to use the serial console in the Arduino Enviroment software. See more details in this blog post http://sjsdlabs.tumblr.com/post/47807176974/serial-input
void setup(){
Serial.begin(9600);
for (int leds = 10; leds < 14; leds++) {
pinMode(leds, OUTPUT);
}
}
void loop (){
if (Serial.available()) {