diff options
author | Torben Egmose <torben.egmose@gmail.com> | 2021-02-07 22:06:46 +0100 |
---|---|---|
committer | Torben Egmose <torben.egmose@gmail.com> | 2021-02-07 22:06:46 +0100 |
commit | cb38cc24238c70b841e762a9870e46d231761600 (patch) | |
tree | 50b8cea71e230f3674277534112332a32430b3e1 /lib/Arduino_I2C_Port_Expander/src/Arduino_I2C_Port_Expander.h |
Diffstat (limited to 'lib/Arduino_I2C_Port_Expander/src/Arduino_I2C_Port_Expander.h')
-rw-r--r-- | lib/Arduino_I2C_Port_Expander/src/Arduino_I2C_Port_Expander.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/lib/Arduino_I2C_Port_Expander/src/Arduino_I2C_Port_Expander.h b/lib/Arduino_I2C_Port_Expander/src/Arduino_I2C_Port_Expander.h new file mode 100644 index 0000000..9d9c2b2 --- /dev/null +++ b/lib/Arduino_I2C_Port_Expander/src/Arduino_I2C_Port_Expander.h @@ -0,0 +1,31 @@ +#ifndef EXPANDUINO_H +#define EXPANDUINO_H + +#if ARDUINO >= 100 + #include "Arduino.h" +#else + #include "WProgram.h" +#endif +#include <Wire.h> + +class EXPAND { + public: + EXPAND(uint8_t addr); + ~EXPAND(); + void digitalWrite(byte pin,byte val); + int digitalRead(byte pin); + int digitalReadPullup(byte pin); + void analogWrite(byte pin,byte val); + int analogRead(byte pin); + void sendDataPacket(); + int receiveResponse(); + + void analogWriteSlow(byte pin,byte val); + private: + uint8_t _addr; +}; + + +#endif + + |