jordan harper
/
ServoControl
Control servo motors
SystemFunctions.h@1:d5cc5d977c0d, 2017-02-07 (annotated)
- Committer:
- jordaahh
- Date:
- Tue Feb 07 13:28:32 2017 +0000
- Revision:
- 1:d5cc5d977c0d
- Parent:
- 0:b5ce567b469c
- Child:
- 2:baf8a7b2b150
same code as previous. Updated comments
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
jordaahh | 0:b5ce567b469c | 1 | |
jordaahh | 0:b5ce567b469c | 2 | Servo servo1(p21); // PWM out to servo in first axis (Solar Azimuth) |
jordaahh | 0:b5ce567b469c | 3 | Servo servo2(p22); // PWM out to servo in second axis (Solar Altitude) |
jordaahh | 0:b5ce567b469c | 4 | |
jordaahh | 1:d5cc5d977c0d | 5 | AnalogIn pot(p20); // Linear pot input for manual control [initial circuit] |
jordaahh | 0:b5ce567b469c | 6 | |
jordaahh | 0:b5ce567b469c | 7 | AnalogIn LDR1(p15); // Top Left LDR |
jordaahh | 0:b5ce567b469c | 8 | AnalogIn LDR2(p16); // Top Right LDR |
jordaahh | 0:b5ce567b469c | 9 | AnalogIn LDR3(p17); // Bottom Left LDR |
jordaahh | 0:b5ce567b469c | 10 | AnalogIn LDR4(p18); // Bottom Right LDR |
jordaahh | 0:b5ce567b469c | 11 | |
jordaahh | 0:b5ce567b469c | 12 | float range = 0.00095; // maximum on period set to 0.95ms |
jordaahh | 0:b5ce567b469c | 13 | float position; //= 0.5; // set initial position to middle // can probably take this out?? |