extern "C" void ainit();
extern "C" void aloop();
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
DDRB=DDRB | 0x01; // PIN PBO (8 arduino) como salida
DDRB=DDRB & ~(0x10); // PB4 (12 arduino ) como entrada
PORTB=PORTB | 0x10; //PB4 con pullup resistor
ainit();
}
void loop() {
// put your main code here, to run repeatedly:
// if((PINB & 0x10)==0) //verificar PB4 este en 0 en 1
// {
// PORTB=PORTB | 0x01;
// }
// else
// {
// PORTB=PORTB & ~(0x01);
// }
aloop();
}