pin definitions in a dedicated file

This commit is contained in:
Nicu Hodos 2024-05-18 20:41:55 +02:00
parent d665b12c71
commit 3152375623
4 changed files with 13 additions and 9 deletions

View File

@ -1,10 +1,5 @@
#include <TaskScheduler.h>
#define SEND_PIN 14
#define RECEIVE_PIN 12
#define RED_LED LED_BUILTIN
#define BLUE_LED 2
using namespace std;
Scheduler ts;

12
gateway/include/pins.h Normal file
View File

@ -0,0 +1,12 @@
#pragma once
#if defined(ESP8266)
#define SEND_PIN 14
#define RECEIVE_PIN 12
#define RED_LED LED_BUILTIN
#define BLUE_LED 2
#else
#define RESET_PIN 10
#define SEND_PIN 11
#define RECEIVE_PIN 2
#endif

View File

@ -1,9 +1,5 @@
#include "output.h"
#define RESET_PIN 10
#define SEND_PIN 11
#define RECEIVE_PIN 2
namespace Board {
void setup() {

View File

@ -1,6 +1,7 @@
#include <Arduino.h>
#include <RCSwitch.h>
#include <SerialReader.h>
#include "pins.h"
#include "Dht.h"
#include "Protocol_1.h"
#include "Protocol_2.h"