Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: xtoff2 RF24Network mbed
Fork of xtoff3 by
Verzender.cpp
- Committer:
- pietor
- Date:
- 2018-02-19
- Revision:
- 6:6a82110ff393
File content as of revision 6:6a82110ff393:
#include "Verzender.h"
RF24 radio(spi_MOSI, spi_MISO, spi_SCK, nrf_CE, nrf_CSN );
RF24Network network(radio);
Timer t;
unsigned long packets_sent;
Timer t_packet;
Verzender::Verzender()
{
radio.begin();
network.begin(90,this_node);
wait_ms(2000);
t.start();
t_packet.start();
}
void Verzender::update()
{
network.update();
}
bool Verzender::write(payload_t message)
{
RF24NetworkHeader header_tx(other_node);
payload_t payload_tx;
payload_tx = message;
return network.write(header_tx,&payload_tx,sizeof(payload_tx));
}
