Line Sensor updating

The digital inputs that our line sensors are connected to get infromaton from the line sensors once, but then fail to update, to continue to track the line. Is this a wiring problem? A programming problem? Can someone help? Thanks!

How do you know they fail to update? Are you sure they’re not actually updating, but just not giving a different signal? What loop are they in (the loop might have an infinite loop inside it or something)? How do you know they update the first time even?

  1. make sure the get method is in the correct periodic or loop
  2. i found that initializing more victors (non-existant ones or existant ones, it doesn’t matter) helps make the photoswitches respond. This is bc the db37 cable isn’t sending enough power.

This is only necessary if your digital sidecar isn’t wired properly. I noticed that you never responded to your previous thread, but it’s obvious that you have an issue which you should resolve.

Sorry about the time gap. To answer WizenedEE’s question, We have it sending the values back to the classmate using the DriverStation LCD class. When we move the robot the information that’s getting sent back doesn’t change. The classmate is getting updated values, however the values from the sensors aren’t changing.

How should the photoelectric sensors be wired? I have heard several different things, and I’m not sure which is correct. Right now they aren’t working. We have brown and blue connected to power, white to the DSC, and black to nothing. Which pin 1, 2, or 3, of the Digitat I/O should the white signal wire be connected to?

Brown is specifically BATTERY power, and blue is common. They should be spliced to #18 wire and inserted into a red/black pair of Wago connectors on the Power Distribution board with a 20A circuit breaker feeding the circuit.

If you’re concerned about brownouts, another option is to power them from an output on a Solenoid Breakout connected to 24 volts.

Which pin 1, 2, or 3, of the Digitat I/O should the white signal wire be connected to?

The signal wire connects to the SIGNAL pin on a DIO connector.

So, just to clarify, brown connects to positive, and blue to negative, right?

And we connect them to a 24v solenoid breakout, not a 12v solenoid breakout?

Can the black wire just be cut off and covered with electrical tape?

Close enough. Brown goes to “positive”, either battery voltage or 24 volts, and blue goes to zero. There’s not supposed to be any negative voltage in the system.

And we connect them to a 24v solenoid breakout, not a 12v solenoid breakout?

There would be no point to connecting them to a solenoid breakout powered from 12 volts. That would be just like connecting them to the Power Distribution board. The reason to use 24 volts instead would be to avoid having the sensor power drop below 10 volts at any time.

Can the black wire just be cut off and covered with electrical tape?

Yes, taping it to prevent accidental connection to anything else would be best.

Where do we connect it for it to be zero? If brown and blue are connected to the solenoid breakout, then it’s + and -, isn’t it?

zero in this situation is the -. Ground, common, minus, and zero all pretty much mean the same thing in this context, but they’re all different in some way (ie, ground is technically the real earth, while common is for things that aren’t grounded to the earth; minus really means the low part of an AC wave; and zero would be the midpoint when using AC).