From 3f52712f806fbd80d66dfdcaff401e5cf94dcca4 Mon Sep 17 00:00:00 2001 From: yash1112 Date: Fri, 7 Jul 2017 21:20:49 +0530 Subject: sci2c arduino updated --- .../cmd_i2c_write/u8cmd_i2c_writes.cpp | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 src/c/scilab-arduino/cmd_i2c_write/u8cmd_i2c_writes.cpp (limited to 'src/c/scilab-arduino/cmd_i2c_write') diff --git a/src/c/scilab-arduino/cmd_i2c_write/u8cmd_i2c_writes.cpp b/src/c/scilab-arduino/cmd_i2c_write/u8cmd_i2c_writes.cpp new file mode 100644 index 0000000..b777225 --- /dev/null +++ b/src/c/scilab-arduino/cmd_i2c_write/u8cmd_i2c_writes.cpp @@ -0,0 +1,26 @@ +/* Copyright (C) 2017 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: Yash Pratap Singh Tomar + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +//This function writes data to the connected device +#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 + +} + -- cgit From bd03b38be0918837e147e969c6bb2014900009db Mon Sep 17 00:00:00 2001 From: Brijeshcr Date: Sat, 8 Jul 2017 20:18:17 +0530 Subject: Revert "SCi2cDeps updated, Windows compatibility resolved" --- src/c/scilab-arduino/cmd_i2c_write/u8cmd_i2c_writes.cpp | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'src/c/scilab-arduino/cmd_i2c_write') diff --git a/src/c/scilab-arduino/cmd_i2c_write/u8cmd_i2c_writes.cpp b/src/c/scilab-arduino/cmd_i2c_write/u8cmd_i2c_writes.cpp index 788fd08..0239097 100644 --- a/src/c/scilab-arduino/cmd_i2c_write/u8cmd_i2c_writes.cpp +++ b/src/c/scilab-arduino/cmd_i2c_write/u8cmd_i2c_writes.cpp @@ -1,19 +1,3 @@ -<<<<<<< HEAD -======= -/* Copyright (C) 2017 - IIT Bombay - FOSSEE - - This file must be used under the terms of the CeCILL. - This source file is licensed as described in the file COPYING, which - you should have received as part of this distribution. The terms - are also available at - http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt - Author: Yash Pratap Singh Tomar - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in -*/ - -//This function writes data to the connected device ->>>>>>> 9e5793a7b05b23e6044a6d7a9ddd5db39ba375f0 #include "cmd_i2c_write.h" #include "Arduino.h" #include "Wire.h" -- cgit From 49d8281d2da2f4c6bf0e62d148a8a7328d3bf970 Mon Sep 17 00:00:00 2001 From: yash1112 Date: Mon, 10 Jul 2017 17:08:48 +0530 Subject: Arduino toolbox error Resolved --- src/c/scilab-arduino/cmd_i2c_write/u8cmd_i2c_writes.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/c/scilab-arduino/cmd_i2c_write') diff --git a/src/c/scilab-arduino/cmd_i2c_write/u8cmd_i2c_writes.cpp b/src/c/scilab-arduino/cmd_i2c_write/u8cmd_i2c_writes.cpp index 0239097..b777225 100644 --- a/src/c/scilab-arduino/cmd_i2c_write/u8cmd_i2c_writes.cpp +++ b/src/c/scilab-arduino/cmd_i2c_write/u8cmd_i2c_writes.cpp @@ -1,3 +1,16 @@ +/* Copyright (C) 2017 - IIT Bombay - FOSSEE + + This file must be used under the terms of the CeCILL. + This source file is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at + http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + Author: Yash Pratap Singh Tomar + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + +//This function writes data to the connected device #include "cmd_i2c_write.h" #include "Arduino.h" #include "Wire.h" -- cgit