![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
dd
Dependencies: xtoff2 RF24Network mbed
Fork of xtoff3 by
Ontvanger.h
- Committer:
- pietor
- Date:
- 2018-03-09
- Revision:
- 10:0a4c465f7838
- Parent:
- 9:e14f65b8ffc2
- Child:
- 11:77018fac195e
File content as of revision 10:0a4c465f7838:
#ifndef Ontvanger_h #define Ontvanger_h #include "mbed.h" #include <RF24Network.h> #include <RF24.h> #define nrf_CE p9 #define nrf_CSN p8 #define spi_SCK p7 #define spi_MOSI p5 #define spi_MISO p6 const uint16_t this_node = 00; const uint16_t other_node = 01; struct payload_t { bool reedsensor; float milligram; }; enum State2 {init_state, send_state, receive_state }; enum State {State_init, State_tare, State_position, State_read, State_send, State_receive }; struct state_Packet { State setState; }; class Ontvanger { private: public: Ontvanger(); void update(); bool available(); bool write(state_Packet message); payload_t read(); bool isValid(); bool testRPD(); }; #endif