johnwasser:
Note that writing a value to PORTB will change ALL pins associated with PORTB. It looks like LEDON and LEDOFF are changing two different pins. One of those pins is an input so writing to it is turning the pull-up resistor ON (1) and OFF (0).
Ah thanks, I'm still getting the hang of all this programming microchips stuff (obviously!). I'm so used to web programming and whatnot, all this 'hardware' stuff is really confusing ('what the hell is a register!?').
I'm beginning to think that instead of relying on programming for all of this (the mode switching, LDR calibration, etc) I should be taking a more hardware approach and designing the circuit a bit better and just using the little ATtiny85 to send the pulses that trigger the camera, that way I can keep the ATtiny in sleep mode most of the time and only turn it on when I need a pulse sent. Hmm.