AGH UST MBED part 2
Dependencies: LCD_DISCO_F429ZI mbed BSP_DISCO_F429ZI
stepper.h@4:e48aee3e8d09, 2020-05-21 (annotated)
- Committer:
- matis755
- Date:
- Thu May 21 11:03:32 2020 +0000
- Revision:
- 4:e48aee3e8d09
- Child:
- 5:3c19c3ae6286
Ready without GUI;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
matis755 | 4:e48aee3e8d09 | 1 | #ifndef STEPPER |
matis755 | 4:e48aee3e8d09 | 2 | #define STEPPER |
matis755 | 4:e48aee3e8d09 | 3 | |
matis755 | 4:e48aee3e8d09 | 4 | #include "led.h" |
matis755 | 4:e48aee3e8d09 | 5 | |
matis755 | 4:e48aee3e8d09 | 6 | class Stepper { |
matis755 | 4:e48aee3e8d09 | 7 | private: |
matis755 | 4:e48aee3e8d09 | 8 | DigitalIn Button; |
matis755 | 4:e48aee3e8d09 | 9 | Led MyLed; |
matis755 | 4:e48aee3e8d09 | 10 | unsigned char ucLedIdx, ucCurrentPos, ucDesiredPos; |
matis755 | 4:e48aee3e8d09 | 11 | void Step(enum Step); |
matis755 | 4:e48aee3e8d09 | 12 | void StepLeft(void); |
matis755 | 4:e48aee3e8d09 | 13 | void StepRight(void); |
matis755 | 4:e48aee3e8d09 | 14 | public: |
matis755 | 4:e48aee3e8d09 | 15 | Stepper(); |
matis755 | 4:e48aee3e8d09 | 16 | void Callib(void); |
matis755 | 4:e48aee3e8d09 | 17 | void Goto(unsigned char); |
matis755 | 4:e48aee3e8d09 | 18 | void Step(unsigned char); |
matis755 | 4:e48aee3e8d09 | 19 | }; |
matis755 | 4:e48aee3e8d09 | 20 | |
matis755 | 4:e48aee3e8d09 | 21 | #endif |