{"id":17260795,"url":"https://github.com/tjko/brickpico","last_synced_at":"2025-04-14T06:43:13.357Z","repository":{"id":213206235,"uuid":"722355127","full_name":"tjko/brickpico","owner":"tjko","description":"BrickPico - Open Source LED Light Controller","archived":false,"fork":false,"pushed_at":"2025-04-08T06:53:58.000Z","size":11531,"stargazers_count":10,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-08T07:39:07.794Z","etag":null,"topics":["firmware","hardware","home-assistant","http-server","led-controller","lego","mqtt","mqtt-client","open-source","open-source-hardware","oshw","pwm","raspberry-pi","raspberry-pi-pico","rp2040","scpi","telnet-server"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tjko.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"tjko"}},"created_at":"2023-11-23T01:03:10.000Z","updated_at":"2025-03-20T13:52:26.000Z","dependencies_parsed_at":"2023-12-21T06:46:38.921Z","dependency_job_id":"b2723d70-1f79-4457-b2cb-e4c7cdb6f67c","html_url":"https://github.com/tjko/brickpico","commit_stats":{"total_commits":49,"total_committers":1,"mean_commits":49.0,"dds":0.0,"last_synced_commit":"5a13f42f217ae4984f3fb3b3e05ef8abe4832a5b"},"previous_names":["tjko/brickpico"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tjko%2Fbrickpico","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tjko%2Fbrickpico/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tjko%2Fbrickpico/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tjko%2Fbrickpico/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tjko","download_url":"https://codeload.github.com/tjko/brickpico/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248837264,"owners_count":21169373,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["firmware","hardware","home-assistant","http-server","led-controller","lego","mqtt","mqtt-client","open-source","open-source-hardware","oshw","pwm","raspberry-pi","raspberry-pi-pico","rp2040","scpi","telnet-server"],"created_at":"2024-10-15T07:49:15.513Z","updated_at":"2025-04-14T06:43:13.335Z","avatar_url":"https://github.com/tjko.png","language":"C","funding_links":["https://github.com/sponsors/tjko"],"categories":["C"],"sub_categories":[],"readme":"# Brickpico: Smart PWM LED Controller\n[![CI](https://github.com/tjko/brickpico/actions/workflows/cmake.yml/badge.svg)](https://github.com/tjko/brickpico/actions/workflows/cmake.yml)\n[![CodeQL](https://github.com/tjko/brickpico/actions/workflows/codeql.yml/badge.svg)](https://github.com/tjko/brickpico/actions/workflows/codeql.yml)\n\nBricpico is a smart PWM LED controller based around [Raspberry Pi Pico](https://www.raspberrypi.com/documentation/microcontrollers/raspberry-pi-pico.html) (RP2040 MCU).\nBrickpico is mainly meant to controlling various LED lights on LEGO models, but can be used to control any LED lights (or other small loads).\n\nBrickpico operates as standalone controller that incorporates programmable timer to turn lights on/off on a schedule.\nBrickPico is an Open-source hardware (OSHW) project.\n\n![LEGO Millennium Falcon](images/falcon.png)\n\n\n## Features\n* Controls up to 8 to 16 separete channels (LED group)\n* Adjustable output brightness (via PWM)\n* Adjustable output voltage 5V or 3.3V\n* Up to 200mA current output per port (each port has resettable fuse).\n* Programmable PWM frequency from 10 to 100000 Hz\n* Configurable Lightness/Gamma correction\n* Support for configurable lighting \"effects\" on each channel\n* Connectors for common Lego light kits (Light My Bricks, etc.) as well as 2.54mm pin header.\n* OLED display module support (128x64 or 128x128)\n* Configuration stored on the device itself (in the flash memory).\n* SCPI \"like\" programming interface (see [Command Reference](commands.md))\n* WiFi support if opting to mount Pico W on the board. This turns fanpico to \"IoT\" device with basic web interface.\n* MQTT support for sending status and to receive commands.\n* Home Assistant (MQTT Discovery) support\n* Telnet support for remote configuration and monitoring.\n\n[![BrickPico](images/brickpico-08-small.jpg)](images/brickpico-08.jpg?raw=true)\n\n### Interfaces\n\n* Serial \"Console\". Primary method for configuring/monitoring FanPico units is via (USB) Serial console (some units also have 3.3V TTL Serial connection).\n* Telnet server allows configuration and monitoring over network.\n* Web Interface (available when using _Pico W_) over WiFi\n\n   [![BrickPico](images/brickpico-web-small.png)](images/brickpico-web.png?raw=true)\n\nFor more documentation check [BrickPico Wiki](https://github.com/tjko/brickpico/wiki)\n\n\n## Where can I get one?\nInitially BrickPico is only available as a DIY kit. For places to buy kits, check discussions: [Where to Buy BrickPico](https://github.com/tjko/brickpico/discussions/5)\n\n(Instructions for building the kit can be found at: [BrickPico Wiki](https://github.com/tjko/brickpico/wiki)\n\n\n### DIY Option\nYou can upload the Kerber files (found under boards directory) to your favorite PCB maker website and get your boards produced in matter of days.\nComponent list (BOM or bill of materials) is found under boards directory as well along with the electrical schematics.\n\n\n### Review Units\nIf you are member of press (or YouTuber) and would like to review/test Brickpico. Please contact me via email.\n\n\n## How Can I help?\n* Build your own BrickPico and provide feedback, suggestions (see discussion forums).\n* If you're into electronics new/improved board designs are most welcome.\n* If you're into programming:\n  - Create cool (desktop) program that allows easily configuring/controlling BrickPico boards.\n  - Help improve the firmware.\n* If you're into graphics (or web) design:\n  - Help create cool (but lightweight) web interface\n  - Create better logo for BrickPico\n* As this is Open (Source) Hardware Project, if you like to build (and sell) assembled boards or DIY kits, you'd be most welcome...\n* You can always donate (and get your name added to the Sponsors section, if you so wish).\n\n\n## Hardware\nBrickPico is Open Source Hardware, reference design is provided for the \"08\" model (8 outputs) and \"16\" model (16 outputs).\n\nAdditional models with different combinations of fan outputs could be easily designed (takining into account limitations of Raspberry Pi Pico I/O limits). New and improved PCB models/designs are most welcome.\n\nBrickPico is loosely based on FanPico:\n* [FanPico](https://github.com/tjko/fanpico/) - Open Source Smart PWM (PC) Fan Controller.\n\n### Models (PCB designs)\nCurrently following models are available:\n\n|Model|Outputs|Notes|\n|-----|-------|-----|\n|[BRICKPICO-08](boards/brickpico-8/)|8||\n|[BRICKPICO-16](boards/brickpico-16/)|16|PCB under development|\n\n\n\n## Firmware\nFirmware is developed in C using the Pico SDK. Pre-compiled firmware is released when there is new major features or bug fixes.\n\nLatest pre-compiled firmware image can be found here: [Releases](https://github.com/tjko/brickpico/releases)\n\nTo get latest firmware with latest updates/fixes you must compile the firmware from the sources.\n\n\n### Installing firmware image\nFirmware can be installed via the built-in UF2 bootloader on the Raspberry Pi Pico or using the debug header with Picoprobe, etc...\n\n#### Selecting Right Firmware to use\nEach release (zip file) contains multiple different firmware files.\nMake sure to select firmware for the board you're using and for the pico model (\"pico_w\" if using Pico W).\n\nFirmware file names have format: brickpico-\u003cboard_model\u003e-\u003cpico_model\u003e.uf2\n```\nbrickpico-08-pico.uf2\nbrickpico-08-pico_w.uf2\nbrickpico-16-pico.uf2\nbrickpico-16-pico_w.uf2\n```\n\n#### Upgrading Firmware\nFirmware upgrade steps:\n* Boot Pico into UF2 bootloader. This can be done in two ways:\n  1)  Press and hold \"bootsel\" button and then press and release \"reset\" button.\n  2)  Issue command: SYS:UPGRADE\n* Copy firmware file to the USB mass storage device that appears.\n* As soon as firmware copy is complete, Pico will reboot and run the fanpico firmware.\n\n### Building Firmware Images\n\nRaspberry Pi Pico C/C++ SDK is required for compiling the firmware:\n\n#### Requirements / Dependencies\n* [Raspberry Pi Pico C/C++ SDK](https://www.raspberrypi.com/documentation/microcontrollers/c_sdk.html)\n* [cJSON](https://github.com/DaveGamble/cJSON)\n* [pico-lfs](https://github.com/tjko/pico-lfs)\n* [ss_oled-lib](https://github.com/tjko/ss_oled-lib)\n* [libb64](https://github.com/libb64/libb64)\n* [pico-telnetd](https://github.com/tjko/pico-telnetd)\n\n##### Install Pico SDK\nPico SDK must be installed working before you can compile fanpico.\n\nInstructions on installing Pico SDK see: [Getting started with Raspberry Pi Pico](https://datasheets.raspberrypi.com/pico/getting-started-with-pico.pdf)\n\n(Make sure PICO_SDK_PATH environment variable is set)\n\n##### Downloading sources\n\nCreate some directory for building fanpico ('src' used in this example):\n```\n$ mkdir src\n$ cd src\n$ git clone https://github.com/tjko/brickpico.git\n$ git submodule update --init --recursive\n```\n\n##### Building fanpico firmware\n\nTo build brickpico firmware, first create a build directory:\n```\n$ cd brickpico\n$ mkdir build\n```\n\nSelect which board to build firmware for (default is \"08\") and which Pico is to be used (default is \"pico_w\"):\n```\n$ cd build\n$ cmake -DBRICKPICO_BOARD=16 -DPICO_BOARD=pico_w ..\n```\n\nThen compile fanpico:\n```\n$ make -j\n```\n\nAfter successful compile you should see firmware binary in the build directory:\nsubdirectory:\n\n```\n$ ls *.uf2\nbrickpico.uf2\n```\n\nIf you have picotool installed you can check the firmware image information:\n```\n$ picotool info -a brickpico.uf2\nFile brickpico.uf2:\n\nProgram Information\n name:              brickpico\n version:           1.3.0 (Jan  9 2025)\n web site:          https://github.com/tjko/brickpico/\n description:       BrickPico-08 - Smart LED Controller\n features:          USB stdin / stdout\n binary start:      0x10000000\n binary end:        0x100b3910\n\nFixed Pin Information\n 0:                 TX (Serial)\n 1:                 RX (Serial)\n 2:                 SCK (SPI)\n 3:                 MOSI (SPI)\n 4:                 MISO (SPI)\n 5:                 CS (SPI)\n 6:                 PWM7 signal (output)\n 7:                 PWM8 signal (output)\n 16:                PWM1 signal (output)\n 17:                PWM2 signal (output)\n 18:                PWM3 signal (output)\n 19:                PWM4 signal (output)\n 20:                PWM5 signal (output)\n 21:                PWM6 signal (output)\n 22:                LCD DC (SPI)\n 26:                SDA (I2C)\n 27:                SCL (I2C)\n 28:                LCD Reset (SPI)\n\nBuild Information\n sdk version:       2.1.0\n pico_board:        pico_w\n boot2_name:        boot2_w25q080\n build date:        Dec 30 2024\n build attributes:  Release\n\nMetadata Blocks\n none\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftjko%2Fbrickpico","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftjko%2Fbrickpico","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftjko%2Fbrickpico/lists"}