diff options
Diffstat (limited to 'src/c/scilab-arduino/cmd_analog_in_volt')
-rw-r--r-- | src/c/scilab-arduino/cmd_analog_in_volt/u8cmd_analog_in_volts.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/c/scilab-arduino/cmd_analog_in_volt/u8cmd_analog_in_volts.c b/src/c/scilab-arduino/cmd_analog_in_volt/u8cmd_analog_in_volts.c index 7018df2..f961719 100644 --- a/src/c/scilab-arduino/cmd_analog_in_volt/u8cmd_analog_in_volts.c +++ b/src/c/scilab-arduino/cmd_analog_in_volt/u8cmd_analog_in_volts.c @@ -15,8 +15,8 @@ float u8cmd_analog_in_volts(uint8 board_no, uint8 pin) { - float a; - a = ((5*(float)analogRead(pin))/1023); + float a; //declaration of variable + a = ((5*(float)analogRead(pin))/1023); //recieved 10 bit input from analog pin is convert to voltage(0 - 50 return(a); } |