|
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.
__________________
~Alex Baxter
Programming, Arms operation, Team 254
|