reiniiriarios / cryptid-bottles

LED Arduino Lighting Project

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cryptid Bottles

WIP board and LED strands

Boards

Setup

  1. Copy wifi-config.example.h to wifi-config.h and fill in values.
  2. Install board following instructions.
  3. Install required libraries (and their dependencies) via Arduino IDE.
    1. Adafruit SAMD
    2. Adafruit SleepyDog
    3. Adafruit NeoPXL8 - see docs
    4. Adafruit NeoPixel
    5. Adafruit ZeroDMA
    6. Adafruit WiFiNiNA - manual install, forked from arduino, see docs
    7. Adafruit INA219
    8. MQTT_Looped
  4. For VS Code, compile to finish intellisense setup.
    1. .vscode/c_cpp_properties.json may update.
  5. Configure defines in cryptid-bottles.h and src/pxl8.h if relevant.

HW Config

NeoPXL8 Connections

  • Output #0 comes from RX (Available; shared by ESPRX)
  • Output #1 comes from TX (Available; shared by ESPTX)
  • Output #2 comes from D9 (Available)
  • Output #3 comes from D6 (Available)
  • Output #4 comes from D13 (Unavailable, used by ESPCS!)
  • Output #5 comes from D12 (Unavailable, used by ESPRST!)
  • Output #6 comes from D11 (Unavailable, used by ESPBUSY!)
  • Output #7 comes from D10 (Available; shared by ESPGPIO0)

Airlift Connections

  • SPIWIFI from SPI
  • SPIWIFI_SS from D13
  • ESP32_RESETN from D12
  • SPIWIFI_ACK from D11
  • ESP32_GPIO0 disabled

Other Connections

  • Pin D8 is connected to the onboard mini NeoPixel.
  • Analog pin A0 used for random seed.
  • Current sensor INA219 connects over I2C at its default address, 0x40.

MQTT Control

Bottles can be controlled over MQTT.

  • Birth and LWT messages sent on cryptid/bottles/status as online/offline.

  • Status messages sent on cryptid/bottles/state in JSON.

  • Discovery (auto-config) messages published for Home Assistant (prefix homeassistant/) on startup, reconnection, and Home Assistant birth messages.

  • Commands for:

    Topic Payload
    on ON/OFF
    brightness 0-255
    rgb 0-255,0-255,0-255, e.g. 0,128,200
    white_balance 30-90 in mireds, e.g. 40, 65
    white 0-255
    effect Default, Glow, Glow White, Faeries, Rain, Rainbow, Test, Test White, Illuminate, Warning
    glow_speed Slow,Medium,Fast
    faerie_speed Slow,Medium,Fast
  • See src/control.cpp for individual command details.

Status LEDs πŸš₯

The two RGB LEDs on both the M4 and ESP32 boards will display:

  • πŸ’š green: Bootloader active (M4 only) (double tap Reset to activate)
  • 🧑 orange: WiFi disconnected, connecting
  • πŸ’œ purple: MQTT disconnected, connecting
  • πŸ’™ cyan: Sending MQTT message
  • πŸ›‘ red: Unknown error

πŸ”Œ The large green LED on the board with the INA219 indicates power, behind main capacitors.

About

LED Arduino Lighting Project


Languages

Language:C++ 95.2%Language:C 4.8%