Generates reference based on analog input
Dependents: locomotion_pid_action_refactor_EMG
refGen.h@1:ac2d82dfd334, 2017-10-16 (annotated)
- Committer:
- tvlogman
- Date:
- Mon Oct 16 09:40:22 2017 +0000
- Revision:
- 1:ac2d82dfd334
- Parent:
- 0:5c67195a412d
- Child:
- 2:35c05e7698f5
Eh, nothing changed
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
tvlogman | 0:5c67195a412d | 1 | #ifndef REFGEN_H |
tvlogman | 0:5c67195a412d | 2 | #define REFGEN_H |
tvlogman | 0:5c67195a412d | 3 | |
tvlogman | 0:5c67195a412d | 4 | #include "mbed.h" |
tvlogman | 0:5c67195a412d | 5 | |
tvlogman | 0:5c67195a412d | 6 | class refGen { |
tvlogman | 0:5c67195a412d | 7 | public: |
tvlogman | 0:5c67195a412d | 8 | refGen(PinName); // Constructor sets up the pin to read the reference from |
tvlogman | 0:5c67195a412d | 9 | float getReferencePosition(float maxAngle, bool r_direction); // Gets reference position on specified pin |
tvlogman | 0:5c67195a412d | 10 | |
tvlogman | 0:5c67195a412d | 11 | private: |
tvlogman | 0:5c67195a412d | 12 | AnalogIn refPin; |
tvlogman | 0:5c67195a412d | 13 | }; |
tvlogman | 0:5c67195a412d | 14 | #endif |