![]() |
AUTONOMOUS PROBLEM
I HAVE A PROBLEM, I WROTE THIS CODE FOR AUTONOMOUS:
Quote:
but its not working, can anyone help please?? |
Re: AUTONOMOUS PROBLEM
no, the logic in his if is right. Double-check that the switches are actually sending data. Nothing that I can see with that code seems wrong
|
Re: AUTONOMOUS PROBLEM
The if statement looks fine to me.
Try outputting the values of AutoSwitch3->Get() and limitSwitchB->Get(). Make sure something odd isn't going on. |
Re: AUTONOMOUS PROBLEM
Digital inputs are pulled up (to a logic high... 1). When you short the signal line to ground the input will read as logic low, or 0.
Try doing Code:
if(switch->Get() == 0) {...} |
Re: AUTONOMOUS PROBLEM
Also make sure your wiring on the switches are correct.
We had a switch wired backwards, so every time it was triggered, it shorted the IO Board, causing all of our stuff to stop. (And they blamed it on the programming!) |
Re: AUTONOMOUS PROBLEM
Quote:
|
| All times are GMT -5. The time now is 13:00. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi