summaryrefslogtreecommitdiff
path: root/lib/Arduino_I2C_Port_Expander/src/Arduino_I2C_Port_Expander.h
diff options
context:
space:
mode:
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.h31
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
+
+