Hey everyone - I’m hoping someone can shed some light into issues I’m seeing with our Romis. We’re using our offseason to train up some recruits and the Romi has been a helpful tool in getting them oriented with the basics of the WPI framework, working with the drivetrain, and other small things.
Today I was hoping to show them how to read a digital input and how to run commands based off that. I’ve spent most of the morning attempting to get this to work and sadly haven’t had much success. Here’s a quick rundown of my setup.
In the web UI I’ve gone through and setup all of my external IO to digital inputs.
I’m using a basic timed robot to keep things simple. In robotInit I’m going through and creating all of my inputs…
public class Robot extends TimedRobot
{
private final List<DigitalInput> inputs = new LinkedList<>();
private int count = 0;
.....
@Override
public void robotInit()
{
inputs.addAll(Stream.of(0, 1, 2, 8, 9, 10, 11, 12).map(DigitalInput::new).toList());
}
Then in teleopPeriodic I’m simply looping through the inputs and printing out the results…
@Override
public void teleopPeriodic() {
if(count++ % 100 == 0) {
inputs.forEach(i -> System.out.println(i.getChannel() + ": " + i.get()));
}
}
Sadly despite all of my attempts I cannot seem to get them to change state. This includes the onboard buttons (0-2) and the external inputs (8-12).
In the simulation dashboard I can change their default state from low to high, and in that case I do see things switch from false to true. But that doesn’t seem to change this behavior.
To add insult to injury, whenever I short the external pins (either through a limit switch or with a paper clip / screwdriver / probe) the Romi beeps at me, seeming to acknowledge that it knows it’s been clicked. I’m starting to think it’s taunting me
Does anyone have experience with the Romi that could potentially point me in a direction for how to get these guys to switch states? Any help would be appreciated.
EDIT: Also worth noting, I’ve ensured the firmware and web ui are current.