Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Step_Motor.h@0:1b7dd931c028, 2018-05-03 (annotated)
- Committer:
- Camilokingxd
- Date:
- Thu May 03 15:07:53 2018 +0000
- Revision:
- 0:1b7dd931c028
- Child:
- 1:6fe876825b57
ENTREGA 2 - PICOLO - SISTEMAS EMBEBIDOS
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| Camilokingxd | 0:1b7dd931c028 | 1 | #ifndef STEP_MOTOR_H |
| Camilokingxd | 0:1b7dd931c028 | 2 | #define STEP_MOTOR_H |
| Camilokingxd | 0:1b7dd931c028 | 3 | |
| Camilokingxd | 0:1b7dd931c028 | 4 | #include "mbed.h" |
| Camilokingxd | 0:1b7dd931c028 | 5 | |
| Camilokingxd | 0:1b7dd931c028 | 6 | class stepmotor { |
| Camilokingxd | 0:1b7dd931c028 | 7 | public: |
| Camilokingxd | 0:1b7dd931c028 | 8 | |
| Camilokingxd | 0:1b7dd931c028 | 9 | stepmotor(PinName in1, PinName in2, PinName in3, PinName in4, PinName in5,PinName in6, PinName in7, PinName in8); |
| Camilokingxd | 0:1b7dd931c028 | 10 | void step(uint32_t num_steps,uint8_t cw); |
| Camilokingxd | 0:1b7dd931c028 | 11 | void set_speed(int speed); |
| Camilokingxd | 0:1b7dd931c028 | 12 | uint32_t get_speed(); |
| Camilokingxd | 0:1b7dd931c028 | 13 | private: |
| Camilokingxd | 0:1b7dd931c028 | 14 | BusOut motor_out; |
| Camilokingxd | 0:1b7dd931c028 | 15 | uint32_t motorSpeed; |
| Camilokingxd | 0:1b7dd931c028 | 16 | int32_t nstep,nstep2; |
| Camilokingxd | 0:1b7dd931c028 | 17 | uint8_t mot2; |
| Camilokingxd | 0:1b7dd931c028 | 18 | void move(); |
| Camilokingxd | 0:1b7dd931c028 | 19 | }; |
| Camilokingxd | 0:1b7dd931c028 | 20 | |
| Camilokingxd | 0:1b7dd931c028 | 21 | #endif |