mirror of
https://github.com/arduino/Arduino.git
synced 2024-12-02 13:24:12 +01:00
Added new stub code
This commit is contained in:
parent
12604b1fdc
commit
27d05285b7
12
build/shared/dist/examples/Stubs/AnalogReadSerial/AnalogReadSerial.pde
vendored
Normal file
12
build/shared/dist/examples/Stubs/AnalogReadSerial/AnalogReadSerial.pde
vendored
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
|
||||||
|
void setup() {
|
||||||
|
Serial.begin(9600);
|
||||||
|
}
|
||||||
|
|
||||||
|
void loop() {
|
||||||
|
int sensorValue = analogRead(0);
|
||||||
|
Serial.println(sensorValue, DEC);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
13
build/shared/dist/examples/Stubs/AnalogReadWrite/AnalogReadWrite.pde
vendored
Normal file
13
build/shared/dist/examples/Stubs/AnalogReadWrite/AnalogReadWrite.pde
vendored
Normal 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);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
9
build/shared/dist/examples/Stubs/BareMinumum/BareMinumum.pde
vendored
Normal file
9
build/shared/dist/examples/Stubs/BareMinumum/BareMinumum.pde
vendored
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
void setup() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void loop() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
13
build/shared/dist/examples/Stubs/DigitalReadSerial/DigitalReadSerial.pde
vendored
Normal file
13
build/shared/dist/examples/Stubs/DigitalReadSerial/DigitalReadSerial.pde
vendored
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
|
||||||
|
void setup() {
|
||||||
|
Serial.begin(9600);
|
||||||
|
pinMode(2, INPUT);
|
||||||
|
}
|
||||||
|
|
||||||
|
void loop() {
|
||||||
|
int sensorValue = digitalRead(2);
|
||||||
|
Serial.println(sensorValue, DEC);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
12
build/shared/dist/examples/Stubs/DigitalReadWrite/DigitalReadWrite.pde
vendored
Normal file
12
build/shared/dist/examples/Stubs/DigitalReadWrite/DigitalReadWrite.pde
vendored
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
|
||||||
|
void setup() {
|
||||||
|
pinMode(13, OUTPUT);
|
||||||
|
}
|
||||||
|
|
||||||
|
void loop() {
|
||||||
|
int switchValue = digitalRead(2);
|
||||||
|
digitalWrite(13, switchValue);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
9
build/shared/dist/examples/Stubs/HelloWorld/HelloWorld.pde
vendored
Normal file
9
build/shared/dist/examples/Stubs/HelloWorld/HelloWorld.pde
vendored
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
void setup() {
|
||||||
|
Serial.begin(9600);
|
||||||
|
}
|
||||||
|
|
||||||
|
void loop() {
|
||||||
|
Serial.println("Hello World!");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user