mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-30 16:24:09 +03:00
Added new stub code
This commit is contained in:
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);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user