summaryrefslogtreecommitdiff
path: root/2.3-1/src/c/scilab-arduino/cmd_i2c_write
diff options
context:
space:
mode:
Diffstat (limited to '2.3-1/src/c/scilab-arduino/cmd_i2c_write')
-rw-r--r--2.3-1/src/c/scilab-arduino/cmd_i2c_write/u8cmd_i2c_writes.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/2.3-1/src/c/scilab-arduino/cmd_i2c_write/u8cmd_i2c_writes.cpp b/2.3-1/src/c/scilab-arduino/cmd_i2c_write/u8cmd_i2c_writes.cpp
new file mode 100644
index 00000000..0239097a
--- /dev/null
+++ b/2.3-1/src/c/scilab-arduino/cmd_i2c_write/u8cmd_i2c_writes.cpp
@@ -0,0 +1,13 @@
+#include "cmd_i2c_write.h"
+#include "Arduino.h"
+#include "Wire.h"
+
+void u8cmd_i2c_writes(uint8 address, uint8 data)
+{
+
+ Wire.beginTransmission(address); //Begins transmission to the device connected to given address
+ Wire.write(data); //sends data to slave device
+ Wire.endTransmission(); //Transmission ends
+
+}
+