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.
Dependencies: ST7032 QEI PS4Serial
Dependents: 2021Arobo_UMAPYOI 2021Arobo_YUMIPYOI
cerica2.h@13:91a699eae3ea, 2019-05-09 (annotated)
- Committer:
- Suzutomo
- Date:
- Thu May 09 07:42:21 2019 +0000
- Revision:
- 13:91a699eae3ea
- Parent:
- 11:8fa43cb31f9b
- Child:
- 15:f2e702d0047c
use minomuratakuma
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| Suzutomo | 3:72c7158376db | 1 | #include "mbed.h" |
| Suzutomo | 0:a1d2ea7aa5c6 | 2 | |
| Suzutomo | 0:a1d2ea7aa5c6 | 3 | enum WireSel { |
| Suzutomo | 0:a1d2ea7aa5c6 | 4 | FEP01,TweLite |
| Suzutomo | 0:a1d2ea7aa5c6 | 5 | }; |
| Suzutomo | 1:019a7d4201c2 | 6 | |
| Suzutomo | 0:a1d2ea7aa5c6 | 7 | class CERICA |
| Suzutomo | 0:a1d2ea7aa5c6 | 8 | { |
| Suzutomo | 0:a1d2ea7aa5c6 | 9 | private: |
| Suzutomo | 0:a1d2ea7aa5c6 | 10 | DigitalOut wireSelect; |
| Suzutomo | 11:8fa43cb31f9b | 11 | |
| Suzutomo | 11:8fa43cb31f9b | 12 | I2C *i2c; |
| Suzutomo | 11:8fa43cb31f9b | 13 | char ADDR; |
| Suzutomo | 11:8fa43cb31f9b | 14 | bool brake; |
| Suzutomo | 11:8fa43cb31f9b | 15 | bool isEnc; |
| Suzutomo | 11:8fa43cb31f9b | 16 | bool channel; |
| Suzutomo | 11:8fa43cb31f9b | 17 | long map(long x, long in_min, long in_max, long out_min, long out_max); |
| Suzutomo | 11:8fa43cb31f9b | 18 | char configData; |
| Suzutomo | 11:8fa43cb31f9b | 19 | char Div; |
| Suzutomo | 11:8fa43cb31f9b | 20 | int minSpd; |
| Suzutomo | 11:8fa43cb31f9b | 21 | int maxSpd; |
| Suzutomo | 0:a1d2ea7aa5c6 | 22 | |
| Suzutomo | 0:a1d2ea7aa5c6 | 23 | public: |
| Suzutomo | 11:8fa43cb31f9b | 24 | CERICA(I2C *i2c_,WireSel WireSel_); |
| Suzutomo | 11:8fa43cb31f9b | 25 | |
| Suzutomo | 11:8fa43cb31f9b | 26 | //bool init(char toMD , bool rvs = false , bool omni = true, bool sound = false , frequency freq = F256, int channel_ = 0); |
| Suzutomo | 13:91a699eae3ea | 27 | void mRange(int minSpd_,int maxSpd_); |
| Suzutomo | 11:8fa43cb31f9b | 28 | bool motor(bool available_ = 1); |
| Suzutomo | 11:8fa43cb31f9b | 29 | void motor(char sendChannel,int verocity); |
| Suzutomo | 11:8fa43cb31f9b | 30 | bool RawMotor(char sendChannel,int verocity); |
| Suzutomo | 11:8fa43cb31f9b | 31 | bool wait(int waitT); |
| Suzutomo | 11:8fa43cb31f9b | 32 | void set(bool isEnc_ = false,bool brake_ = false,int channel_ = 0); |
| Suzutomo | 11:8fa43cb31f9b | 33 | bool SystemReset(char sendChannel); |
| Suzutomo | 11:8fa43cb31f9b | 34 | bool ConfigReset(char sendChannel); |
| Suzutomo | 11:8fa43cb31f9b | 35 | bool DscOn(char sendChannel,bool mode); |
| Suzutomo | 11:8fa43cb31f9b | 36 | bool OutputFlip(char sendChannel,bool mode); |
| Suzutomo | 11:8fa43cb31f9b | 37 | bool DscPortOpen(char sendChannel,bool mode); |
| Suzutomo | 11:8fa43cb31f9b | 38 | bool SoundOn(char sendChannel,bool mode); |
| Suzutomo | 11:8fa43cb31f9b | 39 | bool SetDivider(char sendChannel,char pulse); |
| Suzutomo | 11:8fa43cb31f9b | 40 | void SetSpeedLimit(int min, int max){ minSpd = min; maxSpd = max; } |
| Suzutomo | 11:8fa43cb31f9b | 41 | int powerOut[16]; |
| Suzutomo | 11:8fa43cb31f9b | 42 | int power[16]; |
| Suzutomo | 0:a1d2ea7aa5c6 | 43 | }; |