RF24Network Send example program.

Dependencies:   xtoff RF24Network mbed

Fork of RF24Network_Send by Akash Vibhute

Verzender.h

Committer:
pietor
Date:
2018-03-08
Revision:
8:62b4607c44ca
Parent:
7:cbdbaf825b4a
Child:
9:6d8c0b946259

File content as of revision 8:62b4607c44ca:

#ifndef Verzender_h
#define Verzender_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 = 01;
const uint16_t other_node = 00;
const unsigned long interval = 100; //ms




struct payload_t {
    bool reedsensor;
    float milligram;
};

enum State {State_init,
            State_tare,
            State_position,
            State_read,
            State_receive
           };

struct state_Packet {
    State setstate;
};


class Verzender
{
private:


public:
    Verzender();
    void update();
    bool write(payload_t message);
    bool available();
    state_Packet read();
    void test();
};

#endif