summaryrefslogtreecommitdiff
path: root/2.3-1/src/c/scilab-arduino/cmd_i2c_write
diff options
context:
space:
mode:
authorukashanoor2017-06-21 12:15:47 +0530
committerukashanoor2017-06-21 12:15:47 +0530
commit5efb98c6773576e39a33df5cfc89979c07031a6a (patch)
treea128d0b03ebb08ff36090786acdc40f231421e4b /2.3-1/src/c/scilab-arduino/cmd_i2c_write
parentf25acc874a1b46a46e9f026b0f110f2df63015f8 (diff)
parent0051253bc224286c118c080c79eaed5bf611bd35 (diff)
downloadScilab2C-5efb98c6773576e39a33df5cfc89979c07031a6a.tar.gz
Scilab2C-5efb98c6773576e39a33df5cfc89979c07031a6a.tar.bz2
Scilab2C-5efb98c6773576e39a33df5cfc89979c07031a6a.zip
updated with main repo
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
+
+}
+