1
0
Fork 0
Control LED lightstrip ceiling lights with nRF24 module
Go to file
Gottfried Mayer 2af4175531 changed from .ino to .h 2022-12-04 22:15:12 +01:00
.gitattributes initial commit, many untested/unfinished things 2013-07-05 16:37:13 +02:00
.gitignore initial commit, many untested/unfinished things 2013-07-05 16:37:13 +02:00
BrightnessMgt.h changed from .ino to .h 2022-12-04 22:15:12 +01:00
EepromMgt.h changed from .ino to .h 2022-12-04 22:15:12 +01:00
Effect_Fade.h changed from .ino to .h 2022-12-04 22:15:12 +01:00
Effect_Fire.h changed from .ino to .h 2022-12-04 22:15:12 +01:00
Effect_Flicker.h changed from .ino to .h 2022-12-04 22:15:12 +01:00
Effect_PowerOff.h changed from .ino to .h 2022-12-04 22:15:12 +01:00
Effect_Rainbow.h changed from .ino to .h 2022-12-04 22:15:12 +01:00
Effect_Random.h changed from .ino to .h 2022-12-04 22:15:12 +01:00
LEDColorMgt.h changed from .ino to .h 2022-12-04 22:15:12 +01:00
ModeMgt.h changed from .ino to .h 2022-12-04 22:15:12 +01:00
README.md make readme markdown compatible 2018-07-17 15:21:56 +00:00
SpeedMgt.h changed from .ino to .h 2022-12-04 22:15:12 +01:00
gmaLightstrip_RF.ino changed from .ino to .h 2022-12-04 22:15:12 +01:00
nRFMgt.h changed from .ino to .h 2022-12-04 22:15:12 +01:00

README.md

Lightstrip_RF

© 2014 by Gottfried Mayer http://www.gma.name

Overview

Arduino project with one 4m LED Strip (Living Room) and one 2m LED Strip (Bedroom), each 60led/m as ceiling/indirect light. The LED strip has built-in WS2811 controller chip per LED. (Remote) Control possibility with nRF24L01+ RF chip by gmaLightstripNetGateway (LAN to nRF24L01+)

Control Schema

Control schema works like this:

    [Living Room Light]  /  [Bedroom Light]
       [nRF24L01+]            [nRF24L01+]
       
         [2.4GHz wireless transmission]
         
                 [nRF24L01+]
           [gmaLightstripNetGateway]
                 [LAN cable]
                 
                  [Network]
                  
        [Laptop/Smartphone/Tablet/...]
                  [Browser]

gmaRGBLight.h

The missing file gmaRGBLight.h contains all relevant configuration data. Here is an example of this file:

[example gmaRGBLight.h]

#ifndef GMARGBLIGHT_H
#define GMARGBLIGHT_H

#include <Arduino.h>
// !!IMPORTANT!!  -  all reading pipes must share the first 32bits of pipe address (so only the last two digits can be different!!)
#define RF_NORDIC_PIPE         0xA4A4A4A4A4LL // nordic fob read pipe
#define RF_GW_TO_BEDLIGHT_PIPE 0xA4A4A4A401LL // Gateway ==> Bedroom lights
#define RF_BEDLIGHT_TO_GW_PIPE 0xA4A4A4A402LL // Bedroom lights ==> Gateway

#define RF_GW_TO_LIVLIGHT_PIPE 0xA4A4A4A411LL // Gateway ==> Livingroom lights
#define RF_LIVLIGHT_TO_GW_PIPE 0xA4A4A4A412LL // Livingroom lights ==> Gateway


struct rf_nordic_payload_t {
  uint8_t buttons;
  uint16_t id;
  uint8_t empty;
};

struct rf_rgblight_payload_t {
  uint8_t command;
  union {         // union puts two variables in one place ([value] is a synonym for [r])
    uint8_t r;
    uint8_t value;
  };
  uint8_t g;
  uint8_t b;
};

// ethercard stuff
// mac address of ethernet (unique to LAN!)
#define ETHR_LGW_MAC {0x12,0x34,0x12,0x34,0x12,0x34}
// IP Address of Light Gateway (this is the ip to call with jquery)
#define ETHR_LGW_IP  {192,168,1,80}
// Gateway IP Address (Router IP, theoretically not needed...)
#define ETHR_LGW_GW  {192,168,1,254}

#endif

Schematic

TODO

Hardware

Arduino nano (has 3v3 output for nRF24) 2 x 4m LED Strips with WS2811 controller chip built in nRF24L01+ RF Module

Prerequisites

Uses FastLED library by Daniel Garcia to control the LED strips https://github.com/FastLED/FastLED

Uses RF24 library by maniacbug to manage nRF24L01+ radio https://github.com/maniacbug/RF24

Uses EepromAnything (EepromAnything.h) by ?? to handle writing to and reading from EEPROM http://playground.arduino.cc/Code/EEPROMWriteAnything

Credits

Ideas

  • node.js webinterface running on raspberry pi to easily control lightstrips