diff options
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, 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 } |