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 RF24Network_Receive by
Verzender.h@6:6a82110ff393, 2018-02-19 (annotated)
- Committer:
- pietor
- Date:
- Mon Feb 19 14:44:11 2018 +0000
- Revision:
- 6:6a82110ff393
Ontvanger
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| pietor | 6:6a82110ff393 | 1 | #ifndef Verzender_h |
| pietor | 6:6a82110ff393 | 2 | #define Verzender_h |
| pietor | 6:6a82110ff393 | 3 | #include "mbed.h" |
| pietor | 6:6a82110ff393 | 4 | #include <RF24Network.h> |
| pietor | 6:6a82110ff393 | 5 | #include <RF24.h> |
| pietor | 6:6a82110ff393 | 6 | |
| pietor | 6:6a82110ff393 | 7 | #define nrf_CE p9 |
| pietor | 6:6a82110ff393 | 8 | #define nrf_CSN p8 |
| pietor | 6:6a82110ff393 | 9 | #define spi_SCK p7 |
| pietor | 6:6a82110ff393 | 10 | #define spi_MOSI p5 |
| pietor | 6:6a82110ff393 | 11 | #define spi_MISO p6 |
| pietor | 6:6a82110ff393 | 12 | |
| pietor | 6:6a82110ff393 | 13 | const uint16_t this_node2 = 11; |
| pietor | 6:6a82110ff393 | 14 | const uint16_t other_node2 = 10; |
| pietor | 6:6a82110ff393 | 15 | |
| pietor | 6:6a82110ff393 | 16 | const unsigned long interval = 100; //ms |
| pietor | 6:6a82110ff393 | 17 | |
| pietor | 6:6a82110ff393 | 18 | |
| pietor | 6:6a82110ff393 | 19 | struct payload_t { |
| pietor | 6:6a82110ff393 | 20 | bool reedsensor; |
| pietor | 6:6a82110ff393 | 21 | float milligram; |
| pietor | 6:6a82110ff393 | 22 | }; |
| pietor | 6:6a82110ff393 | 23 | |
| pietor | 6:6a82110ff393 | 24 | class Verzender |
| pietor | 6:6a82110ff393 | 25 | { |
| pietor | 6:6a82110ff393 | 26 | private: |
| pietor | 6:6a82110ff393 | 27 | |
| pietor | 6:6a82110ff393 | 28 | |
| pietor | 6:6a82110ff393 | 29 | public: |
| pietor | 6:6a82110ff393 | 30 | Verzender(); |
| pietor | 6:6a82110ff393 | 31 | void update(); |
| pietor | 6:6a82110ff393 | 32 | bool write(payload_t message); |
| pietor | 6:6a82110ff393 | 33 | }; |
| pietor | 6:6a82110ff393 | 34 | |
| pietor | 6:6a82110ff393 | 35 | #endif |
| pietor | 6:6a82110ff393 | 36 | |
| pietor | 6:6a82110ff393 | 37 | |
| pietor | 6:6a82110ff393 | 38 | |
| pietor | 6:6a82110ff393 | 39 | |
| pietor | 6:6a82110ff393 | 40 |
