diff options
author | yash1112 | 2017-06-19 05:40:46 +0530 |
---|---|---|
committer | yash1112 | 2017-06-19 05:40:46 +0530 |
commit | 369c257b9ae0320621b43ca75b38ff66cc13f37b (patch) | |
tree | b100ab94e7ea15a310be05ee8b647c43c2317fb7 /src/c/scilab-arduino/cmd_i2c_write_register | |
parent | b33afdb2311fbe8aad4c5c614c6098585fe2d279 (diff) | |
download | Scilab2C_fossee_old-369c257b9ae0320621b43ca75b38ff66cc13f37b.tar.gz Scilab2C_fossee_old-369c257b9ae0320621b43ca75b38ff66cc13f37b.tar.bz2 Scilab2C_fossee_old-369c257b9ae0320621b43ca75b38ff66cc13f37b.zip |
1.3 new scilab-arduino functions added2. all functions have been tested on hardware 3. 5 i2c library functions added 4. Now generates code for 27 Boards(arduino and lilypad). 5. New GUI
Diffstat (limited to 'src/c/scilab-arduino/cmd_i2c_write_register')
-rw-r--r-- | src/c/scilab-arduino/cmd_i2c_write_register/u8cmd_i2c_write_registers.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/c/scilab-arduino/cmd_i2c_write_register/u8cmd_i2c_write_registers.cpp b/src/c/scilab-arduino/cmd_i2c_write_register/u8cmd_i2c_write_registers.cpp new file mode 100644 index 0000000..63cc7c7 --- /dev/null +++ b/src/c/scilab-arduino/cmd_i2c_write_register/u8cmd_i2c_write_registers.cpp @@ -0,0 +1,16 @@ +#include "cmd_i2c_write_register.h" +#include "Arduino.h" +#include "Wire.h" + +void u8cmd_i2c_write_registers(uint8 address, uint8 reg_adrs, uint8 data) +{ + + + Wire.beginTransmission(address); //Begins transmission to the device connected to given address + Wire.write(reg_adrs); //sets register pointer to reg_adrs position + Wire.write(data); //writes given data on reg_adrs position + Wire.endTransmission(); //Transmission ends + + +} + |