summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorSadeep Madurange <sadeep@asciimx.com>2025-03-30 19:39:53 +0800
committerSadeep Madurange <sadeep@asciimx.com>2025-03-30 19:39:53 +0800
commitd0113cf3d4ac0dbf47bdba27babf1e4c3f918a26 (patch)
tree8ed587a001ccbdab4e46b29a116596893674db32 /main.c
parent6d6b08c8cbc9bfcae7bcda768048134c9e1763b9 (diff)
downloadavr-nrf24l01-driver-d0113cf3d4ac0dbf47bdba27babf1e4c3f918a26.tar.gz
sendto()
Diffstat (limited to 'main.c')
-rw-r--r--main.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/main.c b/main.c
index e1046dd..8c108a7 100644
--- a/main.c
+++ b/main.c
@@ -1,15 +1,20 @@
#include <stdint.h>
+#include <string.h>
#include "nrfm.h"
#include "uart.h"
int main(void)
{
- uint8_t rxaddr[] = { 82, 178, 194 }; /* 194.178.82 */
+ const char *s = "hello world!";
+
+ uint8_t rxaddr[] = { 194, 178, 82 };
+ uint8_t txaddr[] = { 194, 178, 83 };
uart_init();
radio_init(rxaddr);
radio_print_config();
+ radio_sendto(txaddr, s, strlen(s));
return 0;
}