Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
ISR (TIMER1_COMPA_vect) // Timer1 ISR
{
if(PINA!=0x1f) //this is a condition where if any button pressed(out of 5 buttons i am using) will be detected
{
val=PINA;
button(val); //passing PINA value
}
if((UCSRA&(1<<RXC))) //if recevied anytime
{
received_data=UDR; //store the value received
decide_func(received_data); //Passing received value.
}
}
TCCR1B |= (1 << WGM12)|(1 << CS11)|(1 << CS10);
TCNT1 = 0;
OCR1A = 2499; //I just set this value because it works fine not calculated(please help me here how to
//determine the value to be set in here.
TIMSK |= (1 << OCIE1A);
while(!(UCSRA&(1<<UDRE)));
UDR=0b00000101;