blob: d0cfe74805560351878c9ff3caab73dd79a87a28 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#include <stdint.h>
#include <string.h>
#include <util/delay.h>
#include "nrfm.h"
#include "uart.h"
int main(void)
{
const char *s = "hello world!";
//const char *s = "hello how are you doing? This is supposed to be a very long message!";
uint8_t slen = strlen(s);
uint8_t rxaddr[ADDRLEN] = { 194, 178, 82 };
uint8_t txaddr[ADDRLEN] = { 194, 178, 83 };
uart_init();
radio_init(rxaddr);
radio_print_config();
for (;;) {
radio_sendto(txaddr, s, slen);
_delay_ms(2000);
}
return 0;
}
|