diff options
author | yash1112 | 2017-07-10 17:08:48 +0530 |
---|---|---|
committer | yash1112 | 2017-07-10 17:08:48 +0530 |
commit | 09d11751736a5812ebfc22cd488f51de02e5375a (patch) | |
tree | 603cb29022e575db10ab26fbb75a5cc5bdf01ad8 /2.3-1/src/c/scilab-arduino/cmd_analog_out_volt | |
parent | 26ab8620e89571314bc1a828bd9aca3d288eaede (diff) | |
download | Scilab2C-09d11751736a5812ebfc22cd488f51de02e5375a.tar.gz Scilab2C-09d11751736a5812ebfc22cd488f51de02e5375a.tar.bz2 Scilab2C-09d11751736a5812ebfc22cd488f51de02e5375a.zip |
Arduino toolbox error 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.c | 6 |
1 files changed, 3 insertions, 3 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..1d76b601 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,8 @@ void u8cmd_analog_out_volts(uint8 board_no, uint8 pin, float value) { - 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 } |