summaryrefslogtreecommitdiff
path: root/2.3-1/src/c/scilab-arduino/cmd_analog_out_volt
diff options
context:
space:
mode:
authorBrijeshcr2017-07-07 18:19:45 +0530
committerGitHub2017-07-07 18:19:45 +0530
commit5258fe20f21514eca1f7dc4ee384fe63c35c68a1 (patch)
treec0424024c16aa122a5a38686dfed75a4c4866e95 /2.3-1/src/c/scilab-arduino/cmd_analog_out_volt
parent8d1da9568248c9a0572da08a7039e75e84d782b0 (diff)
parenta505550d38b2b886c61863a85be67faf02ad604b (diff)
downloadScilab2C-5258fe20f21514eca1f7dc4ee384fe63c35c68a1.tar.gz
Scilab2C-5258fe20f21514eca1f7dc4ee384fe63c35c68a1.tar.bz2
Scilab2C-5258fe20f21514eca1f7dc4ee384fe63c35c68a1.zip
Merge pull request #12 from yash1112/master
SCi2cDeps updated, Windows compatibility resolved
Diffstat (limited to '2.3-1/src/c/scilab-arduino/cmd_analog_out_volt')
-rw-r--r--2.3-1/src/c/scilab-arduino/cmd_analog_out_volt/u8cmd_analog_out_volts.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/2.3-1/src/c/scilab-arduino/cmd_analog_out_volt/u8cmd_analog_out_volts.c b/2.3-1/src/c/scilab-arduino/cmd_analog_out_volt/u8cmd_analog_out_volts.c
index 2dd82e41..19a73fcf 100644
--- a/2.3-1/src/c/scilab-arduino/cmd_analog_out_volt/u8cmd_analog_out_volts.c
+++ b/2.3-1/src/c/scilab-arduino/cmd_analog_out_volt/u8cmd_analog_out_volts.c
@@ -15,8 +15,14 @@
void u8cmd_analog_out_volts(uint8 board_no, uint8 pin, float value)
{
+<<<<<<< HEAD
int a;
a = ((value*255)/5);
analogWrite(pin,a);
+=======
+ int a; //declaring variable
+ a = ((value*255)/5); //converting given voltage to duty cycle value (0 - 255)
+ analogWrite(pin,a); //passing pin no. and duty cycle value
+>>>>>>> 9e5793a7b05b23e6044a6d7a9ddd5db39ba375f0
}