Add OLED library - update tiny wire libraries - add support for all PWM channels and PWM on pin 8

This commit is contained in:
Erik Tylek Kettenburg
2015-01-14 18:08:45 -08:00
parent fb93846380
commit 52f444d221
60 changed files with 3285 additions and 710 deletions

View File

@@ -19,6 +19,8 @@ SoftRcPulseOut myservo; // create servo object to control a servo
#define REFRESH_PERIOD_MS 20
#define NOW 1
int val; // variable to read the value from the analog pin
void setup()
@@ -32,6 +34,6 @@ void loop()
val = map(val, 0, 1023, 0, 179); // scale it to use it with the servo (value between 0 and 180)
myservo.write(val); // sets the servo position according to the scaled value
delay(REFRESH_PERIOD_MS); // waits for the servo to get there
SoftRcPulseOut::refresh(); // generates the servo pulse
SoftRcPulseOut::refresh(NOW); // generates the servo pulse Now
}