The E4P encoder is not working on our robot right now. We plugged it into the digital side card digital I/O, 3 wire connection in 3, 1 wire (middle only) connection to 4. And in the code we declared it encoder(3,4), encoder.Start(); encoder.SetDistancePerPulse(####); and DriverStationLCD *screen = DriverStationLCD::GetInstance(); screen->PrintfLine(DriverStationLCD::kUser_Line1,“RPM: %f”,encoder.GetRate());
It isn’t working because you have the B channel connected to a 5 volt power pin, not to digital input signal pin. Move it from the middle pin to the pin farthest from the edge of the Digital Sidecar.