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.
Dependents: tc_agent Line_Trace_No_collision_Light_control_longer_dis
S11059.h@0:61de426fb945, 2016-07-19 (annotated)
- Committer:
- maruta
- Date:
- Tue Jul 19 03:50:10 2016 +0000
- Revision:
- 0:61de426fb945
ported to use hardware I2C;
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| maruta | 0:61de426fb945 | 1 | #ifndef S11059_H_ |
| maruta | 0:61de426fb945 | 2 | #define S11059_H_ |
| maruta | 0:61de426fb945 | 3 | |
| maruta | 0:61de426fb945 | 4 | #include "mbed.h" |
| maruta | 0:61de426fb945 | 5 | |
| maruta | 0:61de426fb945 | 6 | #define S11059_ADDR (0x2A<<1) |
| maruta | 0:61de426fb945 | 7 | |
| maruta | 0:61de426fb945 | 8 | class S11059{ |
| maruta | 0:61de426fb945 | 9 | public: |
| maruta | 0:61de426fb945 | 10 | S11059(PinName sda, PinName scl); |
| maruta | 0:61de426fb945 | 11 | virtual ~S11059(); |
| maruta | 0:61de426fb945 | 12 | int r,g,b,ir; |
| maruta | 0:61de426fb945 | 13 | void update(); |
| maruta | 0:61de426fb945 | 14 | private: |
| maruta | 0:61de426fb945 | 15 | I2C _i2c; |
| maruta | 0:61de426fb945 | 16 | }; |
| maruta | 0:61de426fb945 | 17 | |
| maruta | 0:61de426fb945 | 18 | #endif /* S11059_SOFTI2C_H_ */ |