Navigation

    • Register
    • Login
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. blacey
    3. Topics
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Topics created by blacey

    • blacey

      Vera Plus compatibility
      Vera • • blacey  

      3
      1
      Votes
      3
      Posts
      2681
      Views

      korttoma

      Now half way on moving z-wave devices, so far so good. Only issue I have has with the VeraPlus is that it seems like the server at home(dot)getvera(dot)com is a bit overloaded so the connection is lost from time to time.
    • blacey

      IR Blaster (progress)
      Hardware • • blacey  

      99
      8
      Votes
      99
      Posts
      73347
      Views

      Simon T.

      For info, Luminara works with USB-UIRT with windows (Eventghost) Code IR ON: 0000 006F 0000 000A 01DD 0054 00F1 0053 002C 007B 002D 007B 002C 007B 007C 002B 002D 007C 002C 007B 007B 002C 007B 0FF1 Code IR OFF: 0000 006F 0000 000A 01DD 0054 00F2 0053 002D 007B 002D 007B 002C 007B 007C 002C 002C 007B 002D 007B 007B 002C 002D 09F6 With Eventghost you can create request HTTP to Trigger IR signal I learned code IR with LM Remote KeyMap beacause EventGhost don't learn signal
    • blacey

      IR Switch for Luminara Candle Automation (repost with video, photos and final sketch)
      My Project • ir blaster ir code • • blacey  

      29
      5
      Votes
      29
      Posts
      20577
      Views

      BulldogLowell

      Wow this is an old topic! But... I was working on a project and thought that anyone who was looking for a NeoPixel candle example that isn't blocking, well this would be the place. It flickers and flutters like a real candle. The only thing is that the flame isn't illuminated like these nice Luminaras, but I'm too cheap to buy them! Keep in mind that my example here uses GRB LEDs, but you merely need to reorder the variables in order to get this working for RGB. Plus the Time Library is not Arduino, so you will have to play with that too for a good randomSeed(). It looks pretty realistic with even a single neoPixel in a sheet of A4 paper rolled into a cylinder. I'll post a video when I can. Have fun with it: #include "neopixel.h" enum CandleStates{ BURN_CANDLE, FLICKER_CANDLE, FLUTTER_CANDLE, MODES_MAX_CANDLE }; enum PixelSelect{ EVERY_PIXEL, SINGLE_PIXEL, }; class Candle : public Adafruit_NeoPixel { public: Candle(uint16_t count, uint8_t pin, uint8_t type); Candle(uint16_t count, uint8_t pin, uint8_t type, PixelSelect pixel, uint32_t pixNum = 0); ~Candle(){}; void update(); private: bool fire(uint8_t greenDropValue, uint32_t cycleTime); PixelSelect _pixelMode = EVERY_PIXEL; uint32_t _pixNum = 0; CandleStates _mode; uint32_t _lastModeChange; uint32_t _modeDuration; uint8_t _redPx = 255; uint8_t _bluePx = 10; //10 for 5v, 15 for 3.3v uint8_t _grnHigh = 100; //110-120 for 5v, 135 for 3.3v uint8_t _grnPx = 100; uint32_t _lastBurnUpdate = 0; int _direction = 1; }; Candle::Candle(uint16_t count, uint8_t pin, uint8_t type) : Adafruit_NeoPixel(count, pin, type) { randomSeed(Time.now() + micros()); _mode = BURN_CANDLE; } Candle::Candle(uint16_t count, uint8_t pin, uint8_t type, PixelSelect pixel, uint32_t pixNum) : Adafruit_NeoPixel(count, pin, type) { _pixelMode = pixel; _pixNum = pixNum; } void Candle::update() { if(millis() - _lastModeChange > _modeDuration) { _mode = static_cast<CandleStates>(random(MODES_MAX_CANDLE)); _modeDuration = random(1000, 8000); _lastModeChange = millis(); //Serial.printlnf("New state: %d\tTime: %d", static_cast<int>(_mode), _modeDuration); } switch(_mode) { case BURN_CANDLE: this->fire(10, 120); break; case FLICKER_CANDLE: this->fire(15, 120); break; case FLUTTER_CANDLE: this->fire(30, 120); break; }; } bool Candle::fire(uint8_t greenDropValue, uint32_t cycleTime) { int currentMillis = millis(); if(currentMillis - _lastBurnUpdate > (cycleTime / greenDropValue / 2)) { _grnPx = constrain(_grnPx += _direction, _grnHigh - greenDropValue, _grnHigh); if(_grnPx == _grnHigh - greenDropValue or _grnPx == _grnHigh) { _direction *= -1; } switch (_pixelMode) { case EVERY_PIXEL: for(int i = 0; i < this->numPixels(); i++) { this->setPixelColor(i, _grnPx, _redPx, _bluePx); } break; case SINGLE_PIXEL: this->setPixelColor(_pixNum, _grnPx, _redPx, _bluePx); break; } this->show(); _lastBurnUpdate = currentMillis; } } #define PIXEL_COUNT 2 #define PIXEL_PIN D2 #define PIXEL_TYPE WS2812B // I'M USING GRB WS2821B's here Candle candle = Candle(PIXEL_COUNT, PIXEL_PIN, PIXEL_TYPE, SINGLE_PIXEL); void setup(void) { Serial.begin(115200); pinMode(13, OUTPUT); candle.begin(); candle.show(); Serial.println("Started program"); } void loop(void) { candle.update(); static uint32_t lastFlashMillis = 0; if(millis() - lastFlashMillis > 250) { digitalWrite(13, !digitalRead(13)); lastFlashMillis = millis(); } }
    • blacey

      Mono - The first open programmable gadget in a handy case from monoLit, a young Danish startup
      General Discussion • • blacey  

      2
      0
      Votes
      2
      Posts
      969
      Views

      gregl

      Looks nice - would be great as a scene controller too.