Guest User

Untitled

a guest
Apr 1st, 2014
77
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. int main(void)
  2. {
  3.     // LED indicator
  4.     //config led
  5.     DDRC |= _BV(DDC5);
  6.  
  7.     UART_init();
  8.     nRF905_init();
  9.  
  10.     // Interrupts on
  11.     sei();
  12.  
  13.     // Put into receive mode
  14.     nRF905_receive();
  15.  
  16.     uint8_t mesaj[NRF905_MAX_PAYLOAD];
  17.  
  18.     UART_sendstring("start\r" , '\r');
  19.    
  20.     while(1)
  21.     {
  22.         if(nRF905_airwayBusy())
  23.             PORTC |= _BV(PORTC5);
  24.         else
  25.             PORTC &= ~_BV(PORTC5);
  26.        
  27.         // Clear stuff
  28.         nRF905_getData(mesaj, sizeof(mesaj));
  29.     }
  30. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×