//global variables:int Left;int Front;int Right;//codevoid UpdateSensors(void){Left = sharp_IR_interpret_GP2Y0A02YK(a2dConvert8bit(0));Front = sharp_IR_interpret_GP2Y0A02YK(a2dConvert8bit(1));Right =sharp_IR_interpret_GP2Y0A02YK(a2dConvert8bit(2));}Anyone care to explain to me how I can use interrupt to update these variables 20 times a second? Is it even recommended? Thanks!

you'll need to use timers from the axon.1. initialize the specific timer for the correct resolution. In other words, figure out the DIV with FCPU and figure out what the count should be to equal 50ms.2. enable the timer3. you can use the timerAttach function to attach your own method you want to run4. change your variables to volatile int Left, etc...5. your code might look like this:

Anyone care to explain to me how I can use interrupt to update these variables 20 times a second? Is it even recommended?

The best time to read sensors is just before you are going to use sensor data. At 50ms delay, your sensor data will be outdated by up to 50ms. I wouldn't recommend using interrupts for this sensor unless you're doing something special I don't know about