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_analog_out_volt | |
parent | b33afdb2311fbe8aad4c5c614c6098585fe2d279 (diff) | |
download | scilab2c-369c257b9ae0320621b43ca75b38ff66cc13f37b.tar.gz scilab2c-369c257b9ae0320621b43ca75b38ff66cc13f37b.tar.bz2 scilab2c-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_analog_out_volt')
-rw-r--r-- | src/c/scilab-arduino/cmd_analog_out_volt/u8cmd_analog_out_volts.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/c/scilab-arduino/cmd_analog_out_volt/u8cmd_analog_out_volts.c b/src/c/scilab-arduino/cmd_analog_out_volt/u8cmd_analog_out_volts.c new file mode 100644 index 00000000..2dd82e41 --- /dev/null +++ b/src/c/scilab-arduino/cmd_analog_out_volt/u8cmd_analog_out_volts.c @@ -0,0 +1,22 @@ +/* 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 +*/ + +#include "cmd_analog_out_volt.h" +#include "Arduino.h" + +void u8cmd_analog_out_volts(uint8 board_no, uint8 pin, float value) +{ + int a; + a = ((value*255)/5); + analogWrite(pin,a); + +} |