// ATMEL ATTINY85 running @ 8MHz / ARDUINO **Zvi Schneider 12-May-2014** // +----\/---+ // ADC0, PB5, 1|* |8 VCC // ADC3, PB3, 2| |7 PB2, ADC1 // ADC2, PB4, 3| |6 PB1, // GND 4| |5 PB0, // +---------+ // http://telavivmakers.org/index.php/TinyWall // https://github.com/telavivmakers/at-tami/tree/master/shields/ir-shield #define my_milisec 76 // 76 interrupts equal 1 mili-sec (approximatly) #define interval 100 //100 mili-sec interval between repetetive code transmitions volatile long interrups_counter = 0; byte virtual_wall = B10100010; // ROOMAs virtual wall code int one_milisec = my_milisec; int three_milisec = my_milisec * 3; ISR (TIM0_COMPA_vect) { // interrupt service routine interrups_counter +=1; } void setup(){ TCNT0 = 0; //initialize timer0 registers TCCR0A=0; TCCR0B=0; TCCR0A |=(1<> 1; } }