View Full Version : Magnetic Sensor
akavoor13
16-02-2014, 22:26
We are trying to use a magnetic reed sensor with our pneumatic system. I know the sensor gets connected to digital I/O. In Java, once I define a variable of type "DigitalInput," what do I do with it? i.e., how do I use the information I get from the digital I/O? Many thanks!
We are trying to use a magnetic reed sensor with our pneumatic system. I know the sensor gets connected to digital I/O. In Java, once I define a variable of type "DigitalInput," what do I do with it? i.e., how do I use the information I get from the digital I/O? Many thanks!
DigitalInput.get(); returns a boolean corresponding to the input.
Team3266Spencer
16-02-2014, 22:38
http://robotics.francisparker.org/javadoc/edu/wpi/first/wpilibj/DigitalInput.html
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.