|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Need some help with
I've connected everything on the correct ports, but for some reason this won't work. When I run the program nothing happens when the condition is met.
Here are some pics: Begin: ![]() Teleop: ![]() Thanks in advance! |
|
#2
|
|||||
|
|||||
|
Re: Need some help with
The Pot will never exactly equal 5.
You might want to use > 4.9 or something. Try probing the actual pot values so you know what you are getting. Last edited by Mark McLeod : 22-12-2014 at 15:35. |
|
#3
|
||||
|
||||
|
Re: Need some help with
@OP: Mark's statement applies not only to your particular issue: It applies whenever you are comparing floating-point numbers in a computer program.
Here are a couple of articles which may be of interest: http://randomascii.wordpress.com/201...-2012-edition/ http://c-faq.com/fp/fpequal.html |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|