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.
Fork of T_motor by
T_motor.h@0:e10d08530490, 2017-08-13 (annotated)
- Committer:
- fujikenac
- Date:
- Sun Aug 13 02:08:40 2017 +0000
- Revision:
- 0:e10d08530490
- Child:
- 1:5bd161b83ce0
ver1.0
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| fujikenac | 0:e10d08530490 | 1 | #ifndef T_motor_H |
| fujikenac | 0:e10d08530490 | 2 | #define T_motor_H |
| fujikenac | 0:e10d08530490 | 3 | |
| fujikenac | 0:e10d08530490 | 4 | class T_motor |
| fujikenac | 0:e10d08530490 | 5 | { |
| fujikenac | 0:e10d08530490 | 6 | private: |
| fujikenac | 0:e10d08530490 | 7 | I2C i2c; |
| fujikenac | 0:e10d08530490 | 8 | char addr; |
| fujikenac | 0:e10d08530490 | 9 | public: |
| fujikenac | 0:e10d08530490 | 10 | void setAddr(int addr_); |
| fujikenac | 0:e10d08530490 | 11 | void init(char addr,int freq); |
| fujikenac | 0:e10d08530490 | 12 | T_motor(PinName sda,PinName scl,int addr); |
| fujikenac | 0:e10d08530490 | 13 | T_motor(I2C& i2c_,int addr); |
| fujikenac | 0:e10d08530490 | 14 | T_motor& operator=(float fval); |
| fujikenac | 0:e10d08530490 | 15 | bool run(char mode,char speed); |
| fujikenac | 0:e10d08530490 | 16 | bool stop(); |
| fujikenac | 0:e10d08530490 | 17 | bool free(); |
| fujikenac | 0:e10d08530490 | 18 | }; |
| fujikenac | 0:e10d08530490 | 19 | #endif |
