|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
AUTONOMOUS PROBLEM
I HAVE A PROBLEM, I WROTE THIS CODE FOR AUTONOMOUS:
Quote:
but its not working, can anyone help please?? |
|
#2
|
|||
|
|||
|
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
|
|
#3
|
||||
|
||||
|
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. |
|
#4
|
|||
|
|||
|
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) {...}
Last edited by Tom Bottiglieri : 14-04-2010 at 20:02. |
|
#5
|
|||
|
|||
|
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!) |
|
#6
|
||||
|
||||
|
Re: AUTONOMOUS PROBLEM
Quote:
![]() |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Autonomous Problem | wakeboard.dude | NI LabVIEW | 3 | 26-01-2010 15:55 |
| Autonomous problem | railerobotics | Programming | 7 | 07-02-2006 08:36 |
| Autonomous Problem... | JoeFryman | Programming | 2 | 19-02-2005 14:56 |
| PWM problem in autonomous | outofcontrol | Programming | 5 | 27-02-2004 11:58 |
| Autonomous problem. | Code\\Pilot | Programming | 8 | 10-02-2004 19:40 |