|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#6
|
||||
|
||||
|
Re: digital input question...
I'm pretty sure you can, if they are set up in a struct together. Say:
if(SomeStructbits.bit0) blah; If you only want to see the first bit of any variable, though, use modulus. if(someVar % 2) morestufftodo; If you aren't familiar with modulus, it gives the remainder of dividing by the number you mod by, ie modding by 2 gives you one or zero depending on if the number is even or odd (or rather, if the first bit is 1 or 0). Good luck. |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| counting digital input | CharlieWilken | Programming | 9 | 22-03-2004 19:56 |
| Digital In Question | Tom Bottiglieri | Control System | 5 | 02-03-2004 17:09 |
| Question about input pins. | Tom Bottiglieri | Programming | 3 | 15-02-2004 15:12 |
| How do u hook up the digital input to the sensor's wires | Fares | Technical Discussion | 2 | 14-02-2003 16:41 |
| Robot Digital Input | Mike Norton | Technical Discussion | 5 | 16-01-2003 14:31 |