Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Lightbar.ino
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <WiFi.h>
#include <SPI.h>

#include "constants.h"
#include "config.h"
Expand Down Expand Up @@ -43,6 +44,9 @@ void setup()
Serial.println("# https://github.com/ebinf/lightbar2mqtt #");
Serial.println("##########################################");

SPI.end();
SPI.begin(RADIO_PIN_SCK, RADIO_PIN_MISO, RADIO_PIN_MOSI);

radio.setup();

setupWifi();
Expand Down
9 changes: 9 additions & 0 deletions config-example.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@
// The pin number to which the nRF24's Chip Select Null (CSN) pin is connected.
#define RADIO_PIN_CSN 5

// The pin number to which the nRF24's Master Out Slave In (MOSI) pin is connected.
#define RADIO_PIN_MOSI 23

// The pin number to which the nRF24's Master In Slave Out (MISO) pin is connected.
#define RADIO_PIN_MISO 19

// The pin number to which the nRF24's Serial Clock (SCK) pin is connected.
#define RADIO_PIN_SCK 18

/* -- Light Bars ---------------------------------------------------------------------------------------------- */
// All light bars that should be controlled by this controller. Each light bar must have a unique serial.
// Each entry consists of the serial and the name of the light bar. By default, up to 10 light bars can be added.
Expand Down