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,7 @@ SoftRcPulseOut myservo; // create servo object to control a servo
#define REFRESH_PERIOD_MS 20
#define NOW 1
#define MOY_SUR_1_VALEUR 0
#define MOY_SUR_2_VALEURS 1
@@ -46,8 +47,8 @@ static int ValMoyennee;
val = analogRead(POT_PIN); // reads the value of the potentiometer (value between 0 and 1023)
val = map(val, 0, 1023, 0, 179); // scale it to use it with the servo (value between 0 and 180)
MOYENNE(ValMoyennee,val,TAUX_DE_MOYENNAGE);//If there is lots of noise: average with TAUX_DE_MOYENNAGE
myservo.write(ValMoyennee); // sets the servo position according to the scaled value
myservo.write(ValMoyennee); // 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
}