Exemplo n.º 1
0
extern "C" void setup()
{
  // first check if user wants to dialog
  // if not then ..
  // read config
  setup_outputs();
  setup_events();
  setup_inputs(); 
}
Exemplo n.º 2
0
Arquivo: Shadow.c Projeto: z3t0/shadow
int main () {

  #ifdef DELAY
    DDRB |= (1 << DDB1); // PB1 as OUTPUT
    PORTB |= (1 << PB1);
    _delay_ms(4800);
    PORTB &= ~(1 << PB1);
  #endif


  #ifdef SERIAL
    // UART
    initUART();
    writeString("Shadow Initialized \n");
  #endif

  setup_outputs();

  DDRB |= (1 << DDB4);


  #ifdef ADC_SHADOW
    setup_adc();
  #endif
  #ifdef COLLISION_DETECTION
    setup_collision();
  #endif

  // Loop
  while(1) {
    // check_collision();
    // PORTB |= (1 << PB1);
    // PORTB &= ~(1 << PB1);
    // _delay_ms(1);

    // char str[15];
    // sprintf(str, "%d", val);
    // writeString(str);
    // writeString("\n");
  }

}