summaryrefslogtreecommitdiff
path: root/src/c/scilab-arduino/cmd_dcmotor_release
diff options
context:
space:
mode:
authoryash11122017-07-10 17:08:48 +0530
committeryash11122017-07-10 17:08:48 +0530
commit49d8281d2da2f4c6bf0e62d148a8a7328d3bf970 (patch)
tree8b555b3797807de0db3849f0d91664c12d785c9b /src/c/scilab-arduino/cmd_dcmotor_release
parentbd03b38be0918837e147e969c6bb2014900009db (diff)
downloadScilab2C_fossee_old-49d8281d2da2f4c6bf0e62d148a8a7328d3bf970.tar.gz
Scilab2C_fossee_old-49d8281d2da2f4c6bf0e62d148a8a7328d3bf970.tar.bz2
Scilab2C_fossee_old-49d8281d2da2f4c6bf0e62d148a8a7328d3bf970.zip
Arduino toolbox error Resolved
Diffstat (limited to 'src/c/scilab-arduino/cmd_dcmotor_release')
-rw-r--r--src/c/scilab-arduino/cmd_dcmotor_release/u8cmd_dcmotor_releases.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/c/scilab-arduino/cmd_dcmotor_release/u8cmd_dcmotor_releases.c b/src/c/scilab-arduino/cmd_dcmotor_release/u8cmd_dcmotor_releases.c
index 349bcb1..d56d12d 100644
--- a/src/c/scilab-arduino/cmd_dcmotor_release/u8cmd_dcmotor_releases.c
+++ b/src/c/scilab-arduino/cmd_dcmotor_release/u8cmd_dcmotor_releases.c
@@ -15,15 +15,15 @@
void u8cmd_dcmotor_releases(uint8 board_no, uint8 motor_no)
{
- if (dcm_mode[motor_no] == 3)
+ if (dcm_mode[motor_no] == 3) //for IC accepting analog value
{
- analogWrite(dcm_pin_1[motor_no],0);
+ analogWrite(dcm_pin_1[motor_no],0); //passing LOW to IC pins to stop the motor
analogWrite(dcm_pin_2[motor_no],0);
}
- else
+ else //for IC accepting digital value
{
digitalWrite(dcm_pin_1[motor_no],LOW);
- digitalWrite(dcm_pin_2[motor_no],LOW);
+ digitalWrite(dcm_pin_2[motor_no],LOW); //passing LOW to IC pins to stop the motor
}
}