diff options
Diffstat (limited to 'client/client.c')
-rw-r--r-- | client/client.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/client/client.c b/client/client.c new file mode 100644 index 0000000..a6d51bd --- /dev/null +++ b/client/client.c @@ -0,0 +1,25 @@ +#define F_CPU 1000000UL + +#include <util/delay.h> +#include <nrf24l01.h> + +int main(void) +{ + uint8_t status; + + nrf24l01_init(); + nrf24l01_power_up(); + nrf24l01_receive_mode(); + + while(1) { + if(is_data_received()) { + nrf24l01_receive_byte(); + + status = nrf24l01_read_reg(NRF24L01_REG_STATUS); + nrf24l01_write_reg(NRF24L01_REG_STATUS, status); + } + _delay_us(100000); + } + + return 0; +} |