View Single Post
  #2   Spotlight this post!  
Unread 31-01-2010, 11:20
Steve Warner Steve Warner is offline
Controls / Programming
FRC #0234 (Cyber Blue)
Team Role: Mentor
 
Join Date: Feb 2006
Rookie Year: 2006
Location: Indiana
Posts: 41
Steve Warner is an unknown quantity at this point
Re: Digital IOs scrambled on Dashboard

We had the same problem. If you print out the value in hex that is being sent to the DS you'll see what is going on. Writing from memory, the two rightmost bits are not used. The third bit is point 14, the fourth is point 13, etc. I might have this backwards but it's something like that. We shifted the bits right two places and then shuffled the bits so they wound up in the right place. A good example of bit shifting to show the students but another bit of "sample" code that doesn't work. If you need more detail on this, let me know.
Reply With Quote