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.
Diff: PixyLinkI2C.h
- Revision:
- 2:c3a866b20784
- Parent:
- 0:a2603d7fa0ac
--- a/PixyLinkI2C.h Fri May 05 12:03:13 2017 +0000 +++ b/PixyLinkI2C.h Wed May 17 07:37:43 2017 +0000 @@ -1,5 +1,5 @@ -#ifndef TUIASI_PIXYLINKI2C_H -#define TUIASI_PIXYLINKI2C_H +#ifndef PIXYLINKI2C_H +#define PIXYLINKI2C_H #include "I2C.h" #include "PixyLink.h" @@ -8,8 +8,9 @@ { public: PixyLinkI2C(PinName sda, PinName scl) : - PixyLink(PIXY_DEFAULT_ADDR), I2C(sda, scl) { - }; + PixyLink(PIXY_DEFAULT_ADDR), I2C(sda, scl){ + I2C::frequency(100000); + }; virtual uint16_t getWord() { uint8_t data[2] = {0, 0}; @@ -29,7 +30,7 @@ private: - static const uint8_t PIXY_DEFAULT_ADDR = 0x54; + static const uint8_t PIXY_DEFAULT_ADDR = 0xAC; }; -#endif //TUIASI_PIXYLINKI2C_H +#endif //PIXYLINKI2C_H \ No newline at end of file