![]() |
DigitalInput.Get() always returns zero
...well, almost always.
I'm using the IterativeRobot template and polling a DigitalInput within the AutonomousPeriodic() function. I have a NO switch wired between GND and SIG on sidecar digital input #1. The very first time through the loop, the call to Get() returns the correct value corresponding to the switch state. Every time after that, it always returns zero, regardless of the state of the switch. What is my issue, hardware or software? |
Re: DigitalInput.Get() always returns zero
Without seeing either your hardware or your software, it's impossible to say where your problem lies.
|
Re: DigitalInput.Get() always returns zero
Does this help? The problem is in the DriveWheel::calibrate() method.
DriveWheel.h Code:
#ifndef DRIVEWHEEL_HCode:
#include "DriveWheel.h" |
Re: DigitalInput.Get() always returns zero
Problem solved.
Bad digital sidecar. (Ugh! Hardware!) |
| All times are GMT -5. The time now is 13:39. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi