1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-11-29 10:24:12 +01:00

Added new stub code

This commit is contained in:
Tom Igoe 2009-06-24 21:24:53 +00:00
parent 12604b1fdc
commit 27d05285b7
6 changed files with 68 additions and 0 deletions

View File

@ -0,0 +1,12 @@
void setup() {
Serial.begin(9600);
}
void loop() {
int sensorValue = analogRead(0);
Serial.println(sensorValue, DEC);
}

View File

@ -0,0 +1,13 @@
void setup() {
pinMode(6, OUTPUT);
}
void loop() {
int sensorValue = analogRead(2);
int ledFadeValue = map(sensorValue, 0, 1023, 0, 255);
analogWrite(6, ledFadeValue);
}

View File

@ -0,0 +1,9 @@
void setup() {
}
void loop() {
}

View File

@ -0,0 +1,13 @@
void setup() {
Serial.begin(9600);
pinMode(2, INPUT);
}
void loop() {
int sensorValue = digitalRead(2);
Serial.println(sensorValue, DEC);
}

View File

@ -0,0 +1,12 @@
void setup() {
pinMode(13, OUTPUT);
}
void loop() {
int switchValue = digitalRead(2);
digitalWrite(13, switchValue);
}

View File

@ -0,0 +1,9 @@
void setup() {
Serial.begin(9600);
}
void loop() {
Serial.println("Hello World!");
}