How do I take input from the joystick on the AVR butterfly development board?
Checking 

while (PINB == 1)  {...}


is probably not what you want. PINB refers to the 8 bit register for the whole port B. If you want to check the state of a specific pin you have to mask it like this:

while (PINB &amp; (1&lt;&lt;PB0)) {...}


That condition is true as long as pin 0 on port B is high.