first try working module - fail

This commit is contained in:
2023-04-06 16:27:00 +02:00
parent f20f4938e4
commit ede68db3df
8 changed files with 85 additions and 30 deletions
+10 -1
View File
@@ -12,12 +12,16 @@
#pragma once
#include <menuControl.h>
#include <nRF24L01.h>
#include <RF24.h>
#include <SPI.h>
// #include <printf.h>
#include "controlPadInput.h"
class ControlPad {
public:
ControlPad();
ControlPad(SPIClass *spiPort, uint8_t cePin, uint8_t csnPin);
bool loop();
@@ -29,12 +33,17 @@ class ControlPad {
private:
MenuControl* menuControl = nullptr;
RF24* radio;
ControlPadInput controlInput;
void receiveData();
bool connected = false;
bool updated = false;
bool firstButtonPress = false;
const uint8_t address[2][6] = { "rover", "ardui" };
uint16_t disconnectTime = 50;
uint16_t loopDelay = 5;