summaryrefslogtreecommitdiff
path: root/src/c/scilab-arduino/cmd_analog_in_volt
diff options
context:
space:
mode:
authorAbhinav Dronamraju2017-07-10 22:08:27 +0530
committerAbhinav Dronamraju2017-07-10 22:08:27 +0530
commitd2c00f5343785085bcfefb62cbc041a5cffa8f31 (patch)
tree3d4fc371c30f2340af2def6dcabeb4fd4821eaf8 /src/c/scilab-arduino/cmd_analog_in_volt
parentc7d123014c05daaa6c7ce32bc5e86e5f3e7e4692 (diff)
parent49d8281d2da2f4c6bf0e62d148a8a7328d3bf970 (diff)
downloadScilab2C_fossee_old-d2c00f5343785085bcfefb62cbc041a5cffa8f31.tar.gz
Scilab2C_fossee_old-d2c00f5343785085bcfefb62cbc041a5cffa8f31.tar.bz2
Scilab2C_fossee_old-d2c00f5343785085bcfefb62cbc041a5cffa8f31.zip
Pulled from upstream master
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.c4
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);
}