├── .ci └── warning.md ├── .doxygen └── Doxyfile ├── .eslintrc.json ├── .github ├── ISSUE_TEMPLATE │ ├── bug-report.md │ └── feature_request.md └── workflows │ ├── build.yml │ └── doxygen.yml ├── .gitignore ├── .scripts ├── CopyTargets.py ├── GetEthLibs.py ├── ci-firmware.py ├── deleteSD.py ├── download_fs.py ├── pio-version.py └── replace_fs.py ├── .vscode └── extensions.json ├── Changelog.md ├── ESP32_partitions.csv ├── ESP8266_loader.ld ├── README.md ├── SupportingDocs ├── APA102-2020 SMD LED.pdf ├── APA109.pdf ├── CS8812-LED-Chip-Datasheet.pdf ├── DDP_PROTOCOL.pdf ├── ESP32.PDF ├── FSEQ_Sequence_File_Format.txt ├── GS8206eng_v170627.pdf ├── GS8208 LED Datasheet.pdf ├── HD107S-NEWSTAR.pdf ├── LPD6803.pdf ├── MY9221-MY-Semi.pdf ├── MY9231_BF_0.91.pdf ├── MY9291-MY-Semi.pdf ├── P9813.pdf ├── SK6812-Datasheet.pdf ├── SK6813 LED Datasheet.pdf ├── SM16703ICdatasheet.pdf ├── SM16716-Sunmoon.pdf ├── SupportedPixels.xlsx ├── TLS3001-TERALANESEMICONDUCTOR.pdf ├── TLS3001_Chinese.docx ├── TLS3001_Chinese.pdf ├── TLS3001_Chinese.txt ├── TM1803-TitanMicro.pdf ├── TM1804-TitanMicro.pdf ├── TM1809-Titan.pdf ├── TM1814-TitanMicro.pdf ├── TM1829-TitanMicroElectronics.pdf ├── UCS1903_ETC.pdf ├── UCS1903_IC-manul.pdf ├── UCS1904-ETC.pdf ├── UCS2903-ETC.pdf ├── UCS8903-UCS.pdf ├── UCS8903-UCS.txt ├── WS2801.pdf ├── WS2811.pdf ├── cdcs503-q1.ClockDriver.pdf ├── esp32_technical_reference_manual_en.pdf ├── esp8266-technical_reference_en.pdf ├── lpd8806+english.pdf ├── sk6822_led-datasheet.pdf └── sm16704-datasheet-en.pdf ├── dist ├── ESPSFlashTool.jar ├── README.md ├── bin │ ├── esptool │ │ ├── CONTRIBUTING.md │ │ ├── LICENSE │ │ ├── MANIFEST.in │ │ ├── README.md │ │ ├── ecdsa │ │ │ ├── __init__.py │ │ │ ├── _version.py │ │ │ ├── curves.py │ │ │ ├── der.py │ │ │ ├── ecdsa.py │ │ │ ├── ellipticcurve.py │ │ │ ├── keys.py │ │ │ ├── numbertheory.py │ │ │ ├── rfc6979.py │ │ │ ├── six.py │ │ │ ├── test_pyecdsa.py │ │ │ └── util.py │ │ ├── espefuse.py │ │ ├── espsecure.py │ │ ├── esptool.py │ │ ├── flasher_stub │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── compare_stubs.py │ │ │ ├── esptool_test_stub.py │ │ │ ├── include │ │ │ │ ├── miniz.h │ │ │ │ ├── rom_functions.h │ │ │ │ ├── slip.h │ │ │ │ ├── soc_support.h │ │ │ │ ├── stub_commands.h │ │ │ │ ├── stub_flasher.h │ │ │ │ └── stub_write_flash.h │ │ │ ├── ld │ │ │ │ ├── rom_32.ld │ │ │ │ ├── rom_8266.ld │ │ │ │ ├── stub_32.ld │ │ │ │ └── stub_8266.ld │ │ │ ├── miniz.c │ │ │ ├── run_tests_with_stub.sh │ │ │ ├── slip.c │ │ │ ├── stub_commands.c │ │ │ ├── stub_flasher.c │ │ │ ├── stub_write_flash.c │ │ │ └── wrap_stub.py │ │ ├── pyaes │ │ │ ├── __init__.py │ │ │ ├── aes.py │ │ │ ├── blockfeeder.py │ │ │ └── util.py │ │ ├── serial │ │ │ ├── __init__.py │ │ │ ├── rfc2217.py │ │ │ ├── rs485.py │ │ │ ├── serialcli.py │ │ │ ├── serialjava.py │ │ │ ├── serialposix.py │ │ │ ├── serialutil.py │ │ │ ├── serialwin32.py │ │ │ ├── threaded │ │ │ │ └── __init__.py │ │ │ ├── tools │ │ │ │ ├── __init__.py │ │ │ │ ├── hexlify_codec.py │ │ │ │ ├── list_ports.py │ │ │ │ ├── list_ports_common.py │ │ │ │ ├── list_ports_linux.py │ │ │ │ ├── list_ports_osx.py │ │ │ │ ├── list_ports_posix.py │ │ │ │ ├── list_ports_windows.py │ │ │ │ └── miniterm.py │ │ │ ├── urlhandler │ │ │ │ ├── __init__.py │ │ │ │ ├── protocol_alt.py │ │ │ │ ├── protocol_hwgrep.py │ │ │ │ ├── protocol_loop.py │ │ │ │ ├── protocol_rfc2217.py │ │ │ │ ├── protocol_socket.py │ │ │ │ └── protocol_spy.py │ │ │ └── win32.py │ │ ├── setup.cfg │ │ ├── setup.py │ │ └── test │ │ │ ├── README.md │ │ │ ├── ecdsa_secure_boot_signing_key2.pem │ │ │ ├── elf2image │ │ │ ├── esp32-app-template.elf │ │ │ ├── esp32-bootloader.elf │ │ │ ├── esp32-too-many-sections.elf │ │ │ ├── esp8266-nonossdkv12-example.elf │ │ │ ├── esp8266-nonossdkv20-at-v2.elf │ │ │ ├── esp8266-nonosssdk20-iotdemo.elf │ │ │ └── esp8266-openrtos-blink-v2.elf │ │ │ ├── images │ │ │ ├── aes_key.bin │ │ │ ├── bootloader.bin │ │ │ ├── esp8266_deepsleep.bin │ │ │ ├── esp8266_sdk │ │ │ │ ├── 4096_user1.bin │ │ │ │ ├── blank.bin │ │ │ │ ├── boot_v1.4(b1).bin │ │ │ │ └── esp_init_data_default.bin │ │ │ ├── fifty_kb.bin │ │ │ ├── helloworld-esp32.bin │ │ │ ├── helloworld-esp32_edit.bin │ │ │ ├── helloworld-esp8266.bin │ │ │ ├── nodemcu-master-7-modules-2017-01-19-11-10-03-integer.bin │ │ │ ├── one_kb.bin │ │ │ ├── one_kb_all_ef.bin │ │ │ ├── one_mb.bin │ │ │ ├── one_mb_zeroes.bin │ │ │ ├── onebyte.bin │ │ │ ├── partitions_singleapp.bin │ │ │ ├── sector.bin │ │ │ ├── unaligned.bin │ │ │ └── zerolength.bin │ │ │ ├── secure_images │ │ │ ├── 256bit_iv.bin │ │ │ ├── 256bit_key.bin │ │ │ ├── bootloader-encrypted-conf0.bin │ │ │ ├── bootloader-encrypted-conf3.bin │ │ │ ├── bootloader-encrypted-conf9.bin │ │ │ ├── bootloader-encrypted-confc.bin │ │ │ ├── bootloader-encrypted.bin │ │ │ ├── bootloader.bin │ │ │ ├── bootloader_digested.bin │ │ │ ├── bootloader_signed.bin │ │ │ ├── digest_iv.bin │ │ │ ├── ecdsa_secure_boot_signing_key.pem │ │ │ ├── ecdsa_secure_boot_signing_key2.pem │ │ │ ├── ecdsa_secure_boot_signing_pubkey.pem │ │ │ ├── ecdsa_secure_boot_signing_pubkey2.pem │ │ │ ├── ef-flashencryption-key.bin │ │ │ ├── hello-world-signed-encrypted.bin │ │ │ └── hello-world-signed.bin │ │ │ ├── test_espefuse.py │ │ │ ├── test_espsecure.py │ │ │ ├── test_esptool.py │ │ │ └── test_imagegen.py │ ├── linux64 │ │ └── mklittlefs │ ├── macos │ │ └── mklittlefs │ ├── pyserial │ │ ├── CHANGES.rst │ │ ├── LICENSE.txt │ │ ├── MANIFEST.in │ │ ├── README.rst │ │ ├── documentation │ │ │ ├── Makefile │ │ │ ├── appendix.rst │ │ │ ├── conf.py │ │ │ ├── examples.rst │ │ │ ├── index.rst │ │ │ ├── pyserial.png │ │ │ ├── pyserial.rst │ │ │ ├── pyserial_api.rst │ │ │ ├── shortintro.rst │ │ │ ├── tools.rst │ │ │ └── url_handlers.rst │ │ ├── examples │ │ │ ├── at_protocol.py │ │ │ ├── port_publisher.py │ │ │ ├── port_publisher.sh │ │ │ ├── rfc2217_server.py │ │ │ ├── setup-miniterm-py2exe.py │ │ │ ├── setup-rfc2217_server-py2exe.py │ │ │ ├── setup-wxTerminal-py2exe.py │ │ │ ├── tcp_serial_redirect.py │ │ │ ├── wxSerialConfigDialog.py │ │ │ ├── wxSerialConfigDialog.wxg │ │ │ ├── wxTerminal.py │ │ │ └── wxTerminal.wxg │ │ ├── pylintrc │ │ ├── requirements.txt │ │ ├── serial │ │ │ ├── __init__.py │ │ │ ├── rfc2217.py │ │ │ ├── rs485.py │ │ │ ├── serialcli.py │ │ │ ├── serialjava.py │ │ │ ├── serialposix.py │ │ │ ├── serialutil.py │ │ │ ├── serialwin32.py │ │ │ ├── threaded │ │ │ │ └── __init__.py │ │ │ ├── tools │ │ │ │ ├── __init__.py │ │ │ │ ├── hexlify_codec.py │ │ │ │ ├── list_ports.py │ │ │ │ ├── list_ports_common.py │ │ │ │ ├── list_ports_linux.py │ │ │ │ ├── list_ports_osx.py │ │ │ │ ├── list_ports_posix.py │ │ │ │ ├── list_ports_windows.py │ │ │ │ └── miniterm.py │ │ │ ├── urlhandler │ │ │ │ ├── __init__.py │ │ │ │ ├── protocol_alt.py │ │ │ │ ├── protocol_hwgrep.py │ │ │ │ ├── protocol_loop.py │ │ │ │ ├── protocol_rfc2217.py │ │ │ │ ├── protocol_socket.py │ │ │ │ └── protocol_spy.py │ │ │ └── win32.py │ │ ├── setup.cfg │ │ ├── setup.py │ │ └── test │ │ │ ├── handlers │ │ │ ├── __init__.py │ │ │ └── protocol_test.py │ │ │ ├── run_all_tests.py │ │ │ ├── test.py │ │ │ ├── test_advanced.py │ │ │ ├── test_asyncio.py │ │ │ ├── test_cancel.py │ │ │ ├── test_context.py │ │ │ ├── test_exclusive.py │ │ │ ├── test_high_load.py │ │ │ ├── test_iolib.py │ │ │ ├── test_pty.py │ │ │ ├── test_readline.py │ │ │ ├── test_rfc2217.py │ │ │ ├── test_rs485.py │ │ │ ├── test_settings_dict.py │ │ │ ├── test_threaded.py │ │ │ ├── test_timeout_class.py │ │ │ ├── test_url.py │ │ │ └── test_util.py │ ├── upload.py │ └── win32 │ │ ├── mklittlefs.exe │ │ └── python3 │ │ ├── LICENSE.txt │ │ ├── _asyncio.pyd │ │ ├── _bz2.pyd │ │ ├── _ctypes.pyd │ │ ├── _decimal.pyd │ │ ├── _elementtree.pyd │ │ ├── _hashlib.pyd │ │ ├── _lzma.pyd │ │ ├── _msi.pyd │ │ ├── _multiprocessing.pyd │ │ ├── _overlapped.pyd │ │ ├── _queue.pyd │ │ ├── _socket.pyd │ │ ├── _sqlite3.pyd │ │ ├── _ssl.pyd │ │ ├── _uuid.pyd │ │ ├── _zoneinfo.pyd │ │ ├── libcrypto-1_1.dll │ │ ├── libffi-7.dll │ │ ├── libssl-1_1.dll │ │ ├── pyexpat.pyd │ │ ├── python.cat │ │ ├── python.exe │ │ ├── python3.dll │ │ ├── python39._pth │ │ ├── python39.dll │ │ ├── python39.zip │ │ ├── pythonw.exe │ │ ├── select.pyd │ │ ├── sqlite3.dll │ │ ├── unicodedata.pyd │ │ ├── vcruntime140.dll │ │ └── winsound.pyd ├── firmware │ ├── README.md │ └── firmware.json ├── fs │ └── config.json └── lib │ ├── flatlaf-2.6.jar │ ├── gson-2.7.jar │ └── jSerialComm-2.10.3.jar ├── gulpfile.mjs ├── gulpme.bat ├── html ├── NodeJsServer.cjs ├── README.md ├── UpdRecipe.json ├── alexa.html ├── apa102.html ├── artnet.html ├── css │ ├── bootstrap.css │ ├── dropzone.css │ └── style.css ├── ddp.html ├── dmx.html ├── e1_31.html ├── effects.html ├── favicon.ico ├── fpp_remote.html ├── gece.html ├── grinch.html ├── gs8208.html ├── index.html ├── js │ ├── FileSaver.js │ ├── bootstrap.js │ ├── dropzone.js │ ├── jqColorPicker.js │ ├── jquery-3.5.1.js │ └── jquery.cookie.js ├── mqtt.html ├── relay.html ├── renard.html ├── script.js ├── serial.html ├── server.bat ├── servo_pca9685.html ├── tls3001.html ├── tm1814.html ├── ucs1903.html ├── ucs8903.html ├── ws2801.html └── ws2811.html ├── include ├── ConstNames.hpp ├── EFUpdate.h ├── ESPixelStick.h ├── FastTimer.hpp ├── FileMgr.hpp ├── GPIO_Defs.hpp ├── UnzipFiles.hpp ├── WebMgr.hpp ├── input │ ├── InputAlexa.h │ ├── InputArtnet.hpp │ ├── InputCommon.hpp │ ├── InputDDP.h │ ├── InputDisabled.hpp │ ├── InputE131.hpp │ ├── InputEffectEngine.hpp │ ├── InputFPPRemote.h │ ├── InputFPPRemotePlayEffect.hpp │ ├── InputFPPRemotePlayEffectFsm.hpp │ ├── InputFPPRemotePlayFile.hpp │ ├── InputFPPRemotePlayFileFsm.hpp │ ├── InputFPPRemotePlayItem.hpp │ ├── InputFPPRemotePlayList.hpp │ ├── InputFPPRemotePlayListFsm.hpp │ ├── InputMQTT.h │ ├── InputMgr.hpp │ └── externalInput.h ├── memdebug.h ├── network │ ├── EthernetDriver.hpp │ ├── NetworkMgr.hpp │ └── WiFiDriver.hpp ├── output │ ├── OutputAPA102.hpp │ ├── OutputAPA102Spi.hpp │ ├── OutputCommon.hpp │ ├── OutputDisabled.hpp │ ├── OutputGECE.hpp │ ├── OutputGECEFrame.hpp │ ├── OutputGECERmt.hpp │ ├── OutputGECEUart.hpp │ ├── OutputGS8208.hpp │ ├── OutputGS8208Rmt.hpp │ ├── OutputGS8208Uart.hpp │ ├── OutputGrinch.hpp │ ├── OutputGrinchSpi.hpp │ ├── OutputMgr.hpp │ ├── OutputPixel.hpp │ ├── OutputRelay.hpp │ ├── OutputRmt.hpp │ ├── OutputSerial.hpp │ ├── OutputSerialRmt.hpp │ ├── OutputSerialUart.hpp │ ├── OutputServoPCA9685.hpp │ ├── OutputSpi.hpp │ ├── OutputTLS3001.hpp │ ├── OutputTLS3001Rmt.hpp │ ├── OutputTM1814.hpp │ ├── OutputTM1814Rmt.hpp │ ├── OutputTM1814Uart.hpp │ ├── OutputUCS1903.hpp │ ├── OutputUCS1903Rmt.hpp │ ├── OutputUCS1903Uart.hpp │ ├── OutputUCS8903.hpp │ ├── OutputUCS8903Rmt.hpp │ ├── OutputUCS8903Uart.hpp │ ├── OutputUart.hpp │ ├── OutputWS2801.hpp │ ├── OutputWS2801Spi.hpp │ ├── OutputWS2811.hpp │ ├── OutputWS2811Rmt.hpp │ └── OutputWS2811Uart.hpp ├── platforms │ ├── GPIO_Defs_ESP32_Bong69.hpp │ ├── GPIO_Defs_ESP32_BreakDanceV2.hpp │ ├── GPIO_Defs_ESP32_CAM.hpp │ ├── GPIO_Defs_ESP32_D1_MINI.hpp │ ├── GPIO_Defs_ESP32_D1_MINI_ETH.hpp │ ├── GPIO_Defs_ESP32_DevkitC.hpp │ ├── GPIO_Defs_ESP32_ESP3DEUXQuattro_DMX.hpp │ ├── GPIO_Defs_ESP32_FOO.hpp │ ├── GPIO_Defs_ESP32_KA.hpp │ ├── GPIO_Defs_ESP32_KA_4.hpp │ ├── GPIO_Defs_ESP32_LoLin_D32_PRO.hpp │ ├── GPIO_Defs_ESP32_LoLin_D32_PRO_ETH.hpp │ ├── GPIO_Defs_ESP32_M5Stack_Atom.hpp │ ├── GPIO_Defs_ESP32_MH_ET_LIVE_MiniKit.hpp │ ├── GPIO_Defs_ESP32_Octa2go.hpp │ ├── GPIO_Defs_ESP32_Olimex_Gateway.hpp │ ├── GPIO_Defs_ESP32_QUINLED_Dig-Octa.hpp │ ├── GPIO_Defs_ESP32_QUINLED_QUAD.hpp │ ├── GPIO_Defs_ESP32_QUINLED_QUAD_AE_Plus.hpp │ ├── GPIO_Defs_ESP32_QUINLED_QUAD_AE_Plus_8.hpp │ ├── GPIO_Defs_ESP32_QUINLED_QUAD_ETH.hpp │ ├── GPIO_Defs_ESP32_QUINLED_UNO.hpp │ ├── GPIO_Defs_ESP32_QUINLED_UNO_AE_Plus.hpp │ ├── GPIO_Defs_ESP32_QUINLED_UNO_ESPSV3.hpp │ ├── GPIO_Defs_ESP32_QUINLED_UNO_ETH.hpp │ ├── GPIO_Defs_ESP32_QUINLED_UNO_ETH_ESPSV3.hpp │ ├── GPIO_Defs_ESP32_Solo2go.hpp │ ├── GPIO_Defs_ESP32_TTGO_T8.hpp │ ├── GPIO_Defs_ESP32_TWILIGHTLORD.hpp │ ├── GPIO_Defs_ESP32_TWILIGHTLORD_ETH.hpp │ ├── GPIO_Defs_ESP32_Tetra2go.hpp │ ├── GPIO_Defs_ESP32_WT32ETH01.hpp │ ├── GPIO_Defs_ESP32_WT32ETH01_Wasatch.hpp │ ├── GPIO_Defs_ESP32_generic.hpp │ ├── GPIO_Defs_ESP32_kr_lights_msm.hpp │ ├── GPIO_Defs_ESP8266_D1_mini_lolinsd.hpp │ ├── GPIO_Defs_ESP8266_ESP01S.hpp │ ├── GPIO_Defs_ESP8266_ESPS_V3.hpp │ └── GPIO_Defs_ESP8266_Generic.hpp ├── service │ ├── FPPDiscovery.h │ ├── SensorDS18B20.h │ └── fseq.h └── utility │ ├── SaferStringConversion.hpp │ └── backported.h ├── jsconfig.json ├── package.json ├── platformio.ini ├── platformio_user.ini.sample ├── src ├── ConstNames.cpp ├── EFUpdate.cpp ├── FastTimer.cpp ├── FileMgr.cpp ├── UnzipFiles.cpp ├── WebMgr.cpp ├── input │ ├── InputAlexa.cpp │ ├── InputArtnet.cpp │ ├── InputCommon.cpp │ ├── InputDDP.cpp │ ├── InputDisabled.cpp │ ├── InputE131.cpp │ ├── InputEffectEngine.cpp │ ├── InputFPPRemote.cpp │ ├── InputFPPRemotePlayEffect.cpp │ ├── InputFPPRemotePlayEffectFsm.cpp │ ├── InputFPPRemotePlayFile.cpp │ ├── InputFPPRemotePlayFileFsm.cpp │ ├── InputFPPRemotePlayItem.cpp │ ├── InputFPPRemotePlayList.cpp │ ├── InputFPPRemotePlayListFsm.cpp │ ├── InputMQTT.cpp │ ├── InputMgr.cpp │ └── externalInput.cpp ├── main.cpp ├── network │ ├── EthernetDriver.cpp │ ├── NetworkMgr.cpp │ └── WiFiDriver.cpp ├── output │ ├── OutputAPA102.cpp │ ├── OutputAPA102Spi.cpp │ ├── OutputCommon.cpp │ ├── OutputDisabled.cpp │ ├── OutputGECE.cpp │ ├── OutputGECERmt.cpp │ ├── OutputGECEUart.cpp │ ├── OutputGS8208.cpp │ ├── OutputGS8208Rmt.cpp │ ├── OutputGS8208Uart.cpp │ ├── OutputGrinch.cpp │ ├── OutputGrinchSpi.cpp │ ├── OutputMgr.cpp │ ├── OutputPixel.cpp │ ├── OutputRelay.cpp │ ├── OutputRmt.cpp │ ├── OutputSerial.cpp │ ├── OutputSerialRmt.cpp │ ├── OutputSerialUart.cpp │ ├── OutputServoPCA9685.cpp │ ├── OutputSpi.cpp │ ├── OutputTLS3001.cpp │ ├── OutputTLS3001Rmt.cpp │ ├── OutputTM1814.cpp │ ├── OutputTM1814Rmt.cpp │ ├── OutputTM1814Uart.cpp │ ├── OutputUCS1903.cpp │ ├── OutputUCS1903Rmt.cpp │ ├── OutputUCS1903Uart.cpp │ ├── OutputUCS8903.cpp │ ├── OutputUCS8903Rmt.cpp │ ├── OutputUCS8903Uart.cpp │ ├── OutputUart.cpp │ ├── OutputWS2801.cpp │ ├── OutputWS2801Spi.cpp │ ├── OutputWS2811.cpp │ ├── OutputWS2811Rmt.cpp │ └── OutputWS2811Uart.cpp └── service │ ├── FPPDiscovery.cpp │ └── SensorDS18B20.cpp └── tools ├── README.md └── fseqinfo.py /.ci/warning.md: -------------------------------------------------------------------------------- 1 | Development Release (Auto-Generated) 2 | ==================================== 3 | 4 | This release is meant for testing purposes and **is not** considered stable. The latest stable release can be found on the [GitHub Release Page](https://github.com/forkineye/ESPixelStick/releases/latest). 5 | 6 | This release was auto-generated by [GitHub Actions](https://github.com/forkineye/ESPixelStick/actions). 7 | -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "browser": true, 4 | "commonjs": true, 5 | "es2021": true, 6 | "jquery": true 7 | }, 8 | "extends": "eslint:recommended", 9 | "parserOptions": { 10 | "ecmaVersion": 12 11 | }, 12 | "rules": { 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug-report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug Report 3 | about: Submit a bug report for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | --------- Instructions -------- 11 | Please provide answers directly below each section. 12 | --------- Instructions --------- 13 | 14 | **ESPixelStick Firmware Version** 15 | 16 | 17 | **Hardware Version** 18 | 19 | 20 | **Binary release or compiled yourself?** 21 | 22 | 23 | **Operating System (and version)** 24 | 25 | 26 | **Web Browser (and version)** 27 | 28 | 29 | **Access Point** 30 | 31 | 32 | **Describe the bug** 33 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Additional context** 17 | Add any other context or screenshots about the feature request here. 18 | -------------------------------------------------------------------------------- /.github/workflows/doxygen.yml: -------------------------------------------------------------------------------- 1 | name: Doxygen 2 | on: 3 | push: 4 | branches: 5 | - main 6 | jobs: 7 | gendocs: 8 | runs-on: ubuntu-latest 9 | steps: 10 | # Checkout ESPixelStick 11 | - uses: actions/checkout@v4 12 | 13 | - name: Build doxygen pages 14 | uses: mattnotmitt/doxygen-action@v1 15 | with: 16 | additional-packages: font-fira-code-nerd 17 | working-directory: ".doxygen" 18 | doxyfile-path: "Doxyfile" 19 | 20 | - name: Deploy to gh-pages 21 | uses: peaceiris/actions-gh-pages@v4 22 | with: 23 | github_token: ${{ secrets.GITHUB_TOKEN }} 24 | publish_dir: .doxygen/doc/html 25 | destination_dir: doxy 26 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /debug/ 2 | /firmware/ 3 | /.doxygen/doc/ 4 | /.vscode/ 5 | !/.vscode/extensions.json 6 | /dist/*.html 7 | /node_modules/ 8 | /data 9 | /.pio 10 | __pycache__ 11 | platformio_user.ini 12 | secrets.h 13 | firmware.map 14 | MyEnv.txt 15 | Changelog.pdf 16 | *.ino.generic.bin 17 | *.gz 18 | *.pyc -------------------------------------------------------------------------------- /.scripts/GetEthLibs.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | Import("env") 4 | 5 | PROJECT_DIR = env['PROJECT_DIR'] 6 | REPO_NAME = "esp-eth-drivers" 7 | REPO_URL = "https://github.com/espressif" 8 | LIBRARY_DIR = PROJECT_DIR + "/Libraries" + "/" + REPO_NAME 9 | 10 | print ("PROJECT_DIR:" + PROJECT_DIR) 11 | print ("LIBRARY_DIR:" + LIBRARY_DIR) 12 | print (" REPO_NAME:" + REPO_NAME) 13 | print (" REPO_URL:" + REPO_URL) 14 | 15 | if not os.path.exists(LIBRARY_DIR): 16 | print ("Clone " + REPO_NAME + " Libray") 17 | env.Execute("git clone --depth 100 " + REPO_URL + "/" + REPO_NAME + " " + LIBRARY_DIR ) 18 | else: 19 | print ("Pull " + REPO_NAME + " Libray") 20 | env.Execute("git --work-tree=" + LIBRARY_DIR + " --git-dir=" + LIBRARY_DIR + "/.git pull origin master --depth 100") 21 | -------------------------------------------------------------------------------- /.scripts/ci-firmware.py: -------------------------------------------------------------------------------- 1 | # Update firmware.json files 2 | import os, json 3 | 4 | version = "dev" 5 | RELEASE = "ESPS_RELEASE" 6 | 7 | with open("dist/firmware/VERSION", "r") as file: 8 | version = file.readline().rstrip() 9 | file.close 10 | 11 | with open("dist/firmware/firmware.json", "r+") as file: 12 | data = json.load(file) 13 | if RELEASE in os.environ: 14 | data["release"] = f"ESPixelStick {version}" 15 | else: 16 | data["release"] = f"ESPixelStick {version} (untested)" 17 | file.seek(0) 18 | json.dump(data, file) 19 | file.truncate() -------------------------------------------------------------------------------- /.scripts/deleteSD.py: -------------------------------------------------------------------------------- 1 | import platform 2 | import shutil 3 | import os 4 | Import("env") 5 | 6 | f = open("./MyEnv.txt", "a") 7 | f.write(env.Dump()) 8 | f.close() 9 | 10 | PACKAGES_DIR = env['PROJECT_PACKAGES_DIR'] 11 | FRAMEWORK_DIR = os.path.join(PACKAGES_DIR, "framework-arduinoespressif8266/libraries") 12 | SD_DIR = os.path.join(FRAMEWORK_DIR, "SD") 13 | SDFAT_DIR = os.path.join(FRAMEWORK_DIR, "ESP8266SdFat") 14 | # print("PACKAGES_DIR " + PACKAGES_DIR) 15 | # print("FRAMEWORK_DIR " + FRAMEWORK_DIR) 16 | # print("SD_DIR " + SD_DIR) 17 | 18 | if os.path.exists(SD_DIR): 19 | shutil.rmtree(SD_DIR) 20 | 21 | if os.path.exists(SDFAT_DIR): 22 | shutil.rmtree(SDFAT_DIR) 23 | 24 | def before_build(target, source, env): 25 | print("BeforeBuild") 26 | 27 | env.AddPreAction("buildprog", before_build) 28 | -------------------------------------------------------------------------------- /.scripts/pio-version.py: -------------------------------------------------------------------------------- 1 | # Get CI version number 2 | Import('env') 3 | import os 4 | 5 | version = "dev" 6 | 7 | if "CI" in os.environ: 8 | with open("firmware/VERSION", "r") as file: 9 | version = file.readline().rstrip() 10 | env.Append(BUILD_FLAGS=[f"-DESPS_VERSION={version}"]) 11 | -------------------------------------------------------------------------------- /.scripts/replace_fs.py: -------------------------------------------------------------------------------- 1 | import platform 2 | Import ("env") 3 | 4 | OS_NAME = platform.system().lower() 5 | FS_PATH = "./dist/bin/" 6 | 7 | if OS_NAME == "windows" : 8 | FS_PATH += "win32/mklittlefs.exe" 9 | elif OS_NAME == "linux" : 10 | FS_PATH += "linux64/mklittlefs" 11 | elif OS_NAME == "linux64" : 12 | FS_PATH += "linux64/mklittlefs" 13 | elif OS_NAME == "darwin" : 14 | FS_PATH += "macos/mklittlefs" 15 | else: 16 | print("ERROR: Could not determine OS type. Got: " + str (OS_NAME)) 17 | 18 | print("Replace MKSPIFFSTOOL with " + FS_PATH) 19 | env.Replace (MKSPIFFSTOOL = FS_PATH) 20 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | // See http://go.microsoft.com/fwlink/?LinkId=827846 3 | // for the documentation about the extensions.json format 4 | "recommendations": [ 5 | "platformio.platformio-ide" 6 | ], 7 | "unwantedRecommendations": [ 8 | "ms-vscode.cpptools-extension-pack" 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /ESP32_partitions.csv: -------------------------------------------------------------------------------- 1 | # Name, Type, SubType, Offset, Size, Flags 2 | nvs, data, nvs, 0x009000, 0x005000, 3 | otadata, data, ota, 0x00e000, 0x002000, 4 | app0, app, ota_0, 0x010000, 0x1D0000, 5 | app1, app, ota_1, 0x1E0000, 0x1D0000, 6 | spiffs, data, spiffs, 0x3B0000, 0x050000, 7 | -------------------------------------------------------------------------------- /ESP8266_loader.ld: -------------------------------------------------------------------------------- 1 | /* 2 | # Name, Type, SubType, Offset, Size, Flags 3 | nvs, data, nvs, 0x009000, 0x004000, 4 | otadata, data, ota, 0x00E000, 0x002000, 5 | phy_init, data, phy, 0x00F000, 0x001000 6 | app0, app, ota_0, 0x010000, 0x1D0000, 7 | app1, app, ota_1, 0x1E0000, 0x1D0000, 8 | spiffs, data, spiffs, 0x3B0000, 0x050000, 9 | */ 10 | 11 | MEMORY 12 | { 13 | dport0_0_seg : org = 0x3FF00000, len = 0x10 14 | dram0_0_seg : org = 0x3FFE8000, len = 0x14000 15 | irom0_0_seg : org = 0x40201010, len = 0x79ff0 16 | } 17 | 18 | PROVIDE ( _FS_start = 0x4027B000 ); 19 | PROVIDE ( _FS_end = 0x402FB000 ); 20 | PROVIDE ( _FS_page = 0x100 ); 21 | PROVIDE ( _FS_block = 0x2000 ); 22 | PROVIDE ( _EEPROM_start = 0x402fb000 ); 23 | /* The following symbols are DEPRECATED and will be REMOVED in a future release */ 24 | PROVIDE ( _SPIFFS_start = 0x4027B000 ); 25 | PROVIDE ( _SPIFFS_end = 0x402FB000 ); 26 | PROVIDE ( _SPIFFS_page = 0x100 ); 27 | PROVIDE ( _SPIFFS_block = 0x2000 ); 28 | 29 | INCLUDE "local.eagle.app.v6.common.ld" -------------------------------------------------------------------------------- /SupportingDocs/APA102-2020 SMD LED.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/SupportingDocs/APA102-2020 SMD LED.pdf -------------------------------------------------------------------------------- /SupportingDocs/APA109.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/SupportingDocs/APA109.pdf -------------------------------------------------------------------------------- /SupportingDocs/CS8812-LED-Chip-Datasheet.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/SupportingDocs/CS8812-LED-Chip-Datasheet.pdf -------------------------------------------------------------------------------- /SupportingDocs/DDP_PROTOCOL.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/SupportingDocs/DDP_PROTOCOL.pdf -------------------------------------------------------------------------------- /SupportingDocs/ESP32.PDF: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/SupportingDocs/ESP32.PDF -------------------------------------------------------------------------------- /SupportingDocs/GS8206eng_v170627.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/SupportingDocs/GS8206eng_v170627.pdf -------------------------------------------------------------------------------- /SupportingDocs/GS8208 LED Datasheet.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/SupportingDocs/GS8208 LED Datasheet.pdf -------------------------------------------------------------------------------- /SupportingDocs/HD107S-NEWSTAR.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/SupportingDocs/HD107S-NEWSTAR.pdf -------------------------------------------------------------------------------- /SupportingDocs/LPD6803.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/SupportingDocs/LPD6803.pdf -------------------------------------------------------------------------------- /SupportingDocs/MY9221-MY-Semi.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/SupportingDocs/MY9221-MY-Semi.pdf -------------------------------------------------------------------------------- /SupportingDocs/MY9231_BF_0.91.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/SupportingDocs/MY9231_BF_0.91.pdf -------------------------------------------------------------------------------- /SupportingDocs/MY9291-MY-Semi.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/SupportingDocs/MY9291-MY-Semi.pdf -------------------------------------------------------------------------------- /SupportingDocs/P9813.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/SupportingDocs/P9813.pdf -------------------------------------------------------------------------------- /SupportingDocs/SK6812-Datasheet.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/SupportingDocs/SK6812-Datasheet.pdf -------------------------------------------------------------------------------- /SupportingDocs/SK6813 LED Datasheet.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/SupportingDocs/SK6813 LED Datasheet.pdf -------------------------------------------------------------------------------- /SupportingDocs/SM16703ICdatasheet.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/SupportingDocs/SM16703ICdatasheet.pdf -------------------------------------------------------------------------------- /SupportingDocs/SM16716-Sunmoon.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/SupportingDocs/SM16716-Sunmoon.pdf -------------------------------------------------------------------------------- /SupportingDocs/SupportedPixels.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/SupportingDocs/SupportedPixels.xlsx -------------------------------------------------------------------------------- /SupportingDocs/TLS3001-TERALANESEMICONDUCTOR.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/SupportingDocs/TLS3001-TERALANESEMICONDUCTOR.pdf -------------------------------------------------------------------------------- /SupportingDocs/TLS3001_Chinese.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/SupportingDocs/TLS3001_Chinese.docx -------------------------------------------------------------------------------- /SupportingDocs/TLS3001_Chinese.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/SupportingDocs/TLS3001_Chinese.pdf -------------------------------------------------------------------------------- /SupportingDocs/TM1803-TitanMicro.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/SupportingDocs/TM1803-TitanMicro.pdf -------------------------------------------------------------------------------- /SupportingDocs/TM1804-TitanMicro.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/SupportingDocs/TM1804-TitanMicro.pdf -------------------------------------------------------------------------------- /SupportingDocs/TM1809-Titan.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/SupportingDocs/TM1809-Titan.pdf -------------------------------------------------------------------------------- /SupportingDocs/TM1814-TitanMicro.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/SupportingDocs/TM1814-TitanMicro.pdf -------------------------------------------------------------------------------- /SupportingDocs/TM1829-TitanMicroElectronics.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/SupportingDocs/TM1829-TitanMicroElectronics.pdf -------------------------------------------------------------------------------- /SupportingDocs/UCS1903_ETC.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/SupportingDocs/UCS1903_ETC.pdf -------------------------------------------------------------------------------- /SupportingDocs/UCS1903_IC-manul.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/SupportingDocs/UCS1903_IC-manul.pdf -------------------------------------------------------------------------------- /SupportingDocs/UCS1904-ETC.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/SupportingDocs/UCS1904-ETC.pdf -------------------------------------------------------------------------------- /SupportingDocs/UCS2903-ETC.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/SupportingDocs/UCS2903-ETC.pdf -------------------------------------------------------------------------------- /SupportingDocs/UCS8903-UCS.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/SupportingDocs/UCS8903-UCS.pdf -------------------------------------------------------------------------------- /SupportingDocs/UCS8903-UCS.txt: -------------------------------------------------------------------------------- 1 | Function Description 2 | The chip adopts the single-wire communication method and uses the return-to-zero code to send signals. After the chip is powered on and reset, it accepts the call from the DIN terminal. 3 | After receiving enough 48bit data, the DO port starts to forward data for the next chip to provide input data. Before forwarding, DO mouth one 4 | Pull straight down. At this time, the chip will not accept new data, and the three PWM output ports of the chip OUTR, OUTG and OUTB will 5 | 48bit data, send out corresponding signals with different duty ratios, the signal period is about 1ms. If the input signal at the DIN terminal is a RESET signal, 6 | The chip will send the received data to the display, and the chip will re-accept new data after the signal ends, and after receiving the first 48bit data, 7 | The data is forwarded through the DO port. Before the chip receives the RESET code, the original outputs of the OUTR, OUTG and OUTB pins remain unchanged. 8 | After receiving the low-level RESET code for more than 1.5ms, the chip outputs the 48bit PWM data pulse width just received to OUTR, 9 | OUTG, OUTB pins 10 | 11 | Data is 16 bits per color MSb first. 12 | 13 | T0H 400ns +/- 40ns 14 | T0L 800ns -0 15 | T1H 800ns +/- 80ns 16 | T1L 400ns -0 17 | IFG 24us 18 | Initital reset >1ms -------------------------------------------------------------------------------- /SupportingDocs/WS2801.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/SupportingDocs/WS2801.pdf -------------------------------------------------------------------------------- /SupportingDocs/WS2811.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/SupportingDocs/WS2811.pdf -------------------------------------------------------------------------------- /SupportingDocs/cdcs503-q1.ClockDriver.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/SupportingDocs/cdcs503-q1.ClockDriver.pdf -------------------------------------------------------------------------------- /SupportingDocs/esp32_technical_reference_manual_en.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/SupportingDocs/esp32_technical_reference_manual_en.pdf -------------------------------------------------------------------------------- /SupportingDocs/esp8266-technical_reference_en.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/SupportingDocs/esp8266-technical_reference_en.pdf -------------------------------------------------------------------------------- /SupportingDocs/lpd8806+english.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/SupportingDocs/lpd8806+english.pdf -------------------------------------------------------------------------------- /SupportingDocs/sk6822_led-datasheet.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/SupportingDocs/sk6822_led-datasheet.pdf -------------------------------------------------------------------------------- /SupportingDocs/sm16704-datasheet-en.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/SupportingDocs/sm16704-datasheet-en.pdf -------------------------------------------------------------------------------- /dist/ESPSFlashTool.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/ESPSFlashTool.jar -------------------------------------------------------------------------------- /dist/README.md: -------------------------------------------------------------------------------- 1 | ESPixelStick Binaries 2 | ===================== 3 | This is a precompiled firmware release for the ESPixelStick hardware. It contains everything you need to flash or update your [ESPixelStick](ESPixelStick.html). For a list of changes, please refer to the [Changelog](Changelog.html) included with this release. To use the web based updates, you must be on ESPixelStick Firmware 4.0.0 or greater. Note that upgrades from beta and release candidate versions may not work. 4 | 5 | How to use 6 | ---------- 7 | **ESPSFlashTool.jar** - This is a java based flash tool for flashing new modules or modules that can't be updated via the web interface. It will flash the ESP module with the ESPixelStick firmware to a default state and overwrite any previous settings. To launch the tool, you will need [Java 8](https://www.java.com) or greater. On Linux and macOS platforms, you will need launch the tool from a terminal within the extracted directory (```java -jar ESPSFlashTool.jar```). Additionally for macOS, you will have to jump through Apple's typical security hoops to allow non-Apple signed software to run. Once launched, simply fill in the boxes, select your harwdare and serial port, and click "Upload". 8 | 9 | **espixelstick\*.efu** - These are web based firmware updates. Simply upload these via the web interface to flash your ESPixelStick. Your configuration will be saved and applied to the new firmware. Not that web upgrades between major releases, betas, and release candidates are not supported. 10 | 11 | If you are interested in using the experimental web based flash tool, connect to: 12 | HTTPS://espixelstickwebflasher.from-ct.com:5000 13 | This tool will always have a few of the most recent CI builds available for flashing to your device. This tool has only been tested with the Chrome browser. You do not need to install anything on your PC. Just connect the ESP using a USB cable and follow the instructions. -------------------------------------------------------------------------------- /dist/bin/esptool/MANIFEST.in: -------------------------------------------------------------------------------- 1 | include README.md 2 | include LICENSE 3 | # sdist includes test/test*.py by default, but esptool.py tests 4 | # are so far only intended to run from the git repo itself 5 | prune test 6 | prune ecdsa 7 | prune pyaes 8 | prune flasher_stub 9 | prune .github 10 | exclude .git* 11 | exclude .travis* 12 | exclude MANIFEST* 13 | 14 | 15 | -------------------------------------------------------------------------------- /dist/bin/esptool/ecdsa/__init__.py: -------------------------------------------------------------------------------- 1 | __all__ = ["curves", "der", "ecdsa", "ellipticcurve", "keys", "numbertheory", 2 | "test_pyecdsa", "util", "six"] 3 | from .keys import SigningKey, VerifyingKey, BadSignatureError, BadDigestError 4 | from .curves import NIST192p, NIST224p, NIST256p, NIST384p, NIST521p, SECP256k1 5 | 6 | _hush_pyflakes = [SigningKey, VerifyingKey, BadSignatureError, BadDigestError, 7 | NIST192p, NIST224p, NIST256p, NIST384p, NIST521p, SECP256k1] 8 | del _hush_pyflakes 9 | 10 | # This code comes from http://github.com/warner/python-ecdsa 11 | 12 | from ._version import get_versions 13 | __version__ = get_versions()['version'] 14 | del get_versions 15 | -------------------------------------------------------------------------------- /dist/bin/esptool/ecdsa/curves.py: -------------------------------------------------------------------------------- 1 | from __future__ import division 2 | 3 | from . import der, ecdsa 4 | 5 | class UnknownCurveError(Exception): 6 | pass 7 | 8 | def orderlen(order): 9 | return (1+len("%x"%order))//2 # bytes 10 | 11 | # the NIST curves 12 | class Curve: 13 | def __init__(self, name, curve, generator, oid, openssl_name=None): 14 | self.name = name 15 | self.openssl_name = openssl_name # maybe None 16 | self.curve = curve 17 | self.generator = generator 18 | self.order = generator.order() 19 | self.baselen = orderlen(self.order) 20 | self.verifying_key_length = 2*self.baselen 21 | self.signature_length = 2*self.baselen 22 | self.oid = oid 23 | self.encoded_oid = der.encode_oid(*oid) 24 | 25 | NIST192p = Curve("NIST192p", ecdsa.curve_192, ecdsa.generator_192, 26 | (1, 2, 840, 10045, 3, 1, 1), "prime192v1") 27 | NIST224p = Curve("NIST224p", ecdsa.curve_224, ecdsa.generator_224, 28 | (1, 3, 132, 0, 33), "secp224r1") 29 | NIST256p = Curve("NIST256p", ecdsa.curve_256, ecdsa.generator_256, 30 | (1, 2, 840, 10045, 3, 1, 7), "prime256v1") 31 | NIST384p = Curve("NIST384p", ecdsa.curve_384, ecdsa.generator_384, 32 | (1, 3, 132, 0, 34), "secp384r1") 33 | NIST521p = Curve("NIST521p", ecdsa.curve_521, ecdsa.generator_521, 34 | (1, 3, 132, 0, 35), "secp521r1") 35 | SECP256k1 = Curve("SECP256k1", ecdsa.curve_secp256k1, ecdsa.generator_secp256k1, 36 | (1, 3, 132, 0, 10), "secp256k1") 37 | 38 | curves = [NIST192p, NIST224p, NIST256p, NIST384p, NIST521p, SECP256k1] 39 | 40 | def find_curve(oid_curve): 41 | for c in curves: 42 | if c.oid == oid_curve: 43 | return c 44 | raise UnknownCurveError("I don't know about the curve with oid %s." 45 | "I only know about these: %s" % 46 | (oid_curve, [c.name for c in curves])) 47 | -------------------------------------------------------------------------------- /dist/bin/esptool/flasher_stub/README.md: -------------------------------------------------------------------------------- 1 | This is the source of the software flasher stub. 2 | 3 | esptool.py loads the flasher stub into memory and executes it to: 4 | 5 | * Add features that the ESP8266 & ESP32 bootloader ROMs do not have. 6 | 7 | * Add features to the ESP8266 bootloader ROM which are only in the ESP32 ROM. 8 | 9 | * Improve flashing performance over the ROM bootloaders. 10 | 11 | * Work around bugs in the ESP8266 ROM bootloader. 12 | 13 | Thanks to [Cesanta](http://cesanta.com/) who provided the original ESP8266 stub loader upon which this loader is based. 14 | 15 | # To Use 16 | 17 | The stub loader is already automatically integrated into esptool.py. You don't need to do anything special to use it. 18 | 19 | # To Build 20 | 21 | If you want to build the stub to test modifications or updates, here's how: 22 | 23 | * You will need both an ESP8266 gcc toolchain (xtensa-lx106-elf-) and an ESP32 toolchain (xtensa-esp32-elf-) on your PATH. 24 | 25 | * Set the environment variables SDK_PATH to the path to an ESP8266 IoT NON-OS SDK directory (last stub was built with SDK v1.5.1). 26 | 27 | * Set the environment variable IDF_PATH to the path to an ESP-IDF directory. 28 | 29 | * Set any other environment variables you'd like to override in the Makefile. 30 | 31 | * To build type `make` 32 | 33 | # To Test 34 | 35 | To test the build stub, you can either copy-paste the code from `build/stub_flasher_snippet.py` into esptool.py manually. Or there are some convenience wrappers to make testing quicker to iterate on: 36 | 37 | * Running `esptool_test_stub.py` is the same as running `esptool.py`, only it uses the just-compiled stubs from the build directory. 38 | 39 | * Running `run_tests_with_stub.py` is the same as running `test/test_esptool.py`, only it uses the just-compiled stubs from the build directory. 40 | -------------------------------------------------------------------------------- /dist/bin/esptool/flasher_stub/compare_stubs.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import sys 3 | 4 | # Compare the esptool stub loaders to freshly built ones 5 | # in the build directory 6 | # 7 | # (Used by Travis to verify the stubs are up to date.) 8 | 9 | def verbose_diff(new, old): 10 | for k in [ "data_start", "text_start"]: 11 | if new[k] != old[k]: 12 | print("New %s 0x%x old %s 0%x" % (k, new[k], old[k])) 13 | 14 | for k in [ "data", "text" ]: 15 | if len(new[k]) != len(old[k]): 16 | print("New %s %d bytes, old stub code %d bytes" % (k, len(new[k]), len(old[k]))) 17 | if new[k] != old[k]: 18 | print("%s is different" % k) 19 | if len(new[k]) == len(old[k]): 20 | for b in range(len(new[k])): 21 | if new[k][b] != old[k][b]: 22 | print(" Byte 0x%x: new 0x%02x old 0x%02x" % (b, ord(new[k][b]), ord(old[k][b]))) 23 | 24 | if __name__ == "__main__": 25 | same = True 26 | sys.path.append("..") 27 | import esptool 28 | 29 | old_8266_stub = esptool.ESP8266ROM.STUB_CODE 30 | old_32_stub = esptool.ESP32ROM.STUB_CODE 31 | 32 | # hackiness: importing this module edits the esptool module 33 | import esptool_test_stub 34 | 35 | if esptool.ESP8266ROM.STUB_CODE != old_8266_stub: 36 | print("ESP8266 stub code in esptool.py is different to just-built stub") 37 | verbose_diff(esptool.ESP8266ROM.STUB_CODE, old_8266_stub) 38 | same = False 39 | if esptool.ESP32ROM.STUB_CODE != old_32_stub: 40 | print("ESP32 stub code in esptool.py is different to just-built stub.") 41 | verbose_diff(esptool.ESP32ROM.STUB_CODE, old_32_stub) 42 | same = False 43 | if same: 44 | print("Stub code is the same") 45 | 46 | sys.exit(0 if same else 1) 47 | -------------------------------------------------------------------------------- /dist/bin/esptool/flasher_stub/esptool_test_stub.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # 3 | # Trivial wrapper program to run esptool.py using the just-compiled 4 | # flasher stub in the build/ subdirectory 5 | # 6 | # For use when developing new flasher_stubs, not important otherwise. 7 | # 8 | # Copyright (C) 2014-2016 Fredrik Ahlberg, Angus Gratton, other contributors as noted. 9 | # 10 | # This program is free software; you can redistribute it and/or modify it under 11 | # the terms of the GNU General Public License as published by the Free Software 12 | # Foundation; either version 2 of the License, or (at your option) any later version. 13 | # 14 | import os.path 15 | import sys 16 | 17 | THIS_DIR=os.path.dirname(sys.argv[0]) 18 | 19 | sys.path.append("..") 20 | import esptool 21 | # Python hackiness: evaluate the snippet in the context of the esptool module, so it 22 | # edits the esptool's global variables 23 | exec(open("%s/build/stub_flasher_snippet.py" % THIS_DIR).read(), esptool.__dict__, esptool.__dict__) 24 | 25 | if __name__ == "__main__": 26 | try: 27 | esptool.main() 28 | except esptool.FatalError as e: 29 | print('\nA fatal error occurred: %s' % e) 30 | sys.exit(2) 31 | 32 | -------------------------------------------------------------------------------- /dist/bin/esptool/flasher_stub/include/slip.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Cesanta Software Limited & (c) 2016-2019 Espressif Systems (Shanghai) PTE LTD 3 | * All rights reserved 4 | * 5 | * This program is free software; you can redistribute it and/or modify it under 6 | * the terms of the GNU General Public License as published by the Free Software 7 | * Foundation; either version 2 of the License, or (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 11 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along with 14 | * this program; if not, write to the Free Software Foundation, Inc., 51 Franklin 15 | * Street, Fifth Floor, Boston, MA 02110-1301 USA. 16 | */ 17 | 18 | #ifndef SLIP_H_ 19 | #define SLIP_H_ 20 | 21 | #include 22 | 23 | /* Send the SLIP frame begin/end delimiter. */ 24 | void SLIP_send_frame_delimiter(void); 25 | 26 | /* Send a single character of SLIP frame data, escaped as per SLIP escaping. */ 27 | void SLIP_send_frame_data(char ch); 28 | 29 | /* Send some SLIP frame data, escaped as per SLIP escaping. */ 30 | void SLIP_send_frame_data_buf(const void *buf, uint32_t size); 31 | 32 | /* Send a full SLIP frame, with specified contents. */ 33 | void SLIP_send(const void *pkt, uint32_t size); 34 | 35 | typedef enum { 36 | SLIP_NO_FRAME, 37 | SLIP_FRAME, 38 | SLIP_FRAME_ESCAPING 39 | } slip_state_t; 40 | 41 | int16_t SLIP_recv_byte(char byte, slip_state_t *state); 42 | 43 | #define SLIP_FINISHED_FRAME -2 44 | #define SLIP_NO_BYTE -1 45 | 46 | /* Receive a SLIP frame, with specified contents. */ 47 | uint32_t SLIP_recv(void *pkt, uint32_t max_len); 48 | 49 | #endif /* SLIP_H_ */ 50 | -------------------------------------------------------------------------------- /dist/bin/esptool/flasher_stub/include/stub_commands.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-2019 Espressif Systems (Shanghai) PTE LTD 3 | * All rights reserved 4 | * 5 | * This file is part of the esptool.py binary flasher stub. 6 | * 7 | * This program is free software; you can redistribute it and/or modify it under 8 | * the terms of the GNU General Public License as published by the Free Software 9 | * Foundation; either version 2 of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License along with 16 | * this program; if not, write to the Free Software Foundation, Inc., 51 Franklin 17 | * Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 | */ 19 | 20 | /* Flasher command handlers, called from stub_flasher.c 21 | 22 | Commands related to writing flash are in stub_write_flash_xxx. 23 | */ 24 | #pragma once 25 | #include "stub_flasher.h" 26 | #include 27 | 28 | int handle_flash_erase(uint32_t addr, uint32_t len); 29 | 30 | void handle_flash_read(uint32_t addr, uint32_t len, uint32_t block_size, uint32_t max_in_flight); 31 | 32 | int handle_flash_get_md5sum(uint32_t addr, uint32_t len); 33 | 34 | int handle_flash_read_chip_id(); 35 | 36 | esp_command_error handle_spi_set_params(uint32_t *args, int *status); 37 | 38 | esp_command_error handle_spi_attach(uint32_t hspi_config_arg); 39 | 40 | esp_command_error handle_mem_begin(uint32_t size, uint32_t offset); 41 | 42 | esp_command_error handle_mem_data(void *data, uint32_t length); 43 | 44 | esp_command_error handle_mem_finish(void); 45 | -------------------------------------------------------------------------------- /dist/bin/esptool/flasher_stub/include/stub_write_flash.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016-2019 Espressif Systems (Shanghai) PTE LTD 3 | * All rights reserved 4 | * 5 | * This file is part of the esptool.py binary flasher stub. 6 | * 7 | * This program is free software; you can redistribute it and/or modify it under 8 | * the terms of the GNU General Public License as published by the Free Software 9 | * Foundation; either version 2 of the License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but WITHOUT 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License along with 16 | * this program; if not, write to the Free Software Foundation, Inc., 51 Franklin 17 | * Street, Fifth Floor, Boston, MA 02110-1301 USA. 18 | */ 19 | 20 | /* Flasher commands related to writing flash */ 21 | #pragma once 22 | #include "stub_flasher.h" 23 | #include 24 | 25 | bool is_in_flash_mode(void); 26 | 27 | esp_command_error get_flash_error(void); 28 | 29 | esp_command_error handle_flash_begin(uint32_t total_size, uint32_t offset); 30 | 31 | esp_command_error handle_flash_deflated_begin(uint32_t uncompressed_size, uint32_t compressed_size, uint32_t offset); 32 | 33 | void handle_flash_data(void *data_buf, uint32_t length); 34 | 35 | #ifdef ESP32 36 | void handle_flash_encrypt_data(void *data_buf, uint32_t length); 37 | #endif 38 | 39 | void handle_flash_deflated_data(void *data_buf, uint32_t length); 40 | 41 | /* same command used for deflated or non-deflated mode */ 42 | esp_command_error handle_flash_end(void); 43 | 44 | -------------------------------------------------------------------------------- /dist/bin/esptool/flasher_stub/ld/stub_32.ld: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Cesanta Software Limited 3 | * All rights reserved 4 | * 5 | * This program is free software; you can redistribute it and/or modify it under 6 | * the terms of the GNU General Public License as published by the Free Software 7 | * Foundation; either version 2 of the License, or (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 11 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along with 14 | * this program; if not, write to the Free Software Foundation, Inc., 51 Franklin 15 | * Street, Fifth Floor, Boston, MA 02110-1301 USA. 16 | */ 17 | 18 | /* Note: stub is deliberately loaded close to the very top 19 | of available RAM, to reduce change of colliding with anything 20 | else... */ 21 | MEMORY { 22 | iram : org = 0x4009F000, len = 0x1000 23 | dram : org = 0x3ffec000, len = 0x14000 24 | } 25 | 26 | ENTRY(stub_main) 27 | 28 | SECTIONS { 29 | .text : ALIGN(4) { 30 | *(.literal) 31 | *(.text .text.*) 32 | } > iram 33 | 34 | .bss : ALIGN(4) { 35 | _bss_start = ABSOLUTE(.); 36 | *(.bss) 37 | _bss_end = ABSOLUTE(.); 38 | } > dram 39 | 40 | .data : ALIGN(4) { 41 | *(.data) 42 | *(.rodata .rodata.*) 43 | } > dram 44 | } 45 | 46 | INCLUDE "rom_32.ld" 47 | -------------------------------------------------------------------------------- /dist/bin/esptool/flasher_stub/ld/stub_8266.ld: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Cesanta Software Limited 3 | * All rights reserved 4 | * 5 | * This program is free software; you can redistribute it and/or modify it under 6 | * the terms of the GNU General Public License as published by the Free Software 7 | * Foundation; either version 2 of the License, or (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 11 | * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along with 14 | * this program; if not, write to the Free Software Foundation, Inc., 51 Franklin 15 | * Street, Fifth Floor, Boston, MA 02110-1301 USA. 16 | */ 17 | 18 | /* Note: stub is deliberately loaded close to the very top 19 | of available RAM, to reduce change of colliding with anything 20 | else... */ 21 | MEMORY { 22 | iram : org = 0x4010E000, len = 0x2000 23 | dram : org = 0x3FFE8100, len = 0x13f00 24 | } 25 | 26 | ENTRY(stub_main_8266) 27 | 28 | SECTIONS { 29 | .text : ALIGN(4) { 30 | *(.literal) 31 | *(.text .text.*) 32 | } > iram 33 | 34 | .bss : ALIGN(4) { 35 | _bss_start = ABSOLUTE(.); 36 | *(.bss) 37 | _bss_end = ABSOLUTE(.); 38 | } > dram 39 | 40 | .data : ALIGN(4) { 41 | *(.data) 42 | *(.rodata .rodata.*) 43 | } > dram 44 | } 45 | 46 | INCLUDE "rom_8266.ld" 47 | 48 | PROVIDE(SPIFlashModeConfig = 0x40004568); 49 | PROVIDE(SPIParamCfg = 0x40004c2c); 50 | -------------------------------------------------------------------------------- /dist/bin/esptool/flasher_stub/run_tests_with_stub.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Run test/test_esptool.py using the newly compiled stub, for quick tests 4 | # 5 | # Usage same as test/test_esptool.py 6 | [ -z $PYTHON ] && PYTHON=python 7 | 8 | THISDIR=`realpath -m $(dirname $0)` 9 | 10 | export ESPTOOL_PY="${THISDIR}/esptool_test_stub.py" 11 | ${PYTHON} ${THISDIR}/../test/test_esptool.py $@ 12 | -------------------------------------------------------------------------------- /dist/bin/esptool/pyaes/__init__.py: -------------------------------------------------------------------------------- 1 | # The MIT License (MIT) 2 | # 3 | # Copyright (c) 2014 Richard Moore 4 | # 5 | # Permission is hereby granted, free of charge, to any person obtaining a copy 6 | # of this software and associated documentation files (the "Software"), to deal 7 | # in the Software without restriction, including without limitation the rights 8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | # copies of the Software, and to permit persons to whom the Software is 10 | # furnished to do so, subject to the following conditions: 11 | # 12 | # The above copyright notice and this permission notice shall be included in 13 | # all copies or substantial portions of the Software. 14 | # 15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | # THE SOFTWARE. 22 | 23 | # This is a pure-Python implementation of the AES algorithm and AES common 24 | # modes of operation. 25 | 26 | # See: https://en.wikipedia.org/wiki/Advanced_Encryption_Standard 27 | # See: https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation 28 | 29 | 30 | # Supported key sizes: 31 | # 128-bit 32 | # 192-bit 33 | # 256-bit 34 | 35 | 36 | # Supported modes of operation: 37 | # ECB - Electronic Codebook 38 | # CBC - Cipher-Block Chaining 39 | # CFB - Cipher Feedback 40 | # OFB - Output Feedback 41 | # CTR - Counter 42 | 43 | # See the README.md for API details and general information. 44 | 45 | # Also useful, PyCrypto, a crypto library implemented in C with Python bindings: 46 | # https://www.dlitz.net/software/pycrypto/ 47 | 48 | 49 | VERSION = [1, 3, 0] 50 | 51 | from .aes import AES, AESModeOfOperationCTR, AESModeOfOperationCBC, AESModeOfOperationCFB, AESModeOfOperationECB, AESModeOfOperationOFB, AESModesOfOperation, Counter 52 | from .blockfeeder import decrypt_stream, Decrypter, encrypt_stream, Encrypter 53 | from .blockfeeder import PADDING_NONE, PADDING_DEFAULT 54 | -------------------------------------------------------------------------------- /dist/bin/esptool/pyaes/util.py: -------------------------------------------------------------------------------- 1 | # The MIT License (MIT) 2 | # 3 | # Copyright (c) 2014 Richard Moore 4 | # 5 | # Permission is hereby granted, free of charge, to any person obtaining a copy 6 | # of this software and associated documentation files (the "Software"), to deal 7 | # in the Software without restriction, including without limitation the rights 8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | # copies of the Software, and to permit persons to whom the Software is 10 | # furnished to do so, subject to the following conditions: 11 | # 12 | # The above copyright notice and this permission notice shall be included in 13 | # all copies or substantial portions of the Software. 14 | # 15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | # THE SOFTWARE. 22 | 23 | # Why to_bufferable? 24 | # Python 3 is very different from Python 2.x when it comes to strings of text 25 | # and strings of bytes; in Python 3, strings of bytes do not exist, instead to 26 | # represent arbitrary binary data, we must use the "bytes" object. This method 27 | # ensures the object behaves as we need it to. 28 | 29 | def to_bufferable(binary): 30 | return binary 31 | 32 | def _get_byte(c): 33 | return ord(c) 34 | 35 | try: 36 | xrange 37 | except: 38 | 39 | def to_bufferable(binary): 40 | if isinstance(binary, bytes): 41 | return binary 42 | return bytes(ord(b) for b in binary) 43 | 44 | def _get_byte(c): 45 | return c 46 | 47 | def append_PKCS7_padding(data): 48 | pad = 16 - (len(data) % 16) 49 | return data + to_bufferable(chr(pad) * pad) 50 | 51 | def strip_PKCS7_padding(data): 52 | if len(data) % 16 != 0: 53 | raise ValueError("invalid length") 54 | 55 | pad = _get_byte(data[-1]) 56 | 57 | if pad > 16: 58 | raise ValueError("invalid padding byte") 59 | 60 | return data[:-pad] 61 | -------------------------------------------------------------------------------- /dist/bin/esptool/serial/tools/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/esptool/serial/tools/__init__.py -------------------------------------------------------------------------------- /dist/bin/esptool/serial/urlhandler/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/esptool/serial/urlhandler/__init__.py -------------------------------------------------------------------------------- /dist/bin/esptool/serial/urlhandler/protocol_alt.py: -------------------------------------------------------------------------------- 1 | #! python 2 | # 3 | # This module implements a special URL handler that allows selecting an 4 | # alternate implementation provided by some backends. 5 | # 6 | # This file is part of pySerial. https://github.com/pyserial/pyserial 7 | # (C) 2015 Chris Liechti 8 | # 9 | # SPDX-License-Identifier: BSD-3-Clause 10 | # 11 | # URL format: alt://port[?option[=value][&option[=value]]] 12 | # options: 13 | # - class=X used class named X instead of Serial 14 | # 15 | # example: 16 | # use poll based implementation on Posix (Linux): 17 | # python -m serial.tools.miniterm alt:///dev/ttyUSB0?class=PosixPollSerial 18 | 19 | try: 20 | import urlparse 21 | except ImportError: 22 | import urllib.parse as urlparse 23 | 24 | import serial 25 | 26 | 27 | def serial_class_for_url(url): 28 | """extract host and port from an URL string""" 29 | parts = urlparse.urlsplit(url) 30 | if parts.scheme != 'alt': 31 | raise serial.SerialException( 32 | 'expected a string in the form "alt://port[?option[=value][&option[=value]]]": ' 33 | 'not starting with alt:// ({!r})'.format(parts.scheme)) 34 | class_name = 'Serial' 35 | try: 36 | for option, values in urlparse.parse_qs(parts.query, True).items(): 37 | if option == 'class': 38 | class_name = values[0] 39 | else: 40 | raise ValueError('unknown option: {!r}'.format(option)) 41 | except ValueError as e: 42 | raise serial.SerialException( 43 | 'expected a string in the form ' 44 | '"alt://port[?option[=value][&option[=value]]]": {!r}'.format(e)) 45 | if not hasattr(serial, class_name): 46 | raise ValueError('unknown class: {!r}'.format(class_name)) 47 | cls = getattr(serial, class_name) 48 | if not issubclass(cls, serial.Serial): 49 | raise ValueError('class {!r} is not an instance of Serial'.format(class_name)) 50 | return (''.join([parts.netloc, parts.path]), cls) 51 | 52 | # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 53 | if __name__ == '__main__': 54 | s = serial.serial_for_url('alt:///dev/ttyS0?class=PosixPollSerial') 55 | print(s) 56 | -------------------------------------------------------------------------------- /dist/bin/esptool/serial/urlhandler/protocol_rfc2217.py: -------------------------------------------------------------------------------- 1 | #! python 2 | # 3 | # This is a thin wrapper to load the rfc2271 implementation. 4 | # 5 | # This file is part of pySerial. https://github.com/pyserial/pyserial 6 | # (C) 2011 Chris Liechti 7 | # 8 | # SPDX-License-Identifier: BSD-3-Clause 9 | 10 | from serial.rfc2217 import Serial # noqa 11 | -------------------------------------------------------------------------------- /dist/bin/esptool/setup.cfg: -------------------------------------------------------------------------------- 1 | [flake8] 2 | ignore = E231,E221,FI50,FI11,FI12,FI53,FI14,FI15,FI16,FI17,E241,W503,W504,FI18 3 | max-line-length = 160 4 | 5 | -------------------------------------------------------------------------------- /dist/bin/esptool/test/README.md: -------------------------------------------------------------------------------- 1 | # esptool.py test cases README 2 | 3 | # test_elf2image.py 4 | 5 | Exists to catch unexpected changes in elf2image or image_info output. Does not require an ESP8266 to verify. 6 | 7 | ## About Tests 8 | 9 | Test method is fairly lo-fi: 10 | 11 | Directory test/elf2image/ contains subdirectories esp8266-v1, esp8266-v2 and esp32. These contain test cases. 12 | 13 | Each test case is a .elf file, which is stored alongside one or more .bin files representing the output of elf2image, and one .txt file representing the output of image_info when reading back the binary. 14 | 15 | Default run of test_elf2image.py will re-run elf2image & image_info on all these images. Suitable --chip and --version args are supplied, determined by the directory name. 16 | 17 | The test runner verifies that nothing in the output of either command has changed. 18 | 19 | ## Dealing With Output Changes 20 | 21 | If changes are detected, we can check if valid images are still being produced. If the changes turn out to be OK, running "test_elf2image.py --regen" will regenerate all of the .bin and .txt files for the test cases. 22 | 23 | (--regen can also be used to evaluate test failures, by looking at git diff output.) 24 | 25 | -------------------------------------------------------------------------------- /dist/bin/esptool/test/ecdsa_secure_boot_signing_key2.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN EC PRIVATE KEY----- 2 | MHcCAQEEIINRYjKaXM0dQJn4FLwoHYj3ovmpRee7UWv8ksQ9IS2toAoGCCqGSM49 3 | AwEHoUQDQgAEYWCmqAxxAmbr8cZk4AjTYkQJ0pCZOsESk2bPAe6lrzHrFKKR2t2W 4 | ge+cNvXU2dYswEdgWr/fdnyAbHHEVEBSrA== 5 | -----END EC PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /dist/bin/esptool/test/elf2image/esp32-app-template.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/esptool/test/elf2image/esp32-app-template.elf -------------------------------------------------------------------------------- /dist/bin/esptool/test/elf2image/esp32-bootloader.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/esptool/test/elf2image/esp32-bootloader.elf -------------------------------------------------------------------------------- /dist/bin/esptool/test/elf2image/esp32-too-many-sections.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/esptool/test/elf2image/esp32-too-many-sections.elf -------------------------------------------------------------------------------- /dist/bin/esptool/test/elf2image/esp8266-nonossdkv12-example.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/esptool/test/elf2image/esp8266-nonossdkv12-example.elf -------------------------------------------------------------------------------- /dist/bin/esptool/test/elf2image/esp8266-nonossdkv20-at-v2.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/esptool/test/elf2image/esp8266-nonossdkv20-at-v2.elf -------------------------------------------------------------------------------- /dist/bin/esptool/test/elf2image/esp8266-nonosssdk20-iotdemo.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/esptool/test/elf2image/esp8266-nonosssdk20-iotdemo.elf -------------------------------------------------------------------------------- /dist/bin/esptool/test/elf2image/esp8266-openrtos-blink-v2.elf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/esptool/test/elf2image/esp8266-openrtos-blink-v2.elf -------------------------------------------------------------------------------- /dist/bin/esptool/test/images/aes_key.bin: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dist/bin/esptool/test/images/bootloader.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/esptool/test/images/bootloader.bin -------------------------------------------------------------------------------- /dist/bin/esptool/test/images/esp8266_deepsleep.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/esptool/test/images/esp8266_deepsleep.bin -------------------------------------------------------------------------------- /dist/bin/esptool/test/images/esp8266_sdk/4096_user1.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/esptool/test/images/esp8266_sdk/4096_user1.bin -------------------------------------------------------------------------------- /dist/bin/esptool/test/images/esp8266_sdk/blank.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/esptool/test/images/esp8266_sdk/blank.bin -------------------------------------------------------------------------------- /dist/bin/esptool/test/images/esp8266_sdk/boot_v1.4(b1).bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/esptool/test/images/esp8266_sdk/boot_v1.4(b1).bin -------------------------------------------------------------------------------- /dist/bin/esptool/test/images/esp8266_sdk/esp_init_data_default.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/esptool/test/images/esp8266_sdk/esp_init_data_default.bin -------------------------------------------------------------------------------- /dist/bin/esptool/test/images/fifty_kb.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/esptool/test/images/fifty_kb.bin -------------------------------------------------------------------------------- /dist/bin/esptool/test/images/helloworld-esp32.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/esptool/test/images/helloworld-esp32.bin -------------------------------------------------------------------------------- /dist/bin/esptool/test/images/helloworld-esp32_edit.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/esptool/test/images/helloworld-esp32_edit.bin -------------------------------------------------------------------------------- /dist/bin/esptool/test/images/helloworld-esp8266.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/esptool/test/images/helloworld-esp8266.bin -------------------------------------------------------------------------------- /dist/bin/esptool/test/images/nodemcu-master-7-modules-2017-01-19-11-10-03-integer.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/esptool/test/images/nodemcu-master-7-modules-2017-01-19-11-10-03-integer.bin -------------------------------------------------------------------------------- /dist/bin/esptool/test/images/one_kb.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/esptool/test/images/one_kb.bin -------------------------------------------------------------------------------- /dist/bin/esptool/test/images/one_kb_all_ef.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/esptool/test/images/one_kb_all_ef.bin -------------------------------------------------------------------------------- /dist/bin/esptool/test/images/one_mb.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/esptool/test/images/one_mb.bin -------------------------------------------------------------------------------- /dist/bin/esptool/test/images/onebyte.bin: -------------------------------------------------------------------------------- 1 | a -------------------------------------------------------------------------------- /dist/bin/esptool/test/images/partitions_singleapp.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/esptool/test/images/partitions_singleapp.bin -------------------------------------------------------------------------------- /dist/bin/esptool/test/images/sector.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/esptool/test/images/sector.bin -------------------------------------------------------------------------------- /dist/bin/esptool/test/images/unaligned.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/esptool/test/images/unaligned.bin -------------------------------------------------------------------------------- /dist/bin/esptool/test/images/zerolength.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/esptool/test/images/zerolength.bin -------------------------------------------------------------------------------- /dist/bin/esptool/test/secure_images/256bit_iv.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/esptool/test/secure_images/256bit_iv.bin -------------------------------------------------------------------------------- /dist/bin/esptool/test/secure_images/256bit_key.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/esptool/test/secure_images/256bit_key.bin -------------------------------------------------------------------------------- /dist/bin/esptool/test/secure_images/bootloader-encrypted-conf0.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/esptool/test/secure_images/bootloader-encrypted-conf0.bin -------------------------------------------------------------------------------- /dist/bin/esptool/test/secure_images/bootloader-encrypted-conf3.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/esptool/test/secure_images/bootloader-encrypted-conf3.bin -------------------------------------------------------------------------------- /dist/bin/esptool/test/secure_images/bootloader-encrypted-conf9.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/esptool/test/secure_images/bootloader-encrypted-conf9.bin -------------------------------------------------------------------------------- /dist/bin/esptool/test/secure_images/bootloader-encrypted-confc.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/esptool/test/secure_images/bootloader-encrypted-confc.bin -------------------------------------------------------------------------------- /dist/bin/esptool/test/secure_images/bootloader-encrypted.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/esptool/test/secure_images/bootloader-encrypted.bin -------------------------------------------------------------------------------- /dist/bin/esptool/test/secure_images/bootloader.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/esptool/test/secure_images/bootloader.bin -------------------------------------------------------------------------------- /dist/bin/esptool/test/secure_images/bootloader_digested.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/esptool/test/secure_images/bootloader_digested.bin -------------------------------------------------------------------------------- /dist/bin/esptool/test/secure_images/bootloader_signed.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/esptool/test/secure_images/bootloader_signed.bin -------------------------------------------------------------------------------- /dist/bin/esptool/test/secure_images/digest_iv.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/esptool/test/secure_images/digest_iv.bin -------------------------------------------------------------------------------- /dist/bin/esptool/test/secure_images/ecdsa_secure_boot_signing_key.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN EC PRIVATE KEY----- 2 | MHcCAQEEIOI40eSC7ch6PxDSIclIGFCjfhCoXfHVqbbDn8XdY0GVoAoGCCqGSM49 3 | AwEHoUQDQgAENM762z/ushk+c0XOIYpi8wLSWuF5COnU0VAQnt3spTSX6l3bpwfu 4 | ppsemDdwy+aKbdgeyMYDxFbROLOPTRbYJw== 5 | -----END EC PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /dist/bin/esptool/test/secure_images/ecdsa_secure_boot_signing_key2.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN EC PRIVATE KEY----- 2 | MHcCAQEEIP9iY7XY8g3qSaUkKwTbq6HEq/AwenIxrssLqXGTS0z3oAoGCCqGSM49 3 | AwEHoUQDQgAEG+Ah4OAejTBYKQNvJkEOP9AifgulBMr4E9f+OqRU1Uno9Efi1kMc 4 | fzwZyx0A4mib0HfLUg9JNh8dNrUxLeVb4Q== 5 | -----END EC PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /dist/bin/esptool/test/secure_images/ecdsa_secure_boot_signing_pubkey.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN PUBLIC KEY----- 2 | MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAENM762z/ushk+c0XOIYpi8wLSWuF5 3 | COnU0VAQnt3spTSX6l3bpwfuppsemDdwy+aKbdgeyMYDxFbROLOPTRbYJw== 4 | -----END PUBLIC KEY----- 5 | -------------------------------------------------------------------------------- /dist/bin/esptool/test/secure_images/ecdsa_secure_boot_signing_pubkey2.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN PUBLIC KEY----- 2 | MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEG+Ah4OAejTBYKQNvJkEOP9Aifgul 3 | BMr4E9f+OqRU1Uno9Efi1kMcfzwZyx0A4mib0HfLUg9JNh8dNrUxLeVb4Q== 4 | -----END PUBLIC KEY----- 5 | -------------------------------------------------------------------------------- /dist/bin/esptool/test/secure_images/ef-flashencryption-key.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/esptool/test/secure_images/ef-flashencryption-key.bin -------------------------------------------------------------------------------- /dist/bin/esptool/test/secure_images/hello-world-signed-encrypted.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/esptool/test/secure_images/hello-world-signed-encrypted.bin -------------------------------------------------------------------------------- /dist/bin/esptool/test/secure_images/hello-world-signed.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/esptool/test/secure_images/hello-world-signed.bin -------------------------------------------------------------------------------- /dist/bin/linux64/mklittlefs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/linux64/mklittlefs -------------------------------------------------------------------------------- /dist/bin/macos/mklittlefs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/macos/mklittlefs -------------------------------------------------------------------------------- /dist/bin/pyserial/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2001-2016 Chris Liechti 2 | All Rights Reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are 6 | met: 7 | 8 | * Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | 11 | * Redistributions in binary form must reproduce the above 12 | copyright notice, this list of conditions and the following 13 | disclaimer in the documentation and/or other materials provided 14 | with the distribution. 15 | 16 | * Neither the name of the copyright holder nor the names of its 17 | contributors may be used to endorse or promote products derived 18 | from this software without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | 32 | --------------------------------------------------------------------------- 33 | Note: 34 | Individual files contain the following tag instead of the full license text. 35 | 36 | SPDX-License-Identifier: BSD-3-Clause 37 | 38 | This enables machine processing of license information based on the SPDX 39 | License Identifiers that are here available: http://spdx.org/licenses/ 40 | -------------------------------------------------------------------------------- /dist/bin/pyserial/MANIFEST.in: -------------------------------------------------------------------------------- 1 | include README.rst 2 | include LICENSE.txt 3 | include CHANGES.rst 4 | include MANIFEST.in 5 | include setup.py 6 | include setup.cfg 7 | include pylintrc 8 | 9 | include examples/at_protocol.py 10 | include examples/port_publisher.py 11 | include examples/port_publisher.sh 12 | include examples/rfc2217_server.py 13 | include examples/setup-miniterm-py2exe.py 14 | include examples/setup-rfc2217_server-py2exe.py 15 | include examples/setup-wxTerminal-py2exe.py 16 | include examples/tcp_serial_redirect.py 17 | include examples/wxSerialConfigDialog.py 18 | include examples/wxSerialConfigDialog.wxg 19 | include examples/wxTerminal.py 20 | include examples/wxTerminal.wxg 21 | 22 | include test/handlers/__init__.py 23 | include test/handlers/protocol_test.py 24 | include test/run_all_tests.py 25 | include test/test_advanced.py 26 | include test/test_high_load.py 27 | include test/test_iolib.py 28 | include test/test.py 29 | include test/test_readline.py 30 | include test/test_rfc2217.py 31 | include test/test_rs485.py 32 | include test/test_settings_dict.py 33 | include test/test_url.py 34 | 35 | include documentation/*.rst 36 | include documentation/pyserial.png 37 | include documentation/conf.py 38 | include documentation/Makefile 39 | 40 | -------------------------------------------------------------------------------- /dist/bin/pyserial/README.rst: -------------------------------------------------------------------------------- 1 | ================================= 2 | pySerial |build-status| |docs| 3 | ================================= 4 | 5 | Overview 6 | ======== 7 | This module encapsulates the access for the serial port. It provides backends 8 | for Python_ running on Windows, OSX, Linux, BSD (possibly any POSIX compliant 9 | system) and IronPython. The module named "serial" automatically selects the 10 | appropriate backend. 11 | 12 | - Project Homepage: https://github.com/pyserial/pyserial 13 | - Download Page: https://pypi.python.org/pypi/pyserial 14 | 15 | BSD license, (C) 2001-2017 Chris Liechti 16 | 17 | 18 | Documentation 19 | ============= 20 | For API documentation, usage and examples see files in the "documentation" 21 | directory. The ".rst" files can be read in any text editor or being converted to 22 | HTML or PDF using Sphinx_. An HTML version is online at 23 | https://pythonhosted.org/pyserial/ 24 | 25 | Examples 26 | ======== 27 | Examples and unit tests are in the directory examples_. 28 | 29 | 30 | Installation 31 | ============ 32 | ``pip install pyserial`` should work for most users. 33 | 34 | Detailed information can be found in `documentation/pyserial.rst`_. 35 | 36 | The usual setup.py for Python_ libraries is used for the source distribution. 37 | Windows installers are also available (see download link above). 38 | 39 | .. _`documentation/pyserial.rst`: https://github.com/pyserial/pyserial/blob/master/documentation/pyserial.rst#installation 40 | .. _examples: https://github.com/pyserial/pyserial/blob/master/examples 41 | .. _Python: http://python.org/ 42 | .. _Sphinx: http://sphinx-doc.org/ 43 | .. |build-status| image:: https://travis-ci.org/pyserial/pyserial.svg?branch=master 44 | :target: https://travis-ci.org/pyserial/pyserial 45 | :alt: Build status 46 | .. |docs| image:: https://readthedocs.org/projects/pyserial/badge/?version=latest 47 | :target: http://pyserial.readthedocs.io/ 48 | :alt: Documentation 49 | -------------------------------------------------------------------------------- /dist/bin/pyserial/documentation/index.rst: -------------------------------------------------------------------------------- 1 | .. pySerial documentation master file 2 | 3 | Welcome to pySerial's documentation 4 | =================================== 5 | 6 | 7 | This module encapsulates the access for the serial port. It provides backends 8 | for Python_ running on Windows, OSX, Linux, BSD (possibly any POSIX compliant 9 | system) and IronPython. The module named "serial" automatically selects the 10 | appropriate backend. 11 | 12 | Other pages (online) 13 | 14 | - `project page on GitHub`_ 15 | - `Download Page`_ with releases 16 | - This page, when viewed online is at https://pyserial.readthedocs.io/en/latest/ or 17 | http://pythonhosted.org/pyserial/ . 18 | 19 | .. _Python: http://python.org/ 20 | .. _`project page on GitHub`: https://github.com/pyserial/ 21 | .. _`Download Page`: http://pypi.python.org/pypi/pyserial 22 | 23 | 24 | Contents: 25 | 26 | .. toctree:: 27 | :maxdepth: 2 28 | 29 | pyserial 30 | shortintro 31 | pyserial_api 32 | tools 33 | url_handlers 34 | examples 35 | appendix 36 | 37 | Indices and tables 38 | ================== 39 | 40 | * :ref:`genindex` 41 | * :ref:`modindex` 42 | * :ref:`search` 43 | 44 | -------------------------------------------------------------------------------- /dist/bin/pyserial/documentation/pyserial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/pyserial/documentation/pyserial.png -------------------------------------------------------------------------------- /dist/bin/pyserial/examples/port_publisher.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # daemon starter script 3 | # based on skeleton from Debian GNU/Linux 4 | # cliechti at gmx.net 5 | 6 | PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin 7 | DAEMON=/usr/local/bin/port_publisher.py 8 | NAME=port_publisher 9 | DESC="serial port avahi device publisher" 10 | 11 | test -f $DAEMON || exit 0 12 | 13 | set -e 14 | 15 | case "$1" in 16 | start) 17 | echo -n "Starting $DESC: " 18 | $DAEMON --daemon --pidfile /var/run/$NAME.pid 19 | echo "$NAME." 20 | ;; 21 | stop) 22 | echo -n "Stopping $DESC: " 23 | start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid 24 | # \ --exec $DAEMON 25 | echo "$NAME." 26 | ;; 27 | restart|force-reload) 28 | echo -n "Restarting $DESC: " 29 | start-stop-daemon --stop --quiet --pidfile \ 30 | /var/run/$NAME.pid 31 | # --exec $DAEMON 32 | sleep 1 33 | $DAEMON --daemon --pidfile /var/run/$NAME.pid 34 | echo "$NAME." 35 | ;; 36 | *) 37 | N=/etc/init.d/$NAME 38 | echo "Usage: $N {start|stop|restart|force-reload}" >&2 39 | exit 1 40 | ;; 41 | esac 42 | 43 | exit 0 44 | 45 | -------------------------------------------------------------------------------- /dist/bin/pyserial/examples/setup-miniterm-py2exe.py: -------------------------------------------------------------------------------- 1 | # setup script for py2exe to create the miniterm.exe 2 | # 3 | # (C) 2001-2015 Chris Liechti 4 | # 5 | # SPDX-License-Identifier: BSD-3-Clause 6 | 7 | from distutils.core import setup 8 | import sys 9 | 10 | sys.path.insert(0, '..') 11 | 12 | import serial.tools.miniterm 13 | 14 | 15 | sys.argv.extend("py2exe --bundle 1".split()) 16 | 17 | setup( 18 | name='miniterm', 19 | zipfile=None, 20 | options={"py2exe": { 21 | 'dll_excludes': [], 22 | 'includes': [ 23 | 'serial.urlhandler.protocol_hwgrep', 'serial.urlhandler.protocol_rfc2217', 24 | 'serial.urlhandler.protocol_socket', 'serial.urlhandler.protocol_loop'], 25 | 'dist_dir': 'bin', 26 | 'excludes': ['serialjava', 'serialposix', 'serialcli'], 27 | 'compressed': 1, 28 | } 29 | }, 30 | console=[ 31 | serial.tools.miniterm.__file__ 32 | ], 33 | ) 34 | -------------------------------------------------------------------------------- /dist/bin/pyserial/examples/setup-rfc2217_server-py2exe.py: -------------------------------------------------------------------------------- 1 | # setup script for py2exe to create the rfc2217_server.exe 2 | # 3 | # (C) 2001-2015 Chris Liechti 4 | # 5 | # SPDX-License-Identifier: BSD-3-Clause 6 | 7 | from distutils.core import setup 8 | import sys 9 | import py2exe 10 | 11 | sys.path.insert(0, '..') 12 | 13 | sys.argv.extend("py2exe --bundle 1".split()) 14 | 15 | setup( 16 | name='rfc2217_server', 17 | zipfile=None, 18 | options={"py2exe": { 19 | 'dll_excludes': [], 20 | 'includes': [ 21 | 'serial.urlhandler.protocol_hwgrep', 'serial.urlhandler.protocol_rfc2217', 22 | 'serial.urlhandler.protocol_socket', 'serial.urlhandler.protocol_loop'], 23 | 'dist_dir': 'bin', 24 | 'excludes': ['serialjava', 'serialposix', 'serialcli'], 25 | 'compressed': 1, 26 | }, 27 | }, 28 | console=[ 29 | "rfc2217_server.py", 30 | ], 31 | ) 32 | -------------------------------------------------------------------------------- /dist/bin/pyserial/examples/setup-wxTerminal-py2exe.py: -------------------------------------------------------------------------------- 1 | # This is a setup.py example script for the use with py2exe 2 | # 3 | # (C) 2001-2015 Chris Liechti 4 | # 5 | # SPDX-License-Identifier: BSD-3-Clause 6 | 7 | from distutils.core import setup 8 | import os 9 | import sys 10 | 11 | # this script is only useful for py2exe so just run that distutils command. 12 | # that allows to run it with a simple double click. 13 | sys.argv.append('py2exe') 14 | 15 | # get an icon from somewhere.. the python installation should have one: 16 | icon = os.path.join(os.path.dirname(sys.executable), 'py.ico') 17 | 18 | setup( 19 | options={ 20 | 'py2exe': { 21 | 'excludes': ['javax.comm'], 22 | 'optimize': 2, 23 | 'dist_dir': 'dist', 24 | } 25 | }, 26 | 27 | name="wxTerminal", 28 | windows=[ 29 | { 30 | 'script': "wxTerminal.py", 31 | 'icon_resources': [(0x0004, icon)] 32 | }, 33 | ], 34 | zipfile="stuff.lib", 35 | 36 | description="Simple serial terminal application", 37 | version="0.1", 38 | author="Chris Liechti", 39 | author_email="cliechti@gmx.net", 40 | url="https://github.com/pyserial/pyserial/", 41 | ) 42 | -------------------------------------------------------------------------------- /dist/bin/pyserial/requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/pyserial/requirements.txt -------------------------------------------------------------------------------- /dist/bin/pyserial/serial/tools/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/pyserial/serial/tools/__init__.py -------------------------------------------------------------------------------- /dist/bin/pyserial/serial/urlhandler/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/pyserial/serial/urlhandler/__init__.py -------------------------------------------------------------------------------- /dist/bin/pyserial/serial/urlhandler/protocol_alt.py: -------------------------------------------------------------------------------- 1 | #! python 2 | # 3 | # This module implements a special URL handler that allows selecting an 4 | # alternate implementation provided by some backends. 5 | # 6 | # This file is part of pySerial. https://github.com/pyserial/pyserial 7 | # (C) 2015 Chris Liechti 8 | # 9 | # SPDX-License-Identifier: BSD-3-Clause 10 | # 11 | # URL format: alt://port[?option[=value][&option[=value]]] 12 | # options: 13 | # - class=X used class named X instead of Serial 14 | # 15 | # example: 16 | # use poll based implementation on Posix (Linux): 17 | # python -m serial.tools.miniterm alt:///dev/ttyUSB0?class=PosixPollSerial 18 | 19 | try: 20 | import urlparse 21 | except ImportError: 22 | import urllib.parse as urlparse 23 | 24 | import serial 25 | 26 | 27 | def serial_class_for_url(url): 28 | """extract host and port from an URL string""" 29 | parts = urlparse.urlsplit(url) 30 | if parts.scheme != 'alt': 31 | raise serial.SerialException( 32 | 'expected a string in the form "alt://port[?option[=value][&option[=value]]]": ' 33 | 'not starting with alt:// ({!r})'.format(parts.scheme)) 34 | class_name = 'Serial' 35 | try: 36 | for option, values in urlparse.parse_qs(parts.query, True).items(): 37 | if option == 'class': 38 | class_name = values[0] 39 | else: 40 | raise ValueError('unknown option: {!r}'.format(option)) 41 | except ValueError as e: 42 | raise serial.SerialException( 43 | 'expected a string in the form ' 44 | '"alt://port[?option[=value][&option[=value]]]": {!r}'.format(e)) 45 | if not hasattr(serial, class_name): 46 | raise ValueError('unknown class: {!r}'.format(class_name)) 47 | cls = getattr(serial, class_name) 48 | if not issubclass(cls, serial.Serial): 49 | raise ValueError('class {!r} is not an instance of Serial'.format(class_name)) 50 | return (''.join([parts.netloc, parts.path]), cls) 51 | 52 | # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 53 | if __name__ == '__main__': 54 | s = serial.serial_for_url('alt:///dev/ttyS0?class=PosixPollSerial') 55 | print(s) 56 | -------------------------------------------------------------------------------- /dist/bin/pyserial/serial/urlhandler/protocol_rfc2217.py: -------------------------------------------------------------------------------- 1 | #! python 2 | # 3 | # This is a thin wrapper to load the rfc2271 implementation. 4 | # 5 | # This file is part of pySerial. https://github.com/pyserial/pyserial 6 | # (C) 2011 Chris Liechti 7 | # 8 | # SPDX-License-Identifier: BSD-3-Clause 9 | 10 | from serial.rfc2217 import Serial # noqa 11 | -------------------------------------------------------------------------------- /dist/bin/pyserial/setup.cfg: -------------------------------------------------------------------------------- 1 | [bdist_wheel] 2 | universal=1 3 | 4 | [flake8] 5 | max-line-length = 120 6 | ignore = E265, E126, E241 7 | 8 | -------------------------------------------------------------------------------- /dist/bin/pyserial/test/handlers/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/pyserial/test/handlers/__init__.py -------------------------------------------------------------------------------- /dist/bin/pyserial/test/run_all_tests.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env python 2 | # 3 | # This file is part of pySerial - Cross platform serial port support for Python 4 | # (C) 2001-2015 Chris Liechti 5 | # 6 | # SPDX-License-Identifier: BSD-3-Clause 7 | """\ 8 | UnitTest runner. This one searches for all files named test_*.py and collects 9 | all test cases from these files. Finally it runs all tests and prints a 10 | summary. 11 | """ 12 | 13 | import unittest 14 | import sys 15 | import os 16 | 17 | # inject local copy to avoid testing the installed version instead of the one in the repo 18 | sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) 19 | 20 | import serial # noqa 21 | print("Patching sys.path to test local version. Testing Version: {}".format(serial.VERSION)) 22 | 23 | PORT = 'loop://' 24 | if len(sys.argv) > 1: 25 | PORT = sys.argv[1] 26 | 27 | # find files and the tests in them 28 | mainsuite = unittest.TestSuite() 29 | for modulename in [ 30 | os.path.splitext(x)[0] 31 | for x in os.listdir(os.path.dirname(__file__) or '.') 32 | if x != __file__ and x.startswith("test") and x.endswith(".py") 33 | ]: 34 | try: 35 | module = __import__(modulename) 36 | except ImportError: 37 | print("skipping {}".format(modulename)) 38 | else: 39 | module.PORT = PORT 40 | testsuite = unittest.findTestCases(module) 41 | print("found {} tests in {!r}".format(testsuite.countTestCases(), modulename)) 42 | mainsuite.addTest(testsuite) 43 | 44 | verbosity = 1 45 | if '-v' in sys.argv[1:]: 46 | verbosity = 2 47 | print('-' * 78) 48 | 49 | # run the collected tests 50 | testRunner = unittest.TextTestRunner(verbosity=verbosity) 51 | #~ testRunner = unittest.ConsoleTestRunner(verbosity=verbosity) 52 | result = testRunner.run(mainsuite) 53 | 54 | # set exit code accordingly to test results 55 | sys.exit(not result.wasSuccessful()) 56 | -------------------------------------------------------------------------------- /dist/bin/pyserial/test/test_context.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env python 2 | # 3 | # This file is part of pySerial - Cross platform serial port support for Python 4 | # (C) 2017 Guillaume Galeazzi 5 | # 6 | # SPDX-License-Identifier: BSD-3-Clause 7 | """\ 8 | Some tests for the serial module. 9 | Part of pySerial (http://pyserial.sf.net) (C)2001-2011 cliechti@gmx.net 10 | 11 | Intended to be run on different platforms, to ensure portability of 12 | the code. 13 | 14 | Cover some of the aspects of context managment 15 | """ 16 | 17 | import unittest 18 | import serial 19 | 20 | # on which port should the tests be performed: 21 | PORT = 'loop://' 22 | 23 | 24 | class Test_Context(unittest.TestCase): 25 | """Test context""" 26 | 27 | def setUp(self): 28 | # create a closed serial port 29 | self.s = serial.serial_for_url(PORT) 30 | 31 | def tearDown(self): 32 | self.s.close() 33 | 34 | def test_with_idempotent(self): 35 | with self.s as stream: 36 | stream.write(b'1234') 37 | 38 | # do other stuff like calling an exe which use COM4 39 | 40 | with self.s as stream: 41 | stream.write(b'5678') 42 | 43 | 44 | if __name__ == '__main__': 45 | import sys 46 | sys.stdout.write(__doc__) 47 | sys.argv[1:] = ['-v'] 48 | # When this module is executed from the command-line, it runs all its tests 49 | unittest.main() 50 | -------------------------------------------------------------------------------- /dist/bin/pyserial/test/test_exclusive.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # 3 | # This file is part of pySerial - Cross platform serial port support for Python 4 | # (C) 2017 Chris Liechti 5 | # 6 | # SPDX-License-Identifier: BSD-3-Clause 7 | """\ 8 | Tests for exclusive access feature. 9 | """ 10 | 11 | import os 12 | import unittest 13 | import sys 14 | import serial 15 | 16 | # on which port should the tests be performed: 17 | PORT = 'loop://' 18 | 19 | class Test_exclusive(unittest.TestCase): 20 | """Test serial port locking""" 21 | 22 | def setUp(self): 23 | with serial.serial_for_url(PORT, do_not_open=True) as x: 24 | if not isinstance(x, serial.Serial): 25 | raise unittest.SkipTest("exclusive test only compatible with real serial port") 26 | 27 | def test_exclusive_none(self): 28 | """test for exclusive=None""" 29 | with serial.Serial(PORT, exclusive=None): 30 | pass # OK 31 | 32 | @unittest.skipUnless(os.name == 'posix', "exclusive=False not supported on platform") 33 | def test_exclusive_false(self): 34 | """test for exclusive=False""" 35 | with serial.Serial(PORT, exclusive=False): 36 | pass # OK 37 | 38 | @unittest.skipUnless(os.name in ('posix', 'nt'), "exclusive=True setting not supported on platform") 39 | def test_exclusive_true(self): 40 | """test for exclusive=True""" 41 | with serial.Serial(PORT, exclusive=True): 42 | with self.assertRaises(serial.SerialException): 43 | serial.Serial(PORT, exclusive=True) # fails to open twice 44 | 45 | @unittest.skipUnless(os.name == 'nt', "platform is not restricted to exclusive=True (and None)") 46 | def test_exclusive_only_true(self): 47 | """test if exclusive=False is not supported""" 48 | with self.assertRaises(ValueError): 49 | serial.Serial(PORT, exclusive=False) # expected to fail: False not supported 50 | 51 | 52 | if __name__ == '__main__': 53 | sys.stdout.write(__doc__) 54 | if len(sys.argv) > 1: 55 | PORT = sys.argv[1] 56 | sys.stdout.write("Testing port: {!r}\n".format(PORT)) 57 | sys.argv[1:] = ['-v'] 58 | # When this module is executed from the command-line, it runs all its tests 59 | unittest.main() 60 | -------------------------------------------------------------------------------- /dist/bin/pyserial/test/test_high_load.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # 3 | # This file is part of pySerial - Cross platform serial port support for Python 4 | # (C) 2001-2015 Chris Liechti 5 | # 6 | # SPDX-License-Identifier: BSD-3-Clause 7 | """Some tests for the serial module. 8 | Part of pyserial (http://pyserial.sf.net) (C)2002-2003 cliechti@gmx.net 9 | 10 | Intended to be run on different platforms, to ensure portability of 11 | the code. 12 | 13 | For all these tests a simple hardware is required. 14 | Loopback HW adapter: 15 | Shortcut these pin pairs: 16 | TX <-> RX 17 | RTS <-> CTS 18 | DTR <-> DSR 19 | 20 | On a 9 pole DSUB these are the pins (2-3) (4-6) (7-8) 21 | """ 22 | 23 | import unittest 24 | import sys 25 | import serial 26 | 27 | # on which port should the tests be performed: 28 | PORT = 'loop://' 29 | BAUDRATE = 115200 30 | #~ BAUDRATE=9600 31 | 32 | if sys.version_info >= (3, 0): 33 | bytes_0to255 = bytes(range(256)) 34 | else: 35 | bytes_0to255 = ''.join([chr(x) for x in range(256)]) 36 | 37 | 38 | class TestHighLoad(unittest.TestCase): 39 | """Test sending and receiving large amount of data""" 40 | 41 | N = 16 42 | #~ N = 1 43 | 44 | def setUp(self): 45 | self.s = serial.serial_for_url(PORT, BAUDRATE, timeout=10) 46 | 47 | def tearDown(self): 48 | self.s.close() 49 | 50 | def test0_WriteReadLoopback(self): 51 | """Send big strings, write/read order.""" 52 | for i in range(self.N): 53 | q = bytes_0to255 54 | self.s.write(q) 55 | self.assertEqual(self.s.read(len(q)), q) # expected same which was written before 56 | self.assertEqual(self.s.inWaiting(), 0) # expected empty buffer after all sent chars are read 57 | 58 | def test1_WriteWriteReadLoopback(self): 59 | """Send big strings, multiple write one read.""" 60 | q = bytes_0to255 61 | for i in range(self.N): 62 | self.s.write(q) 63 | read = self.s.read(len(q) * self.N) 64 | self.assertEqual(read, q * self.N, "expected what was written before. got {} bytes, expected {}".format(len(read), self.N * len(q))) 65 | self.assertEqual(self.s.inWaiting(), 0) # "expected empty buffer after all sent chars are read") 66 | 67 | 68 | if __name__ == '__main__': 69 | import sys 70 | sys.stdout.write(__doc__) 71 | if len(sys.argv) > 1: 72 | PORT = sys.argv[1] 73 | sys.stdout.write("Testing port: {!r}\n".format(PORT)) 74 | sys.argv[1:] = ['-v'] 75 | # When this module is executed from the command-line, it runs all its tests 76 | unittest.main() 77 | -------------------------------------------------------------------------------- /dist/bin/pyserial/test/test_iolib.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env python 2 | # 3 | # This file is part of pySerial - Cross platform serial port support for Python 4 | # (C) 2001-2015 Chris Liechti 5 | # 6 | # SPDX-License-Identifier: BSD-3-Clause 7 | """\ 8 | Some tests for the serial module. 9 | Part of pyserial (http://pyserial.sf.net) (C)2001-2009 cliechti@gmx.net 10 | 11 | Intended to be run on different platforms, to ensure portability of 12 | the code. 13 | 14 | This modules contains test for the interaction between Serial and the io 15 | library. This only works on Python 2.6+ that introduced the io library. 16 | 17 | For all these tests a simple hardware is required. 18 | Loopback HW adapter: 19 | Shortcut these pin pairs: 20 | TX <-> RX 21 | RTS <-> CTS 22 | DTR <-> DSR 23 | 24 | On a 9 pole DSUB these are the pins (2-3) (4-6) (7-8) 25 | """ 26 | 27 | import io 28 | import sys 29 | import unittest 30 | import serial 31 | 32 | # on which port should the tests be performed: 33 | PORT = 'loop://' 34 | 35 | 36 | class Test_SerialAndIO(unittest.TestCase): 37 | 38 | def setUp(self): 39 | self.s = serial.serial_for_url(PORT, timeout=1) 40 | #~ self.io = io.TextIOWrapper(self.s) 41 | self.io = io.TextIOWrapper(io.BufferedRWPair(self.s, self.s)) 42 | 43 | def tearDown(self): 44 | self.s.close() 45 | 46 | def test_hello_raw(self): 47 | self.io.write(b"hello\n".decode('utf-8')) 48 | self.io.flush() # it is buffering. required to get the data out 49 | hello = self.io.readline() 50 | self.assertEqual(hello, b"hello\n".decode('utf-8')) 51 | 52 | # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 53 | if __name__ == '__main__': 54 | import sys 55 | sys.stdout.write(__doc__) 56 | if len(sys.argv) > 1: 57 | PORT = sys.argv[1] 58 | sys.stdout.write("Testing port: {!r}\n".format(PORT)) 59 | sys.argv[1:] = ['-v'] 60 | # When this module is executed from the command-line, it runs all its tests 61 | unittest.main() 62 | -------------------------------------------------------------------------------- /dist/bin/pyserial/test/test_pty.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # 3 | # This file is part of pySerial - Cross platform serial port support for Python 4 | # (C) 2016 Chris Liechti 5 | # 6 | # SPDX-License-Identifier: BSD-3-Clause 7 | """ 8 | Test PTY related functionality. 9 | """ 10 | 11 | import os 12 | import sys 13 | 14 | try: 15 | import pty 16 | except ImportError: 17 | pty = None 18 | import unittest 19 | import serial 20 | 21 | DATA = b'Hello\n' 22 | 23 | @unittest.skipIf(pty is None, "pty module not supported on platform") 24 | class Test_Pty_Serial_Open(unittest.TestCase): 25 | """Test PTY serial open""" 26 | 27 | def setUp(self): 28 | # Open PTY 29 | self.master, self.slave = pty.openpty() 30 | 31 | def test_pty_serial_open_slave(self): 32 | with serial.Serial(os.ttyname(self.slave), timeout=1) as slave: 33 | pass # OK 34 | 35 | def test_pty_serial_write(self): 36 | with serial.Serial(os.ttyname(self.slave), timeout=1) as slave: 37 | with os.fdopen(self.master, "wb") as fd: 38 | fd.write(DATA) 39 | fd.flush() 40 | out = slave.read(len(DATA)) 41 | self.assertEqual(DATA, out) 42 | 43 | def test_pty_serial_read(self): 44 | with serial.Serial(os.ttyname(self.slave), timeout=1) as slave: 45 | with os.fdopen(self.master, "rb") as fd: 46 | slave.write(DATA) 47 | slave.flush() 48 | out = fd.read(len(DATA)) 49 | self.assertEqual(DATA, out) 50 | 51 | if __name__ == '__main__': 52 | sys.stdout.write(__doc__) 53 | # When this module is executed from the command-line, it runs all its tests 54 | unittest.main() 55 | -------------------------------------------------------------------------------- /dist/bin/pyserial/test/test_rfc2217.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env python 2 | # 3 | # This file is part of pySerial - Cross platform serial port support for Python 4 | # (C) 2015 Chris Liechti 5 | # 6 | # SPDX-License-Identifier: BSD-3-Clause 7 | """\ 8 | Test RFC 2217 related functionality. 9 | """ 10 | 11 | import unittest 12 | import serial 13 | import serial.rfc2217 14 | 15 | 16 | class Test_RFC2217(unittest.TestCase): 17 | """Test RFC 2217 related functionality""" 18 | 19 | def test_failed_connection(self): 20 | # connection to closed port 21 | s = serial.serial_for_url('rfc2217://127.99.99.99:2217', do_not_open=True) 22 | self.assertRaises(serial.SerialException, s.open) 23 | self.assertFalse(s.is_open) 24 | s.close() # no errors expected 25 | # invalid address 26 | s = serial.serial_for_url('rfc2217://127goingtofail', do_not_open=True) 27 | self.assertRaises(serial.SerialException, s.open) 28 | self.assertFalse(s.is_open) 29 | s.close() # no errors expected 30 | # close w/o open is also OK 31 | s = serial.serial_for_url('rfc2217://irrelevant', do_not_open=True) 32 | self.assertFalse(s.is_open) 33 | s.close() # no errors expected 34 | 35 | 36 | if __name__ == '__main__': 37 | import sys 38 | sys.stdout.write(__doc__) 39 | sys.stdout.write("Testing connection on localhost\n") 40 | sys.argv[1:] = ['-v'] 41 | # When this module is executed from the command-line, it runs all its tests 42 | unittest.main() 43 | -------------------------------------------------------------------------------- /dist/bin/pyserial/test/test_rs485.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # 3 | # This file is part of pySerial - Cross platform serial port support for Python 4 | # (C) 2015 Chris Liechti 5 | # 6 | # SPDX-License-Identifier: BSD-3-Clause 7 | """\ 8 | Test RS485 related functionality. 9 | """ 10 | 11 | import unittest 12 | import serial 13 | import serial.rs485 14 | 15 | # on which port should the tests be performed: 16 | PORT = 'loop://' 17 | 18 | 19 | class Test_RS485_settings(unittest.TestCase): 20 | """Test RS485 related functionality""" 21 | 22 | def setUp(self): 23 | # create a closed serial port 24 | self.s = serial.serial_for_url(PORT, do_not_open=True) 25 | 26 | def tearDown(self): 27 | self.s.close() 28 | 29 | def test_enable_RS485(self): 30 | # XXX open() port - but will result in fail for most HW... 31 | #~ self.s.open() 32 | self.assertEqual(self.s._rs485_mode, None, 'RS485 is disabled by default') 33 | self.assertEqual(self.s.rs485_mode, None, 'RS485 is disabled by default') 34 | self.s.rs485_mode = serial.rs485.RS485Settings() 35 | self.assertTrue(self.s._rs485_mode is not None, 'RS485 is enabled') 36 | self.assertTrue(self.s.rs485_mode is not None, 'RS485 is enabled') 37 | self.s.rs485_mode = None 38 | self.assertEqual(self.s._rs485_mode, None, 'RS485 is disabled again') 39 | self.assertEqual(self.s.rs485_mode, None, 'RS485 is disabled again') 40 | 41 | 42 | class Test_RS485_class(unittest.TestCase): 43 | """Test RS485 class""" 44 | 45 | def setUp(self): 46 | if not isinstance(serial.serial_for_url(PORT), serial.Serial): 47 | raise unittest.SkipTest("RS485 test only compatible with real serial port") 48 | self.s = serial.rs485.RS485(PORT, timeout=1) 49 | 50 | def tearDown(self): 51 | self.s.close() 52 | 53 | def test_RS485_class(self): 54 | self.s.rs485_mode = serial.rs485.RS485Settings() 55 | self.s.write(b'hello') 56 | self.assertEqual(self.s.read(5), b'hello') 57 | 58 | 59 | if __name__ == '__main__': 60 | import sys 61 | sys.stdout.write(__doc__) 62 | if len(sys.argv) > 1: 63 | PORT = sys.argv[1] 64 | sys.stdout.write("Testing port: {!r}\n".format(PORT)) 65 | sys.argv[1:] = ['-v'] 66 | # When this module is executed from the command-line, it runs all its tests 67 | unittest.main() 68 | -------------------------------------------------------------------------------- /dist/bin/pyserial/test/test_timeout_class.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # 3 | # This file is part of pySerial - Cross platform serial port support for Python 4 | # (C) 2016 Chris Liechti 5 | # 6 | # SPDX-License-Identifier: BSD-3-Clause 7 | """ 8 | Test Timeout helper class. 9 | """ 10 | import sys 11 | import unittest 12 | import time 13 | from serial import serialutil 14 | 15 | 16 | class TestTimeoutClass(unittest.TestCase): 17 | """Test the Timeout class""" 18 | 19 | def test_simple_timeout(self): 20 | """Test simple timeout""" 21 | t = serialutil.Timeout(2) 22 | self.assertFalse(t.expired()) 23 | self.assertTrue(t.time_left() > 0) 24 | time.sleep(2.1) 25 | self.assertTrue(t.expired()) 26 | self.assertEqual(t.time_left(), 0) 27 | 28 | def test_non_blocking(self): 29 | """Test nonblocking case (0)""" 30 | t = serialutil.Timeout(0) 31 | self.assertTrue(t.is_non_blocking) 32 | self.assertFalse(t.is_infinite) 33 | self.assertTrue(t.expired()) 34 | 35 | def test_blocking(self): 36 | """Test no timeout (None)""" 37 | t = serialutil.Timeout(None) 38 | self.assertFalse(t.is_non_blocking) 39 | self.assertTrue(t.is_infinite) 40 | #~ self.assertFalse(t.expired()) 41 | 42 | def test_changing_clock(self): 43 | """Test recovery from chaning clock""" 44 | class T(serialutil.Timeout): 45 | def TIME(self): 46 | return test_time 47 | test_time = 1000 48 | t = T(10) 49 | self.assertEqual(t.target_time, 1010) 50 | self.assertFalse(t.expired()) 51 | self.assertTrue(t.time_left() > 0) 52 | test_time = 100 # clock jumps way back 53 | self.assertTrue(t.time_left() > 0) 54 | self.assertTrue(t.time_left() <= 10) 55 | self.assertEqual(t.target_time, 110) 56 | test_time = 10000 # jump way forward 57 | self.assertEqual(t.time_left(), 0) # if will expire immediately 58 | 59 | 60 | if __name__ == '__main__': 61 | sys.stdout.write(__doc__) 62 | if len(sys.argv) > 1: 63 | PORT = sys.argv[1] 64 | sys.argv[1:] = ['-v'] 65 | # When this module is executed from the command-line, it runs all its tests 66 | unittest.main() 67 | -------------------------------------------------------------------------------- /dist/bin/pyserial/test/test_url.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env python 2 | # 3 | # This file is part of pySerial - Cross platform serial port support for Python 4 | # (C) 2001-2015 Chris Liechti 5 | # 6 | # SPDX-License-Identifier: BSD-3-Clause 7 | """\ 8 | Some tests for the serial module. 9 | Part of pySerial (http://pyserial.sf.net) (C)2001-2011 cliechti@gmx.net 10 | 11 | Intended to be run on different platforms, to ensure portability of 12 | the code. 13 | 14 | Cover some of the aspects of serial_for_url and the extension mechanism. 15 | """ 16 | 17 | import unittest 18 | import serial 19 | 20 | 21 | class Test_URL(unittest.TestCase): 22 | """Test serial_for_url""" 23 | 24 | def test_loop(self): 25 | """loop interface""" 26 | serial.serial_for_url('loop://', do_not_open=True) 27 | 28 | def test_bad_url(self): 29 | """invalid protocol specified""" 30 | self.assertRaises(ValueError, serial.serial_for_url, "imnotknown://") 31 | 32 | def test_custom_url(self): 33 | """custom protocol handlers""" 34 | # it's unknown 35 | self.assertRaises(ValueError, serial.serial_for_url, "test://") 36 | # add search path 37 | serial.protocol_handler_packages.append('handlers') 38 | # now it should work 39 | serial.serial_for_url("test://") 40 | # remove our handler again 41 | serial.protocol_handler_packages.remove('handlers') 42 | # so it should not work anymore 43 | self.assertRaises(ValueError, serial.serial_for_url, "test://") 44 | 45 | 46 | if __name__ == '__main__': 47 | import sys 48 | sys.stdout.write(__doc__) 49 | sys.argv[1:] = ['-v'] 50 | # When this module is executed from the command-line, it runs all its tests 51 | unittest.main() 52 | -------------------------------------------------------------------------------- /dist/bin/pyserial/test/test_util.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # 3 | # This file is part of pySerial - Cross platform serial port support for Python 4 | # (C) 2016 Chris Liechti 5 | # 6 | # SPDX-License-Identifier: BSD-3-Clause 7 | """\ 8 | Tests for utility functions of serualutil. 9 | """ 10 | 11 | import os 12 | import unittest 13 | import serial 14 | 15 | 16 | class Test_util(unittest.TestCase): 17 | """Test serial utility functions""" 18 | 19 | def test_to_bytes(self): 20 | self.assertEqual(serial.to_bytes([1, 2, 3]), b'\x01\x02\x03') 21 | self.assertEqual(serial.to_bytes(b'\x01\x02\x03'), b'\x01\x02\x03') 22 | self.assertEqual(serial.to_bytes(bytearray([1,2,3])), b'\x01\x02\x03') 23 | # unicode is not supported test. use decode() instead of u'' syntax to be 24 | # compatible to Python 3.x < 3.4 25 | self.assertRaises(TypeError, serial.to_bytes, b'hello'.decode('utf-8')) 26 | 27 | def test_iterbytes(self): 28 | self.assertEqual(list(serial.iterbytes(b'\x01\x02\x03')), [b'\x01', b'\x02', b'\x03']) 29 | 30 | 31 | if __name__ == '__main__': 32 | import sys 33 | sys.stdout.write(__doc__) 34 | sys.argv[1:] = ['-v'] 35 | # When this module is executed from the command-line, it runs all its tests 36 | unittest.main() 37 | -------------------------------------------------------------------------------- /dist/bin/upload.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Wrapper to call esptool, stripped down from the Arduino ESP8266 project. 4 | 5 | import sys 6 | import os 7 | import tempfile 8 | 9 | sys.argv.pop(0) # Remove executable name 10 | toolspath = os.path.dirname(os.path.realpath(__file__)).replace('\\', '/') # CWD in UNIX format 11 | try: 12 | sys.path.insert(0, toolspath + "/pyserial") # Add pyserial dir to search path 13 | sys.path.insert(0, toolspath + "/esptool") # Add esptool dir to search path 14 | import esptool # If this fails, we can't continue and will bomb below 15 | except: 16 | sys.stderr.write("pyserial or esptool directories not found next to this upload.py tool.\n") 17 | sys.exit(1) 18 | 19 | esptool.main(sys.argv) 20 | -------------------------------------------------------------------------------- /dist/bin/win32/mklittlefs.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/win32/mklittlefs.exe -------------------------------------------------------------------------------- /dist/bin/win32/python3/_asyncio.pyd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/win32/python3/_asyncio.pyd -------------------------------------------------------------------------------- /dist/bin/win32/python3/_bz2.pyd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/win32/python3/_bz2.pyd -------------------------------------------------------------------------------- /dist/bin/win32/python3/_ctypes.pyd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/win32/python3/_ctypes.pyd -------------------------------------------------------------------------------- /dist/bin/win32/python3/_decimal.pyd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/win32/python3/_decimal.pyd -------------------------------------------------------------------------------- /dist/bin/win32/python3/_elementtree.pyd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/win32/python3/_elementtree.pyd -------------------------------------------------------------------------------- /dist/bin/win32/python3/_hashlib.pyd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/win32/python3/_hashlib.pyd -------------------------------------------------------------------------------- /dist/bin/win32/python3/_lzma.pyd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/win32/python3/_lzma.pyd -------------------------------------------------------------------------------- /dist/bin/win32/python3/_msi.pyd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/win32/python3/_msi.pyd -------------------------------------------------------------------------------- /dist/bin/win32/python3/_multiprocessing.pyd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/win32/python3/_multiprocessing.pyd -------------------------------------------------------------------------------- /dist/bin/win32/python3/_overlapped.pyd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/win32/python3/_overlapped.pyd -------------------------------------------------------------------------------- /dist/bin/win32/python3/_queue.pyd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/win32/python3/_queue.pyd -------------------------------------------------------------------------------- /dist/bin/win32/python3/_socket.pyd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/win32/python3/_socket.pyd -------------------------------------------------------------------------------- /dist/bin/win32/python3/_sqlite3.pyd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/win32/python3/_sqlite3.pyd -------------------------------------------------------------------------------- /dist/bin/win32/python3/_ssl.pyd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/win32/python3/_ssl.pyd -------------------------------------------------------------------------------- /dist/bin/win32/python3/_uuid.pyd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/win32/python3/_uuid.pyd -------------------------------------------------------------------------------- /dist/bin/win32/python3/_zoneinfo.pyd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/win32/python3/_zoneinfo.pyd -------------------------------------------------------------------------------- /dist/bin/win32/python3/libcrypto-1_1.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/win32/python3/libcrypto-1_1.dll -------------------------------------------------------------------------------- /dist/bin/win32/python3/libffi-7.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/win32/python3/libffi-7.dll -------------------------------------------------------------------------------- /dist/bin/win32/python3/libssl-1_1.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/win32/python3/libssl-1_1.dll -------------------------------------------------------------------------------- /dist/bin/win32/python3/pyexpat.pyd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/win32/python3/pyexpat.pyd -------------------------------------------------------------------------------- /dist/bin/win32/python3/python.cat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/win32/python3/python.cat -------------------------------------------------------------------------------- /dist/bin/win32/python3/python.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/win32/python3/python.exe -------------------------------------------------------------------------------- /dist/bin/win32/python3/python3.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/win32/python3/python3.dll -------------------------------------------------------------------------------- /dist/bin/win32/python3/python39._pth: -------------------------------------------------------------------------------- 1 | python39.zip 2 | . 3 | 4 | # Uncomment to run site.main() automatically 5 | #import site 6 | -------------------------------------------------------------------------------- /dist/bin/win32/python3/python39.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/win32/python3/python39.dll -------------------------------------------------------------------------------- /dist/bin/win32/python3/python39.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/win32/python3/python39.zip -------------------------------------------------------------------------------- /dist/bin/win32/python3/pythonw.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/win32/python3/pythonw.exe -------------------------------------------------------------------------------- /dist/bin/win32/python3/select.pyd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/win32/python3/select.pyd -------------------------------------------------------------------------------- /dist/bin/win32/python3/sqlite3.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/win32/python3/sqlite3.dll -------------------------------------------------------------------------------- /dist/bin/win32/python3/unicodedata.pyd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/win32/python3/unicodedata.pyd -------------------------------------------------------------------------------- /dist/bin/win32/python3/vcruntime140.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/win32/python3/vcruntime140.dll -------------------------------------------------------------------------------- /dist/bin/win32/python3/winsound.pyd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/bin/win32/python3/winsound.pyd -------------------------------------------------------------------------------- /dist/firmware/README.md: -------------------------------------------------------------------------------- 1 | File names for firmware binaries located in this directory are defined by espsflashtool.json -------------------------------------------------------------------------------- /dist/fs/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "cfgver": 1, 3 | "init": true, 4 | "device": { 5 | "id": "ESPixelStick" 6 | }, 7 | "network": { 8 | "ssid": "", 9 | "passphrase": "", 10 | "hostname": "", 11 | "ip": "", 12 | "netmask": "", 13 | "gateway": "", 14 | "dhcp": true, 15 | "sta_timeout": 15, 16 | "ap_fallback": false, 17 | "ap_timeout": 120, 18 | "ap_reboot": false 19 | } 20 | } -------------------------------------------------------------------------------- /dist/lib/flatlaf-2.6.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/lib/flatlaf-2.6.jar -------------------------------------------------------------------------------- /dist/lib/gson-2.7.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/lib/gson-2.7.jar -------------------------------------------------------------------------------- /dist/lib/jSerialComm-2.10.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/dist/lib/jSerialComm-2.10.3.jar -------------------------------------------------------------------------------- /gulpme.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | rem set the directory to the same value as tht used to strt the bat file 4 | setlocal enabledelayedexpansion 5 | @setlocal enableextensions 6 | @cd /d "%~dp0" 7 | set NODE_MODULES_PATH=%~dp0%node_modules 8 | 9 | set NULL_VAL=null 10 | set NODE_VER=%NULL_VAL% 11 | set NODE_EXEC=v22.3.0/node-v22.3.0-x86.msi 12 | 13 | node -v >.tmp_nodever 14 | set /p NODE_VER=<.tmp_nodever 15 | del .tmp_nodever 16 | 17 | set GULP_PATH=%NULL_VAL% 18 | where gulp > .tempGulpPath 19 | set /p GULP_PATH=<.tempGulpPath 20 | del .tempGulpPath 21 | 22 | IF "%NODE_VER%"=="%NULL_VAL%" ( 23 | NET SESSION >nul 2>&1 24 | IF %ERRORLEVEL% NEQ 0 ( 25 | echo This setup needs admin permissions. Please run this file as admin. 26 | pause 27 | exit 28 | ) 29 | 30 | echo. 31 | echo Node.js is not installed! Please press a key to download and install it from the website that will open. 32 | PAUSE 33 | start "" http://nodejs.org/dist/%NODE_EXEC% 34 | echo. 35 | echo. 36 | echo After you have installed Node.js, press a key to shut down this process. Please restart it again afterwards. 37 | call npm install 38 | PAUSE 39 | EXIT 40 | ) ELSE ( 41 | echo A version of Node.js ^(%NODE_VER%^) is installed. Proceeding... 42 | ) 43 | 44 | set InstallGulp=0 45 | 46 | if "%GULP_PATH%"=="%NULL_VAL%" ( 47 | set InstallGulp=1 48 | echo no gulp path 49 | ) 50 | 51 | if NOT exist %NODE_MODULES_PATH% ( 52 | set InstallGulp=1 53 | echo no modules dir 54 | ) 55 | 56 | rem echo NODE_MODULES_PATH = %NODE_MODULES_PATH% 57 | rem echo GULP_PATH = %GULP_PATH% 58 | rem echo InstallGulp = !InstallGulp! 59 | rem pause 60 | 61 | IF !InstallGulp! == 1 ( 62 | NET SESSION >nul 2>&1 63 | IF %ERRORLEVEL% NEQ 0 ( 64 | echo This setup needs admin permissions. Please run this file as admin. 65 | pause 66 | exit 67 | ) 68 | echo. 69 | echo Install gulp 70 | 71 | call npm install 72 | call npm install --global gulp-cli 73 | call npm install --global 74 | call npm install --save-dev gulp 75 | call npm audit fix 76 | ) ELSE ( 77 | echo gulp is installed. Proceeding... 78 | ) 79 | 80 | echo execute gulp 81 | gulp 82 | pause 83 | -------------------------------------------------------------------------------- /html/NodeJsServer.cjs: -------------------------------------------------------------------------------- 1 | const express = require("express"); 2 | const app = express(); 3 | 4 | app.listen(8000, () => { 5 | console.log("Application started and Listening on port 8000"); 6 | }); 7 | 8 | app.use(express.static(__dirname)); 9 | 10 | app.get("/", (req, res) => { 11 | res.sendFile(__dirname + "/index.html"); 12 | }); 13 | -------------------------------------------------------------------------------- /html/README.md: -------------------------------------------------------------------------------- 1 | # ESPixelStick Web Source 2 | 3 | These are the web source files which must be placed in ```data/www``` and uploaded to LittleFS with the [ESP8266 filesystem uploader](https://github.com/esp8266/arduino-esp8266fs-plugin). All source files (html, css, js) should be minified and gziped before uploading. A [gulp](http://gulpjs.com) build script is provided in the root of the sketch directory to automate this task, or you can do it manually. 4 | 5 | ## How to setup and use Gulp 6 | 7 | - To install Gulp, you first need to install [Node.js](https://nodejs.org). The latest stable version should be fine. Make sure the node executable is in your path and that you can execute it from a command prompt. 8 | - After Node.js is installed, open a command prompt and update to the latest version of npm - ```npm install -g npm``` and npx - ```npm install -g npx``` 9 | - Install Gulp globally 10 | - Open a command window in administrator mode and change to your development directory 11 | ```npm install -g gulp-cli``` 12 | - To install Gulp and the dependencies for this project, simply run the following in the root of the project 13 | - Open a command window in administrator mode and change to your development directory 14 | ```npm install --global``` 15 | ```npm install --global gulp``` 16 | ```npm install --save-dev --global gulp``` 17 | - Running ```gulp``` in a command window will minify, gzip, and move all web assets to ```data/www``` for you. 18 | - You can also run ```gulp watch``` and web pages will automatically be processed and moved as they are saved. 19 | 20 | 21 | 22 | ## Development 23 | 24 | When developing, check the comments at the top and bottom of ```index.html``` to use local sources. You'll need to use a local web server due to the ajax page loading. Python includes a simple one, just run ```python -m http.server``` (python 3) in this directory and connect to ```http://localhost:8000/?target=x.x.x.x``` where ```x.x.x.x``` is a device with the ESPixelStick firmware to use for the websocket connection. If for some reason your system blocks the default port of 8000, you can pass a port is an option to the embedded python http server. 25 | 26 | ## 3rd Party Software 27 | 28 | The following 3rd party software is included for the web frontend. 29 | 30 | - [Bootstrap](http://getbootstrap.com/) 31 | - [jQuery](https://jquery.com/) 32 | - [tinyColorPicker](https://github.com/PitPik/tinyColorPicker) 33 | -------------------------------------------------------------------------------- /html/UpdRecipe.json: -------------------------------------------------------------------------------- 1 | { 2 | "semantics": [ 3 | { "Rename": { "Full Path from": "Full Path to" } }, 4 | { "Delete": "Full Path and Name Of Field to delete" }, 5 | { "SetNumber": { "Full path to element to set": 0 } }, 6 | { "SetString": { "Full path to element to set": "string" } }, 7 | { "AppendString": { "Full path to element to set": "string to append" } }, 8 | { "PrependString": { "Full path to element to set": "string to prepend" } }, 9 | { "Add": { "Full path to element to add to": 0.0 } }, 10 | { "Subtract": { "Full path to element to Subtract From": 0.0 } }, 11 | { "Multiply": { "Full path to element to Multiply": 0.0 } }, 12 | { "Divide": { "Full path to element to Divide": 0.0 } } 13 | ], 14 | 15 | "TargetVersions": { 16 | 17 | "0": { 18 | "List of": "actions" 19 | }, 20 | 21 | "1": { 22 | "List of": "actions" 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /html/alexa.html: -------------------------------------------------------------------------------- 1 |
2 | Alexa Configuration 3 |
4 |

No Configuration Needed for Input mode : Alexa

5 |
6 |
7 | -------------------------------------------------------------------------------- /html/artnet.html: -------------------------------------------------------------------------------- 1 |
2 | ArtNet Configuration 3 |
4 | 5 |
6 | 7 |
8 | 9 |
10 | 11 |
12 |
13 | 14 |
15 | 16 |
17 | 18 |
19 |
20 |
-------------------------------------------------------------------------------- /html/ddp.html: -------------------------------------------------------------------------------- 1 |
2 | DDP Configuration 3 |
4 |

No Configuration Needed for Input mode : DDP

5 |
6 |
-------------------------------------------------------------------------------- /html/dmx.html: -------------------------------------------------------------------------------- 1 |
2 | DMX Configuration 3 | 4 |
5 | 6 |
7 | 8 |
9 | 10 |
11 |
12 | 13 | 29 | -------------------------------------------------------------------------------- /html/e1_31.html: -------------------------------------------------------------------------------- 1 |
2 | E1.31 Configuration 3 |
4 | 5 |
6 | 7 |
8 | 9 |
10 | 11 |
12 |
13 | 14 |
15 | 16 |
17 | 18 |
19 |
20 | 26 | 27 |
-------------------------------------------------------------------------------- /html/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forkineye/ESPixelStick/454c71ea04b769fa232c0beab0fd526020d92109/html/favicon.ico -------------------------------------------------------------------------------- /html/fpp_remote.html: -------------------------------------------------------------------------------- 1 |
2 | FPP Remote Configuration 3 |
4 | 5 |
6 | 7 |
8 | 9 |
10 | 11 |
12 | 13 |
14 | 15 |
16 | 17 |
18 | 19 |
20 | 21 |
22 | 23 |
24 |
25 |
-------------------------------------------------------------------------------- /html/gece.html: -------------------------------------------------------------------------------- 1 |
2 | GECE Configuration 3 | 4 |
5 | 6 |
7 | 8 |
9 | 10 |
11 | 12 |
13 | 14 |
15 |
16 | 17 | -------------------------------------------------------------------------------- /html/grinch.html: -------------------------------------------------------------------------------- 1 |
2 | Grinch Configuration 3 |
4 | 5 |
6 | 7 |
8 |
9 | 10 | 11 |
12 | 13 |
14 | 15 | 16 |
17 | 18 |
19 | 20 | 21 |
22 | 23 |
24 |
25 | -------------------------------------------------------------------------------- /html/relay.html: -------------------------------------------------------------------------------- 1 |
2 | Relay Configuration 3 |
4 | 5 |
6 | 7 |
8 |
9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 |
ChannelEnabledHTTP EnabledInvertedPwmGPIO IDTrigger Threshold
27 |
28 |
29 | 30 | -------------------------------------------------------------------------------- /html/renard.html: -------------------------------------------------------------------------------- 1 |
2 | Renard Configuration 3 |
4 | 5 |
6 | 7 |
8 | 9 |
10 | 11 |
12 |
13 | 14 | 20 |
21 | 22 | -------------------------------------------------------------------------------- /html/server.bat: -------------------------------------------------------------------------------- 1 | rem http-server -p8000 2 | node NodeJsServer.cjs 3 | -------------------------------------------------------------------------------- /html/servo_pca9685.html: -------------------------------------------------------------------------------- 1 |
2 | Servo PCA9685 Configuration 3 |
4 | 5 |
6 | 7 |
8 |
9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |
ChannelEnabledMin Pulse WidthMax Pulse WidthInput Data TypeResting Data value
25 |
26 |
27 | 28 | 36 | -------------------------------------------------------------------------------- /include/FastTimer.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | /* 3 | * FastTimer.hpp 4 | * 5 | * Project: ESPixelStick - An ESP8266 / ESP32 and E1.31 based pixel driver 6 | * Copyright (c) 2021, 2022 Shelby Merrick 7 | * http://www.forkineye.com 8 | * 9 | * This program is provided free for you to use in any way that you wish, 10 | * subject to the laws and regulations where you are using it. Due diligence 11 | * is strongly suggested before using this code. Please give credit where due. 12 | * 13 | * The Author makes no warranty of any kind, express or implied, with regard 14 | * to this program or the documentation contained in this document. The 15 | * Author shall not be liable in any event for incidental or consequential 16 | * damages in connection with, or arising out of, the furnishing, performance 17 | * or use of these programs. 18 | * 19 | */ 20 | 21 | #include "ESPixelStick.h" 22 | 23 | class FastTimer 24 | { 25 | public: 26 | FastTimer (); 27 | virtual ~FastTimer (); 28 | 29 | void StartTimer (uint32_t DurationMS, bool continuous); 30 | bool IsExpired(); 31 | void CancelTimer(); 32 | uint32_t GetTimeRemaining(); 33 | 34 | private: 35 | bool Continuous = false; 36 | uint32_t DurationMS = 0; 37 | uint64_t EndTimeMS = 0; 38 | uint32_t OffsetMS = 0; 39 | 40 | protected: 41 | 42 | }; // FastTimer 43 | -------------------------------------------------------------------------------- /include/UnzipFiles.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | /* 3 | * UnzipFiles.hpp 4 | * 5 | * Project: ESPixelStick - An ESP8266 / ESP32 and E1.31 based pixel driver 6 | * Copyright (c) 2021, 2025 Shelby Merrick 7 | * http://www.forkineye.com 8 | * 9 | * This program is provided free for you to use in any way that you wish, 10 | * subject to the laws and regulations where you are using it. Due diligence 11 | * is strongly suggested before using this code. Please give credit where due. 12 | * 13 | * The Author makes no warranty of any kind, express or implied, with regard 14 | * to this program or the documentation contained in this document. The 15 | * Author shall not be liable in any event for incidental or consequential 16 | * damages in connection with, or arising out of, the furnishing, performance 17 | * or use of these programs. 18 | * 19 | */ 20 | #ifdef SUPPORT_UNZIP 21 | 22 | #include "ESPixelStick.h" 23 | #include 24 | 25 | class UnzipFiles 26 | { 27 | public: 28 | UnzipFiles (); 29 | virtual ~UnzipFiles (); 30 | 31 | void Run(); 32 | 33 | void * OpenZipFile(const char *filename, int32_t *size); 34 | void CloseZipFile(void *p); 35 | int32_t ReadZipFile(void *p, uint8_t *buffer, int32_t length); 36 | int32_t SeekZipFile(void *p, int32_t position, int iType); 37 | void GetDriverName(String & value) {value = "Unzip";} 38 | void ProcessZipFile(String & FileName); 39 | void ProcessCurrentFileInZip(unz_file_info & fi, String & Name); 40 | 41 | private: 42 | UNZIP zip; // statically allocate the UNZIP structure (41K) 43 | uint8_t *pOutputBuffer = nullptr; 44 | uint32_t BufferSize = 0; 45 | int32_t SeekPosition = 0; 46 | 47 | protected: 48 | 49 | }; // UnzipFiles 50 | 51 | extern UnzipFiles gUnzipFiles; 52 | 53 | #endif // def SUPPORT_UNZIP 54 | -------------------------------------------------------------------------------- /include/input/InputAlexa.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | /* 3 | * InputAlexa.h 4 | * 5 | * Project: ESPixelStick - An ESP8266 / ESP32 and E1.31 based pixel driver 6 | * Copyright (c) 2021, 2025 Shelby Merrick 7 | * http://www.forkineye.com 8 | * 9 | * This program is provided free for you to use in any way that you wish, 10 | * subject to the laws and regulations where you are using it. Due diligence 11 | * is strongly suggested before using this code. Please give credit where due. 12 | * 13 | * The Author makes no warranty of any kind, express or implied, with regard 14 | * to this program or the documentation contained in this document. The 15 | * Author shall not be liable in any event for incidental or consequential 16 | * damages in connection with, or arising out of, the furnishing, performance 17 | * or use of these programs. 18 | * 19 | */ 20 | 21 | #include "InputCommon.hpp" 22 | #include "WebMgr.hpp" 23 | 24 | class c_InputAlexa : public c_InputCommon 25 | { 26 | public: 27 | 28 | c_InputAlexa ( 29 | c_InputMgr::e_InputChannelIds NewInputChannelId, 30 | c_InputMgr::e_InputType NewChannelType, 31 | uint32_t BufferSize); 32 | 33 | virtual ~c_InputAlexa (); 34 | 35 | // functions to be provided by the derived class 36 | void Begin (); ///< set up the operating environment based on the current config (or defaults) 37 | bool SetConfig (JsonObject& jsonConfig); ///< Set a new config in the driver 38 | void GetConfig (JsonObject& jsonConfig); ///< Get the current config used by the driver 39 | void GetStatus (JsonObject& jsonStatus); 40 | void Process (); 41 | void GetDriverName (String& sDriverName) { sDriverName = "Alexa"; } ///< get the name for the instantiated driver 42 | void SetBufferInfo (uint32_t BufferSize); 43 | 44 | private: 45 | 46 | Ticker mqttTicker; // Ticker to handle MQTT 47 | c_InputCommon * pEffectsEngine = nullptr; 48 | 49 | void validateConfiguration (); 50 | void onMessage (EspalexaDevice* pDevice); 51 | 52 | void load (); ///< Load configuration from File System 53 | void save (); ///< Save configuration to File System 54 | 55 | const char* ON = "ON"; 56 | const char* OFF = "OFF"; 57 | 58 | bool stateOn = false; 59 | 60 | }; 61 | -------------------------------------------------------------------------------- /include/input/InputDisabled.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | /* 3 | * InputDisabled.h - Do Nothing input driver 4 | * 5 | * Project: ESPixelStick - An ESP8266 / ESP32 and E1.31 based pixel driver 6 | * Copyright (c) 2015, 2025 Shelby Merrick 7 | * http://www.forkineye.com 8 | * 9 | * This program is provided free for you to use in any way that you wish, 10 | * subject to the laws and regulations where you are using it. Due diligence 11 | * is strongly suggested before using this code. Please give credit where due. 12 | * 13 | * The Author makes no warranty of any kind, express or implied, with regard 14 | * to this program or the documentation contained in this document. The 15 | * Author shall not be liable in any event for incidental or consequential 16 | * damages in connection with, or arising out of, the furnishing, performance 17 | * or use of these programs. 18 | * 19 | * This is a derived class that converts data in the Input buffer into 20 | * pixel intensities and then transmits them through the configured serial 21 | * interface. 22 | * 23 | */ 24 | 25 | #include "InputCommon.hpp" 26 | 27 | class c_InputDisabled : public c_InputCommon 28 | { 29 | public: 30 | // These functions are inherited from c_InputCommon 31 | c_InputDisabled (c_InputMgr::e_InputChannelIds NewInputChannelId, 32 | c_InputMgr::e_InputType NewChannelType, 33 | uint32_t BufferSize); 34 | virtual ~c_InputDisabled (); 35 | 36 | // functions to be provided by the derived class 37 | void Begin (); ///< set up the operating environment based on the current config (or defaults) 38 | bool SetConfig (JsonObject & jsonConfig); ///< Set a new config in the driver 39 | void GetConfig (JsonObject & jsonConfig); ///< Get the current config used by the driver 40 | void GetStatus (JsonObject & jsonStatus); 41 | void Process (); 42 | void GetDriverName (String& sDriverName) { sDriverName = "Disabled"; } ///< get the name for the instantiated driver 43 | void SetBufferInfo (uint32_t BufferSize) {} 44 | 45 | private: 46 | 47 | }; // c_InputDisabled 48 | -------------------------------------------------------------------------------- /include/input/InputFPPRemotePlayEffect.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | /* 3 | * InputFPPRemotePlayEffect.hpp 4 | * 5 | * Project: ESPixelStick - An ESP8266 / ESP32 and E1.31 based pixel driver 6 | * Copyright (c) 2021, 2025 Shelby Merrick 7 | * http://www.forkineye.com 8 | * 9 | * This program is provided free for you to use in any way that you wish, 10 | * subject to the laws and regulations where you are using it. Due diligence 11 | * is strongly suggested before using this code. Please give credit where due. 12 | * 13 | * The Author makes no warranty of any kind, express or implied, with regard 14 | * to this program or the documentation contained in this document. The 15 | * Author shall not be liable in any event for incidental or consequential 16 | * damages in connection with, or arising out of, the furnishing, performance 17 | * or use of these programs. 18 | * 19 | * PlayFile object used to parse and play an effect 20 | */ 21 | 22 | #include "ESPixelStick.h" 23 | #include "InputFPPRemotePlayItem.hpp" 24 | #include "InputFPPRemotePlayEffectFsm.hpp" 25 | #include "InputEffectEngine.hpp" 26 | 27 | class c_InputFPPRemotePlayEffect : public c_InputFPPRemotePlayItem 28 | { 29 | public: 30 | c_InputFPPRemotePlayEffect (c_InputMgr::e_InputChannelIds InputChannelId); 31 | virtual ~c_InputFPPRemotePlayEffect (); 32 | 33 | virtual void Start (String & FileName, float duration, uint32_t PlayCount); 34 | virtual void Stop (); 35 | virtual void Sync (String & FileName, float SecondsElapsed); 36 | virtual bool Poll (); 37 | virtual void GetStatus (JsonObject & jsonStatus); 38 | virtual bool IsIdle () { return (pCurrentFsmState == &fsm_PlayEffect_state_Idle_imp); } 39 | 40 | protected: 41 | 42 | friend class fsm_PlayEffect_state_Idle; 43 | friend class fsm_PlayEffect_state_PlayingEffect; 44 | friend class fsm_PlayEffect_state; 45 | 46 | fsm_PlayEffect_state_Idle fsm_PlayEffect_state_Idle_imp; 47 | fsm_PlayEffect_state_PlayingEffect fsm_PlayEffect_state_PlayingEffect_imp; 48 | 49 | fsm_PlayEffect_state* pCurrentFsmState = nullptr; 50 | FastTimer PlayEffectTimer; 51 | 52 | c_InputEffectEngine EffectsEngine; 53 | 54 | }; // c_InputFPPRemotePlayEffect 55 | -------------------------------------------------------------------------------- /include/memdebug.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | /* 4 | // Use GPIO16 / Wemos D0 for hardware debug triggering 5 | #define DEBUG_HW_PIN 16 6 | #define DEBUG_HW_SET digitalWrite(DEBUG_HW_PIN, HIGH) 7 | #define DEBUG_HW_CLEAR digitalWrite(DEBUG_HW_PIN, LOW) 8 | #define DEBUG_HW_START do {pinMode(DEBUG_HW_PIN, OUTPUT); DEBUG_HW_CLEAR;} while(0) 9 | #define DEBUG_HW_END do {DEBUG_HW_CLEAR; pinMode(DEBUG_HW_PIN, INPUT);} while(0) 10 | */ 11 | 12 | #ifndef LOG_PORT 13 | #define LOG_PORT Serial 14 | #endif // ndef LOG_PORT 15 | 16 | #define MYFILE String (__FILE__).substring(String (__FILE__).lastIndexOf ("\\") + 1) 17 | 18 | #define DEBUG_V(v) {LOG_PORT.println(String("------ ") + String(FPSTR(__func__) ) + ":" + MYFILE + ":" + String(__LINE__ ) + ": " + String(v) + String(" ------")); LOG_PORT.flush();} 19 | #define DEBUG_START DEBUG_V(F ("Start")) 20 | #define DEBUG_END DEBUG_V(F ("End")) 21 | -------------------------------------------------------------------------------- /include/network/NetworkMgr.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | /* 3 | * NetworkMgr.hpp - Input Management class 4 | * 5 | * Project: ESPixelStick - An ESP8266 / ESP32 and E1.31 based pixel driver 6 | * Copyright (c) 2021, 2022 Shelby Merrick 7 | * http://www.forkineye.com 8 | * 9 | * This program is provided free for you to use in any way that you wish, 10 | * subject to the laws and regulations where you are using it. Due diligence 11 | * is strongly suggested before using this code. Please give credit where due. 12 | * 13 | * The Author makes no warranty of any kind, express or implied, with regard 14 | * to this program or the documentation contained in this document. The 15 | * Author shall not be liable in any event for incidental or consequential 16 | * damages in connection with, or arising out of, the furnishing, performance 17 | * or use of these programs. 18 | * 19 | * This is a factory class used to manage the input channels. It creates and deletes 20 | * the input channel functionality as needed to support any new configurations 21 | * that get sent from from the WebPage. 22 | * 23 | */ 24 | 25 | #include "ESPixelStick.h" 26 | #include "WiFiDriver.hpp" 27 | #ifdef SUPPORT_ETHERNET 28 | # include "EthernetDriver.hpp" 29 | #endif // def SUPPORT_ETHERNET 30 | 31 | class c_NetworkMgr 32 | { 33 | public: 34 | c_NetworkMgr (); 35 | virtual ~c_NetworkMgr (); 36 | 37 | void Begin (); 38 | void GetConfig (JsonObject & json); 39 | void GetStatus (JsonObject & json); 40 | bool SetConfig (JsonObject & json); 41 | void Poll (); 42 | void GetDriverName (String & Name) { Name = "NetworkMgr"; } 43 | 44 | void SetWiFiIsConnected (bool newState); 45 | void SetEthernetIsConnected (bool newState); 46 | 47 | bool IsConnected () { return (IsWiFiConnected || IsEthernetConnected); } 48 | void GetHostname (String & name) { name = hostname; } 49 | IPAddress GetlocalIP (); 50 | 51 | private: 52 | bool Validate (); 53 | void AdvertiseNewState (); 54 | void SetWiFiEnable (); 55 | 56 | c_WiFiDriver WiFiDriver; 57 | #ifdef SUPPORT_ETHERNET 58 | c_EthernetDriver EthernetDriver; 59 | #endif // def SUPPORT_ETHERNET 60 | 61 | String hostname; 62 | bool HasBeenInitialized = false; 63 | bool IsWiFiConnected = false; 64 | bool IsEthernetConnected = false; 65 | bool PreviousState = false; 66 | bool AllowWiFiAndEthUpSimultaneously = true; 67 | 68 | }; // c_NetworkMgr 69 | 70 | extern c_NetworkMgr NetworkMgr; 71 | -------------------------------------------------------------------------------- /include/output/OutputAPA102Spi.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | /* 3 | * OutputAPA102Spi.h - APA102 driver code for ESPixelStick Spi Channel 4 | * 5 | * Project: ESPixelStick - An ESP8266 / ESP32 and E1.31 based pixel driver 6 | * Copyright (c) 2015, 2025 Shelby Merrick 7 | * http://www.forkineye.com 8 | * 9 | * This program is provided free for you to use in any way that you wish, 10 | * subject to the laws and regulations where you are using it. Due diligence 11 | * is strongly suggested before using this code. Please give credit where due. 12 | * 13 | * The Author makes no warranty of any kind, express or implied, with regard 14 | * to this program or the documentation contained in this document. The 15 | * Author shall not be liable in any event for incidental or consequential 16 | * damages in connection with, or arising out of, the furnishing, performance 17 | * or use of these programs. 18 | * 19 | * This is a derived class that converts data in the output buffer into 20 | * pixel intensities and then transmits them through the configured serial 21 | * interface. 22 | * 23 | */ 24 | 25 | #include "ESPixelStick.h" 26 | #if defined(SUPPORT_OutputType_APA102) && defined(SUPPORT_SPI_OUTPUT) 27 | 28 | #include "OutputAPA102.hpp" 29 | #include "OutputSpi.hpp" 30 | 31 | class c_OutputAPA102Spi : public c_OutputAPA102 32 | { 33 | public: 34 | // These functions are inherited from c_OutputCommon 35 | c_OutputAPA102Spi (c_OutputMgr::e_OutputChannelIds OutputChannelId, 36 | gpio_num_t outputGpio, 37 | uart_port_t uart, 38 | c_OutputMgr::e_OutputType outputType); 39 | virtual ~c_OutputAPA102Spi (); 40 | 41 | // functions to be provided by the derived class 42 | void Begin (); 43 | void GetConfig (ArduinoJson::JsonObject& jsonConfig); 44 | bool SetConfig (ArduinoJson::JsonObject& jsonConfig); ///< Set a new config in the driver 45 | uint32_t Poll (); ///< Call from loop (), renders output data 46 | #if defined(ARDUINO_ARCH_ESP32) 47 | bool RmtPoll () {return false;} 48 | #endif // defined(ARDUINO_ARCH_ESP32) 49 | 50 | private: 51 | 52 | c_OutputSpi Spi; 53 | 54 | }; // c_OutputAPA102Spi 55 | 56 | #endif // defined(SUPPORT_OutputType_APA102) && defined(SUPPORT_SPI_OUTPUT) 57 | -------------------------------------------------------------------------------- /include/output/OutputDisabled.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | /* 3 | * OutputDisabled.h - WS2811 driver code for ESPixelStick 4 | * 5 | * Project: ESPixelStick - An ESP8266 / ESP32 and E1.31 based pixel driver 6 | * Copyright (c) 2015, 2022 Shelby Merrick 7 | * http://www.forkineye.com 8 | * 9 | * This program is provided free for you to use in any way that you wish, 10 | * subject to the laws and regulations where you are using it. Due diligence 11 | * is strongly suggested before using this code. Please give credit where due. 12 | * 13 | * The Author makes no warranty of any kind, express or implied, with regard 14 | * to this program or the documentation contained in this document. The 15 | * Author shall not be liable in any event for incidental or consequential 16 | * damages in connection with, or arising out of, the furnishing, performance 17 | * or use of these programs. 18 | * 19 | * This is a derived class that converts data in the output buffer into 20 | * pixel intensities and then transmits them through the configured serial 21 | * interface. 22 | * 23 | */ 24 | 25 | #include "OutputCommon.hpp" 26 | 27 | class c_OutputDisabled : public c_OutputCommon 28 | { 29 | public: 30 | // These functions are inherited from c_OutputCommon 31 | c_OutputDisabled (c_OutputMgr::e_OutputChannelIds OutputChannelId, 32 | gpio_num_t outputGpio, 33 | uart_port_t uart, 34 | c_OutputMgr::e_OutputType outputType); 35 | virtual ~c_OutputDisabled (); 36 | 37 | // functions to be provided by the derived class 38 | void Begin (); ///< set up the operating environment based on the current config (or defaults) 39 | bool SetConfig (ArduinoJson::JsonObject & jsonConfig); ///< Set a new config in the driver 40 | void GetConfig (ArduinoJson::JsonObject & jsonConfig); ///< Get the current config used by the driver 41 | void GetStatus (ArduinoJson::JsonObject & jsonConfig) {} 42 | uint32_t Poll (); ///< Call from loop(), renders output data 43 | #ifdef ARDUINO_ARCH_ESP32 44 | bool RmtPoll () {return false;} 45 | #endif // def ARDUINO_ARCH_ESP32 46 | void GetDriverName (String & sDriverName) { sDriverName = CN_Disabled; } 47 | uint32_t GetNumOutputBufferBytesNeeded () { return 0; } 48 | uint32_t GetNumOutputBufferChannelsServiced () { return 0; } 49 | 50 | private: 51 | 52 | }; // c_OutputDisabled 53 | -------------------------------------------------------------------------------- /include/output/OutputGECEFrame.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | /* 3 | * OutputGECEFrame.h - GECE driver code for ESPixelStick 4 | * 5 | * Project: ESPixelStick - An ESP8266 / ESP32 and E1.31 based pixel driver 6 | * Copyright (c) 2015, 2022 Shelby Merrick 7 | * http://www.forkineye.com 8 | * 9 | * This program is provided free for you to use in any way that you wish, 10 | * subject to the laws and regulations where you are using it. Due diligence 11 | * is strongly suggested before using this code. Please give credit where due. 12 | * 13 | * The Author makes no warranty of any kind, express or implied, with regard 14 | * to this program or the documentation contained in this document. The 15 | * Author shall not be liable in any event for incidental or consequential 16 | * damages in connection with, or arising out of, the furnishing, performance 17 | * or use of these programs. 18 | * 19 | */ 20 | 21 | /* 22 | frame layout: 0x0AAIIBGR (26 bits) 23 | 24 | output looks like this: 25 | Start bit = High for 8us 26 | 26 data bits. 27 | Each data bit is 29/31us 28 | 0 = 6 us low, 25 us high 29 | 1 = 23 us low, 6 us high 30 | stop bit = low for at least 45us 31 | */ 32 | 33 | #define GECE_ADDRESS_MASK 0x03F00000 34 | #define GECE_ADDRESS_SHIFT 20 35 | 36 | #define GECE_INTENSITY_MASK 0x000FF000 37 | #define GECE_INTENSITY_SHIFT 12 38 | 39 | #define GECE_BLUE_MASK 0x00000F00 40 | #define GECE_BLUE_SHIFT 8 41 | 42 | #define GECE_GREEN_MASK 0x000000F0 43 | #define GECE_GREEN_SHIFT 0 44 | 45 | #define GECE_RED_MASK 0x0000000F 46 | #define GECE_RED_SHIFT 4 47 | 48 | #define GECE_SET_ADDRESS(value) ((uint32_t(value) << GECE_ADDRESS_SHIFT) & GECE_ADDRESS_MASK) 49 | #define GECE_SET_BRIGHTNESS(value) ((uint32_t(value) << GECE_INTENSITY_SHIFT) & GECE_INTENSITY_MASK) 50 | #define GECE_SET_BLUE(value) ((uint32_t(value) << GECE_BLUE_SHIFT) & GECE_BLUE_MASK) 51 | #define GECE_SET_GREEN(value) ((uint32_t(value)) & GECE_GREEN_MASK) 52 | #define GECE_SET_RED(value) ((uint32_t(value) >> GECE_RED_SHIFT) & GECE_RED_MASK) 53 | -------------------------------------------------------------------------------- /include/output/OutputGECERmt.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | /* 3 | * OutputGECERmt.h - GECE driver code for ESPixelStick RMT Channel 4 | * 5 | * Project: ESPixelStick - An ESP8266 / ESP32 and E1.31 based pixel driver 6 | * Copyright (c) 2015, 2025 Shelby Merrick 7 | * http://www.forkineye.com 8 | * 9 | * This program is provided free for you to use in any way that you wish, 10 | * subject to the laws and regulations where you are using it. Due diligence 11 | * is strongly suggested before using this code. Please give credit where due. 12 | * 13 | * The Author makes no warranty of any kind, express or implied, with regard 14 | * to this program or the documentation contained in this document. The 15 | * Author shall not be liable in any event for incidental or consequential 16 | * damages in connection with, or arising out of, the furnishing, performance 17 | * or use of these programs. 18 | * 19 | * This is a derived class that converts data in the output buffer into 20 | * pixel intensities and then transmits them through the configured serial 21 | * interface. 22 | * 23 | */ 24 | #include "ESPixelStick.h" 25 | #if defined(SUPPORT_OutputType_GECE) && defined(ARDUINO_ARCH_ESP32) 26 | 27 | #include "OutputGECE.hpp" 28 | #include "OutputRmt.hpp" 29 | 30 | class c_OutputGECERmt : public c_OutputGECE 31 | { 32 | public: 33 | // These functions are inherited from c_OutputCommon 34 | c_OutputGECERmt (c_OutputMgr::e_OutputChannelIds OutputChannelId, 35 | gpio_num_t outputGpio, 36 | uart_port_t uart, 37 | c_OutputMgr::e_OutputType outputType); 38 | virtual ~c_OutputGECERmt (); 39 | 40 | // functions to be provided by the derived class 41 | void Begin (); ///< set up the operating environment based on the current config (or defaults) 42 | bool SetConfig (ArduinoJson::JsonObject& jsonConfig); ///< Set a new config in the driver 43 | uint32_t Poll (); ///< Call from loop (), renders output data 44 | #if defined(ARDUINO_ARCH_ESP32) 45 | bool RmtPoll (); 46 | #endif // defined(ARDUINO_ARCH_ESP32) 47 | void GetStatus (ArduinoJson::JsonObject& jsonStatus); 48 | void SetOutputBufferSize (uint32_t NumChannelsAvailable); 49 | void PauseOutput (bool State); 50 | 51 | private: 52 | 53 | c_OutputRmt Rmt; 54 | 55 | }; // c_OutputGECERmt 56 | 57 | #endif // defined(SUPPORT_OutputType_GECE) && defined(ARDUINO_ARCH_ESP32) 58 | -------------------------------------------------------------------------------- /include/output/OutputGS8208Rmt.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | /* 3 | * OutputGS8208Rmt.h - GS8208 driver code for ESPixelStick RMT Channel 4 | * 5 | * Project: ESPixelStick - An ESP8266 / ESP32 and E1.31 based pixel driver 6 | * Copyright (c) 2015, 2025 Shelby Merrick 7 | * http://www.forkineye.com 8 | * 9 | * This program is provided free for you to use in any way that you wish, 10 | * subject to the laws and regulations where you are using it. Due diligence 11 | * is strongly suggested before using this code. Please give credit where due. 12 | * 13 | * The Author makes no warranty of any kind, express or implied, with regard 14 | * to this program or the documentation contained in this document. The 15 | * Author shall not be liable in any event for incidental or consequential 16 | * damages in connection with, or arising out of, the furnishing, performance 17 | * or use of these programs. 18 | * 19 | * This is a derived class that converts data in the output buffer into 20 | * pixel intensities and then transmits them through the configured serial 21 | * interface. 22 | * 23 | */ 24 | #include "ESPixelStick.h" 25 | 26 | #if defined(SUPPORT_OutputType_GS8208) && defined(ARDUINO_ARCH_ESP32) 27 | 28 | #include "OutputGS8208.hpp" 29 | #include "OutputRmt.hpp" 30 | 31 | class c_OutputGS8208Rmt : public c_OutputGS8208 32 | { 33 | public: 34 | // These functions are inherited from c_OutputCommon 35 | c_OutputGS8208Rmt (c_OutputMgr::e_OutputChannelIds OutputChannelId, 36 | gpio_num_t outputGpio, 37 | uart_port_t uart, 38 | c_OutputMgr::e_OutputType outputType); 39 | virtual ~c_OutputGS8208Rmt (); 40 | 41 | // functions to be provided by the derived class 42 | void Begin (); ///< set up the operating environment based on the current config (or defaults) 43 | bool SetConfig (ArduinoJson::JsonObject& jsonConfig); ///< Set a new config in the driver 44 | uint32_t Poll (); ///< Call from loop (), renders output data 45 | #if defined(ARDUINO_ARCH_ESP32) 46 | bool RmtPoll (); 47 | #endif // defined(ARDUINO_ARCH_ESP32) 48 | void GetStatus (ArduinoJson::JsonObject& jsonStatus); 49 | void SetOutputBufferSize (uint32_t NumChannelsAvailable); 50 | void PauseOutput (bool State); 51 | 52 | private: 53 | 54 | c_OutputRmt Rmt; 55 | 56 | }; // c_OutputGS8208Rmt 57 | 58 | #endif // defined(SUPPORT_OutputType_GS8208) && defined(ARDUINO_ARCH_ESP32) 59 | -------------------------------------------------------------------------------- /include/output/OutputGS8208Uart.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | /* 3 | * OutputGS8208Uart.h - GS8208 driver code for ESPixelStick UART 4 | * 5 | * Project: ESPixelStick - An ESP8266 / ESP32 and E1.31 based pixel driver 6 | * Copyright (c) 2015, 2022 Shelby Merrick 7 | * http://www.forkineye.com 8 | * 9 | * This program is provided free for you to use in any way that you wish, 10 | * subject to the laws and regulations where you are using it. Due diligence 11 | * is strongly suggested before using this code. Please give credit where due. 12 | * 13 | * The Author makes no warranty of any kind, express or implied, with regard 14 | * to this program or the documentation contained in this document. The 15 | * Author shall not be liable in any event for incidental or consequential 16 | * damages in connection with, or arising out of, the furnishing, performance 17 | * or use of these programs. 18 | * 19 | * This is a derived class that converts data in the output buffer into 20 | * pixel intensities and then transmits them through the configured serial 21 | * interface. 22 | * 23 | */ 24 | 25 | #include "OutputCommon.hpp" 26 | 27 | #if defined(SUPPORT_OutputType_GS8208) 28 | 29 | #include "OutputGS8208.hpp" 30 | #include "OutputUart.hpp" 31 | 32 | class c_OutputGS8208Uart : public c_OutputGS8208 33 | { 34 | public: 35 | // These functions are inherited from c_OutputCommon 36 | c_OutputGS8208Uart (c_OutputMgr::e_OutputChannelIds OutputChannelId, 37 | gpio_num_t outputGpio, 38 | uart_port_t uart, 39 | c_OutputMgr::e_OutputType outputType); 40 | virtual ~c_OutputGS8208Uart (); 41 | 42 | // functions to be provided by the derived class 43 | void Begin (); ///< set up the operating environment based on the current config (or defaults) 44 | uint32_t Poll (); ///< Call from loop(), renders output data 45 | #if defined(ARDUINO_ARCH_ESP32) 46 | bool RmtPoll () {return false;} 47 | #endif // defined(ARDUINO_ARCH_ESP32) 48 | void PauseOutput (bool State); 49 | bool SetConfig (ArduinoJson::JsonObject& jsonConfig); 50 | void GetConfig (ArduinoJson::JsonObject& jsonConfig); 51 | void GetStatus (ArduinoJson::JsonObject& jsonStatus); 52 | 53 | #define GS8208_NUM_DATA_BYTES_PER_INTENSITY_BYTE 4 54 | 55 | private: 56 | c_OutputUart Uart; 57 | 58 | }; // c_OutputGS8208Uart 59 | 60 | #endif // defined(SUPPORT_OutputType_GS8208) 61 | -------------------------------------------------------------------------------- /include/output/OutputGrinchSpi.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | /* 3 | * OutputGrinchSpi.h - GRINCH driver code for ESPixelStick Spi Channel 4 | * 5 | * Project: ESPixelStick - An ESP8266 / ESP32 and E1.31 based pixel driver 6 | * Copyright (c) 2015, 2025 Shelby Merrick 7 | * http://www.forkineye.com 8 | * 9 | * This program is provided free for you to use in any way that you wish, 10 | * subject to the laws and regulations where you are using it. Due diligence 11 | * is strongly suggested before using this code. Please give credit where due. 12 | * 13 | * The Author makes no warranty of any kind, express or implied, with regard 14 | * to this program or the documentation contained in this document. The 15 | * Author shall not be liable in any event for incidental or consequential 16 | * damages in connection with, or arising out of, the furnishing, performance 17 | * or use of these programs. 18 | * 19 | * This is a derived class that converts data in the output buffer into 20 | * pixel intensities and then transmits them through the configured serial 21 | * interface. 22 | * 23 | */ 24 | #include "ESPixelStick.h" 25 | #if defined (SUPPORT_OutputType_GRINCH) && defined (SUPPORT_SPI_OUTPUT) 26 | 27 | #include "OutputGrinch.hpp" 28 | #include "OutputSpi.hpp" 29 | 30 | class c_OutputGrinchSpi : public c_OutputGrinch 31 | { 32 | public: 33 | // These functions are inherited from c_OutputCommon 34 | c_OutputGrinchSpi (c_OutputMgr::e_OutputChannelIds OutputChannelId, 35 | gpio_num_t outputGpio, 36 | uart_port_t uart, 37 | c_OutputMgr::e_OutputType outputType); 38 | virtual ~c_OutputGrinchSpi (); 39 | 40 | // functions to be provided by the derived class 41 | void Begin (); 42 | void GetConfig (ArduinoJson::JsonObject& jsonConfig); 43 | bool SetConfig (ArduinoJson::JsonObject& jsonConfig); ///< Set a new config in the driver 44 | uint32_t Poll (); ///< Call from loop(), renders output data 45 | #if defined(ARDUINO_ARCH_ESP32) 46 | bool RmtPoll () {return false;} 47 | #endif // defined(ARDUINO_ARCH_ESP32) 48 | 49 | private: 50 | 51 | c_OutputSpi Spi; 52 | 53 | }; // c_OutputGrinchSpi 54 | 55 | #endif // defined (SUPPORT_OutputType_GRINCH) && defined (SUPPORT_SPI_OUTPUT) 56 | -------------------------------------------------------------------------------- /include/output/OutputSerialRmt.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | /* 3 | * OutputSerialRmt.h - WS2811 driver code for ESPixelStick RMT Channel 4 | * 5 | * Project: ESPixelStick - An ESP8266 / ESP32 and E1.31 based pixel driver 6 | * Copyright (c) 2015, 2025 Shelby Merrick 7 | * http://www.forkineye.com 8 | * 9 | * This program is provided free for you to use in any way that you wish, 10 | * subject to the laws and regulations where you are using it. Due diligence 11 | * is strongly suggested before using this code. Please give credit where due. 12 | * 13 | * The Author makes no warranty of any kind, express or implied, with regard 14 | * to this program or the documentation contained in this document. The 15 | * Author shall not be liable in any event for incidental or consequential 16 | * damages in connection with, or arising out of, the furnishing, performance 17 | * or use of these programs. 18 | * 19 | * This is a derived class that converts data in the output buffer into 20 | * pixel intensities and then transmits them through the configured serial 21 | * interface. 22 | * 23 | */ 24 | #include "ESPixelStick.h" 25 | #if (defined(SUPPORT_OutputType_DMX) || defined(SUPPORT_OutputType_Serial) || defined(SUPPORT_OutputType_Renard)) && defined(ARDUINO_ARCH_ESP32) 26 | 27 | #include "OutputSerial.hpp" 28 | #include "OutputRmt.hpp" 29 | 30 | class c_OutputSerialRmt : public c_OutputSerial 31 | { 32 | public: 33 | // These functions are inherited from c_OutputCommon 34 | c_OutputSerialRmt (c_OutputMgr::e_OutputChannelIds OutputChannelId, 35 | gpio_num_t outputGpio, 36 | uart_port_t uart, 37 | c_OutputMgr::e_OutputType outputType); 38 | virtual ~c_OutputSerialRmt (); 39 | 40 | // functions to be provided by the derived class 41 | void Begin (); ///< set up the operating environment based on the current config (or defaults) 42 | bool SetConfig (ArduinoJson::JsonObject& jsonConfig); ///< Set a new config in the driver 43 | uint32_t Poll (); ///< Call from loop (), renders output data 44 | bool RmtPoll (); 45 | void GetStatus (ArduinoJson::JsonObject& jsonStatus); 46 | void SetOutputBufferSize (uint32_t NumChannelsAvailable); 47 | void PauseOutput(bool State); 48 | 49 | private: 50 | void SetUpRmtBitTimes(); 51 | 52 | c_OutputRmt Rmt; 53 | 54 | }; // c_OutputSerialRmt 55 | 56 | #endif // (defined(SUPPORT_OutputType_DMX) || defined(SUPPORT_OutputType_Serial) || defined(SUPPORT_OutputType_Renard)) && defined(ARDUINO_ARCH_ESP32) 57 | -------------------------------------------------------------------------------- /include/output/OutputTM1814Rmt.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | /* 3 | * OutputTM1814Rmt.h - TM1814 driver code for ESPixelStick RMT Channel 4 | * 5 | * Project: ESPixelStick - An ESP8266 / ESP32 and E1.31 based pixel driver 6 | * Copyright (c) 2015, 2024 Shelby Merrick 7 | * http://www.forkineye.com 8 | * 9 | * This program is provided free for you to use in any way that you wish, 10 | * subject to the laws and regulations where you are using it. Due diligence 11 | * is strongly suggested before using this code. Please give credit where due. 12 | * 13 | * The Author makes no warranty of any kind, express or implied, with regard 14 | * to this program or the documentation contained in this document. The 15 | * Author shall not be liable in any event for incidental or consequential 16 | * damages in connection with, or arising out of, the furnishing, performance 17 | * or use of these programs. 18 | * 19 | * This is a derived class that converts data in the output buffer into 20 | * pixel intensities and then transmits them through the configured serial 21 | * interface. 22 | * 23 | */ 24 | #include "ESPixelStick.h" 25 | #if defined (SUPPORT_OutputType_TM1814) && defined (ARDUINO_ARCH_ESP32) 26 | 27 | #include "OutputTM1814.hpp" 28 | #include "OutputRmt.hpp" 29 | 30 | class c_OutputTM1814Rmt : public c_OutputTM1814 31 | { 32 | public: 33 | // These functions are inherited from c_OutputCommon 34 | c_OutputTM1814Rmt (c_OutputMgr::e_OutputChannelIds OutputChannelId, 35 | gpio_num_t outputGpio, 36 | uart_port_t uart, 37 | c_OutputMgr::e_OutputType outputType); 38 | virtual ~c_OutputTM1814Rmt (); 39 | 40 | // functions to be provided by the derived class 41 | void Begin (); ///< set up the operating environment based on the current config (or defaults) 42 | bool SetConfig (ArduinoJson::JsonObject& jsonConfig); ///< Set a new config in the driver 43 | uint32_t Poll (); ///< Call from loop (), renders output data 44 | bool RmtPoll (); 45 | void GetStatus (ArduinoJson::JsonObject& jsonStatus); 46 | void SetOutputBufferSize (uint32_t NumChannelsAvailable); 47 | void PauseOutput(bool State); 48 | 49 | private: 50 | 51 | c_OutputRmt Rmt; 52 | 53 | }; // c_OutputTM1814Rmt 54 | 55 | #endif // defined (SUPPORT_OutputType_TM1814) && defined (ARDUINO_ARCH_ESP32) 56 | -------------------------------------------------------------------------------- /include/output/OutputUCS1903Rmt.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | /* 3 | * OutputUCS1903Rmt.h - UCS1903 driver code for ESPixelStick RMT Channel 4 | * 5 | * Project: ESPixelStick - An ESP8266 / ESP32 and E1.31 based pixel driver 6 | * Copyright (c) 2015, 2025 Shelby Merrick 7 | * http://www.forkineye.com 8 | * 9 | * This program is provided free for you to use in any way that you wish, 10 | * subject to the laws and regulations where you are using it. Due diligence 11 | * is strongly suggested before using this code. Please give credit where due. 12 | * 13 | * The Author makes no warranty of any kind, express or implied, with regard 14 | * to this program or the documentation contained in this document. The 15 | * Author shall not be liable in any event for incidental or consequential 16 | * damages in connection with, or arising out of, the furnishing, performance 17 | * or use of these programs. 18 | * 19 | * This is a derived class that converts data in the output buffer into 20 | * pixel intensities and then transmits them through the configured serial 21 | * interface. 22 | * 23 | */ 24 | #include "ESPixelStick.h" 25 | 26 | #if defined(SUPPORT_OutputType_UCS1903) && defined(ARDUINO_ARCH_ESP32) 27 | 28 | #include "OutputUCS1903.hpp" 29 | #include "OutputRmt.hpp" 30 | 31 | class c_OutputUCS1903Rmt : public c_OutputUCS1903 32 | { 33 | public: 34 | // These functions are inherited from c_OutputCommon 35 | c_OutputUCS1903Rmt (c_OutputMgr::e_OutputChannelIds OutputChannelId, 36 | gpio_num_t outputGpio, 37 | uart_port_t uart, 38 | c_OutputMgr::e_OutputType outputType); 39 | virtual ~c_OutputUCS1903Rmt (); 40 | 41 | // functions to be provided by the derived class 42 | void Begin (); ///< set up the operating environment based on the current config (or defaults) 43 | bool SetConfig (ArduinoJson::JsonObject& jsonConfig); ///< Set a new config in the driver 44 | uint32_t Poll (); ///< Call from loop (), renders output data 45 | bool RmtPoll (); 46 | void GetStatus (ArduinoJson::JsonObject& jsonStatus); 47 | void SetOutputBufferSize (uint32_t NumChannelsAvailable); 48 | void PauseOutput(bool State); 49 | 50 | private: 51 | 52 | c_OutputRmt Rmt; 53 | 54 | }; // c_OutputUCS1903Rmt 55 | 56 | #endif // defined(SUPPORT_OutputType_UCS1903) && defined(ARDUINO_ARCH_ESP32) 57 | -------------------------------------------------------------------------------- /include/output/OutputUCS1903Uart.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | /* 3 | * OutputUCS1903Uart.h - UCS1903 driver code for ESPixelStick UART 4 | * 5 | * Project: ESPixelStick - An ESP8266 / ESP32 and E1.31 based pixel driver 6 | * Copyright (c) 2015, 2022 Shelby Merrick 7 | * http://www.forkineye.com 8 | * 9 | * This program is provided free for you to use in any way that you wish, 10 | * subject to the laws and regulations where you are using it. Due diligence 11 | * is strongly suggested before using this code. Please give credit where due. 12 | * 13 | * The Author makes no warranty of any kind, express or implied, with regard 14 | * to this program or the documentation contained in this document. The 15 | * Author shall not be liable in any event for incidental or consequential 16 | * damages in connection with, or arising out of, the furnishing, performance 17 | * or use of these programs. 18 | * 19 | * This is a derived class that converts data in the output buffer into 20 | * pixel intensities and then transmits them through the configured serial 21 | * interface. 22 | * 23 | */ 24 | 25 | #include "OutputCommon.hpp" 26 | #if defined(SUPPORT_OutputType_UCS1903) 27 | 28 | #include "OutputUCS1903.hpp" 29 | #include "OutputUart.hpp" 30 | 31 | class c_OutputUCS1903Uart : public c_OutputUCS1903 32 | { 33 | public: 34 | // These functions are inherited from c_OutputCommon 35 | c_OutputUCS1903Uart (c_OutputMgr::e_OutputChannelIds OutputChannelId, 36 | gpio_num_t outputGpio, 37 | uart_port_t uart, 38 | c_OutputMgr::e_OutputType outputType); 39 | virtual ~c_OutputUCS1903Uart (); 40 | 41 | // functions to be provided by the derived class 42 | void Begin (); ///< set up the operating environment based on the current config (or defaults) 43 | uint32_t Poll (); ///< Call from loop(), renders output data 44 | #if defined(ARDUINO_ARCH_ESP32) 45 | bool RmtPoll () {return false;} 46 | #endif // defined(ARDUINO_ARCH_ESP32) 47 | void PauseOutput (bool State); 48 | bool SetConfig (ArduinoJson::JsonObject& jsonConfig); 49 | void GetConfig (ArduinoJson::JsonObject& jsonConfig); 50 | void GetStatus (ArduinoJson::JsonObject& jsonStatus); 51 | 52 | #define UCS1903_NUM_DATA_BYTES_PER_INTENSITY_BYTE 4 53 | 54 | private: 55 | bool validate (); ///< confirm that the current configuration is valid 56 | c_OutputUart Uart; 57 | 58 | }; // c_OutputUCS1903Uart 59 | 60 | #endif // defined(SUPPORT_OutputType_UCS1903) 61 | -------------------------------------------------------------------------------- /include/output/OutputUCS8903Rmt.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | /* 3 | * OutputUCS8903Rmt.h - UCS8903 driver code for ESPixelStick RMT Channel 4 | * 5 | * Project: ESPixelStick - An ESP8266 / ESP32 and E1.31 based pixel driver 6 | * Copyright (c) 2015 - 2025 Shelby Merrick 7 | * http://www.forkineye.com 8 | * 9 | * This program is provided free for you to use in any way that you wish, 10 | * subject to the laws and regulations where you are using it. Due diligence 11 | * is strongly suggested before using this code. Please give credit where due. 12 | * 13 | * The Author makes no warranty of any kind, express or implied, with regard 14 | * to this program or the documentation contained in this document. The 15 | * Author shall not be liable in any event for incidental or consequential 16 | * damages in connection with, or arising out of, the furnishing, performance 17 | * or use of these programs. 18 | * 19 | * This is a derived class that converts data in the output buffer into 20 | * pixel intensities and then transmits them through the configured serial 21 | * interface. 22 | * 23 | */ 24 | #include "ESPixelStick.h" 25 | #ifdef SUPPORT_OutputType_UCS8903 26 | #ifdef ARDUINO_ARCH_ESP32 27 | 28 | #include "OutputUCS8903.hpp" 29 | #include "OutputRmt.hpp" 30 | 31 | class c_OutputUCS8903Rmt : public c_OutputUCS8903 32 | { 33 | public: 34 | // These functions are inherited from c_OutputCommon 35 | c_OutputUCS8903Rmt (c_OutputMgr::e_OutputChannelIds OutputChannelId, 36 | gpio_num_t outputGpio, 37 | uart_port_t uart, 38 | c_OutputMgr::e_OutputType outputType); 39 | virtual ~c_OutputUCS8903Rmt (); 40 | 41 | // functions to be provided by the derived class 42 | void Begin (); ///< set up the operating environment based on the current config (or defaults) 43 | bool SetConfig (ArduinoJson::JsonObject& jsonConfig); ///< Set a new config in the driver 44 | uint32_t Poll (); ///< Call from loop (), renders output data 45 | bool RmtPoll (); 46 | void GetStatus (ArduinoJson::JsonObject& jsonStatus); 47 | void SetOutputBufferSize (uint32_t NumChannelsAvailable); 48 | void PauseOutput(bool State); 49 | 50 | private: 51 | 52 | c_OutputRmt Rmt; 53 | 54 | }; // c_OutputUCS8903Rmt 55 | 56 | #endif // def ARDUINO_ARCH_ESP32 57 | #endif // def SUPPORT_OutputType_UCS8903 58 | -------------------------------------------------------------------------------- /include/output/OutputUCS8903Uart.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | /* 3 | * OutputUCS8903Uart.h - UCS8903 driver code for ESPixelStick UART 4 | * 5 | * Project: ESPixelStick - An ESP8266 / ESP32 and E1.31 based pixel driver 6 | * Copyright (c) 2015 Shelby Merrick 7 | * http://www.forkineye.com 8 | * 9 | * This program is provided free for you to use in any way that you wish, 10 | * subject to the laws and regulations where you are using it. Due diligence 11 | * is strongly suggested before using this code. Please give credit where due. 12 | * 13 | * The Author makes no warranty of any kind, express or implied, with regard 14 | * to this program or the documentation contained in this document. The 15 | * Author shall not be liable in any event for incidental or consequential 16 | * damages in connection with, bor arising out of, the furnishing, performance 17 | * or use of these programs. 18 | * 19 | * This is a derived class that converts data in the output buffer into 20 | * pixel intensities and then transmits them through the configured serial 21 | * interface. 22 | * 23 | */ 24 | 25 | #include "OutputCommon.hpp" 26 | 27 | #if defined(SUPPORT_OutputType_UCS8903) 28 | 29 | #include "OutputUCS8903.hpp" 30 | #include "OutputUart.hpp" 31 | 32 | class c_OutputUCS8903Uart : public c_OutputUCS8903 33 | { 34 | public: 35 | // These functions are inherited from c_OutputCommon 36 | c_OutputUCS8903Uart (c_OutputMgr::e_OutputChannelIds OutputChannelId, 37 | gpio_num_t outputGpio, 38 | uart_port_t uart, 39 | c_OutputMgr::e_OutputType outputType); 40 | virtual ~c_OutputUCS8903Uart (); 41 | 42 | // functions to be provided by the derived class 43 | void Begin (); 44 | uint32_t Poll (); 45 | #if defined(ARDUINO_ARCH_ESP32) 46 | bool RmtPoll () {return false;} 47 | #endif // defined(ARDUINO_ARCH_ESP32) 48 | void PauseOutput (bool State); 49 | bool SetConfig (ArduinoJson::JsonObject& jsonConfig); 50 | void GetConfig (ArduinoJson::JsonObject& jsonConfig); 51 | void GetStatus (ArduinoJson::JsonObject& jsonStatus); 52 | 53 | private: 54 | c_OutputUart Uart; 55 | #ifdef UCS8903_UART_DEBUG_COUNTERS 56 | uint32_t NewFrameCounter = 0; 57 | uint32_t TimeSinceLastFrameMS = 0; 58 | uint32_t TimeLastFrameStartedMS = 0; 59 | #endif // def UCS8903_UART_DEBUG_COUNTERS 60 | 61 | }; // c_OutputUCS8903Uart 62 | 63 | #endif // defined(SUPPORT_OutputType_UCS8903) 64 | -------------------------------------------------------------------------------- /include/output/OutputWS2801.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | /* 3 | * OutputWS2801.h - WS2801 driver code for ESPixelStick 4 | * 5 | * Project: ESPixelStick - An ESP8266 / ESP32 and E1.31 based pixel driver 6 | * Copyright (c) 2015, 2022 Shelby Merrick 7 | * http://www.forkineye.com 8 | * 9 | * This program is provided free for you to use in any way that you wish, 10 | * subject to the laws and regulations where you are using it. Due diligence 11 | * is strongly suggested before using this code. Please give credit where due. 12 | * 13 | * The Author makes no warranty of any kind, express or implied, with regard 14 | * to this program or the documentation contained in this document. The 15 | * Author shall not be liable in any event for incidental or consequential 16 | * damages in connection with, or arising out of, the furnishing, performance 17 | * or use of these programs. 18 | * 19 | * This is a derived class that converts data in the output buffer into 20 | * pixel intensities and then transmits them through the configured serial 21 | * interface. 22 | * 23 | */ 24 | #include "OutputPixel.hpp" 25 | #ifdef SUPPORT_OutputType_WS2801 26 | 27 | class c_OutputWS2801 : public c_OutputPixel 28 | { 29 | public: 30 | // These functions are inherited from c_OutputCommon 31 | c_OutputWS2801 (c_OutputMgr::e_OutputChannelIds OutputChannelId, 32 | gpio_num_t outputGpio, 33 | uart_port_t uart, 34 | c_OutputMgr::e_OutputType outputType); 35 | virtual ~c_OutputWS2801 (); 36 | 37 | // functions to be provided by the derived class 38 | virtual bool SetConfig (ArduinoJson::JsonObject & jsonConfig); ///< Set a new config in the driver 39 | virtual void GetConfig (ArduinoJson::JsonObject & jsonConfig); ///< Get the current config used by the driver 40 | void GetDriverName (String & sDriverName) { sDriverName = CN_WS2801; } 41 | virtual void GetStatus (ArduinoJson::JsonObject & jsonStatus); 42 | virtual void SetOutputBufferSize (uint32_t NumChannelsAvailable); 43 | 44 | protected: 45 | #define WS2801_BIT_RATE (APB_CLK_FREQ/80) 46 | #define WS2801_BITS_PER_INTENSITY 8 47 | #define WS2801_MICRO_SEC_PER_INTENSITY int(((1.0/float(WS2801_BIT_RATE)) * WS2801_BITS_PER_INTENSITY)) 48 | #define WS2801_MIN_IDLE_TIME_US 500 49 | uint16_t BlockSize = 1; 50 | float BlockDelay = 0; 51 | 52 | }; // c_OutputWS2801 53 | #endif // def SUPPORT_OutputType_WS2801 54 | -------------------------------------------------------------------------------- /include/output/OutputWS2801Spi.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | /* 3 | * OutputWS2801Spi.h - WS2801 driver code for ESPixelStick Spi Channel 4 | * 5 | * Project: ESPixelStick - An ESP8266 / ESP32 and E1.31 based pixel driver 6 | * Copyright (c) 2015, 2025 Shelby Merrick 7 | * http://www.forkineye.com 8 | * 9 | * This program is provided free for you to use in any way that you wish, 10 | * subject to the laws and regulations where you are using it. Due diligence 11 | * is strongly suggested before using this code. Please give credit where due. 12 | * 13 | * The Author makes no warranty of any kind, express or implied, with regard 14 | * to this program or the documentation contained in this document. The 15 | * Author shall not be liable in any event for incidental or consequential 16 | * damages in connection with, or arising out of, the furnishing, performance 17 | * or use of these programs. 18 | * 19 | * This is a derived class that converts data in the output buffer into 20 | * pixel intensities and then transmits them through the configured serial 21 | * interface. 22 | * 23 | */ 24 | #include "ESPixelStick.h" 25 | #if defined (SUPPORT_OutputType_WS2801) && defined (SUPPORT_SPI_OUTPUT) 26 | 27 | #include "OutputWS2801.hpp" 28 | #include "OutputSpi.hpp" 29 | 30 | class c_OutputWS2801Spi : public c_OutputWS2801 31 | { 32 | public: 33 | // These functions are inherited from c_OutputCommon 34 | c_OutputWS2801Spi (c_OutputMgr::e_OutputChannelIds OutputChannelId, 35 | gpio_num_t outputGpio, 36 | uart_port_t uart, 37 | c_OutputMgr::e_OutputType outputType); 38 | virtual ~c_OutputWS2801Spi (); 39 | 40 | // functions to be provided by the derived class 41 | void Begin (); 42 | void GetConfig (ArduinoJson::JsonObject& jsonConfig); 43 | bool SetConfig (ArduinoJson::JsonObject& jsonConfig); ///< Set a new config in the driver 44 | uint32_t Poll (); ///< Call from loop(), renders output data 45 | #if defined(ARDUINO_ARCH_ESP32) 46 | bool RmtPoll () {return false;} 47 | #endif // defined(ARDUINO_ARCH_ESP32) 48 | 49 | private: 50 | 51 | c_OutputSpi Spi; 52 | 53 | }; // c_OutputWS2801Spi 54 | 55 | #endif // defined (SUPPORT_OutputType_WS2801) && defined (SUPPORT_SPI_OUTPUT) 56 | -------------------------------------------------------------------------------- /include/output/OutputWS2811Rmt.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | /* 3 | * OutputWS2811Rmt.h - WS2811 driver code for ESPixelStick RMT Channel 4 | * 5 | * Project: ESPixelStick - An ESP8266 / ESP32 and E1.31 based pixel driver 6 | * Copyright (c) 2015, 2025 Shelby Merrick 7 | * http://www.forkineye.com 8 | * 9 | * This program is provided free for you to use in any way that you wish, 10 | * subject to the laws and regulations where you are using it. Due diligence 11 | * is strongly suggested before using this code. Please give credit where due. 12 | * 13 | * The Author makes no warranty of any kind, express or implied, with regard 14 | * to this program or the documentation contained in this document. The 15 | * Author shall not be liable in any event for incidental or consequential 16 | * damages in connection with, or arising out of, the furnishing, performance 17 | * or use of these programs. 18 | * 19 | * This is a derived class that converts data in the output buffer into 20 | * pixel intensities and then transmits them through the configured serial 21 | * interface. 22 | * 23 | */ 24 | #include "ESPixelStick.h" 25 | #if defined(SUPPORT_OutputType_WS2811) && defined(ARDUINO_ARCH_ESP32) 26 | 27 | #include "OutputWS2811.hpp" 28 | #include "OutputRmt.hpp" 29 | 30 | class c_OutputWS2811Rmt : public c_OutputWS2811 31 | { 32 | public: 33 | // These functions are inherited from c_OutputCommon 34 | c_OutputWS2811Rmt (c_OutputMgr::e_OutputChannelIds OutputChannelId, 35 | gpio_num_t outputGpio, 36 | uart_port_t uart, 37 | c_OutputMgr::e_OutputType outputType); 38 | virtual ~c_OutputWS2811Rmt (); 39 | 40 | // functions to be provided by the derived class 41 | void Begin (); ///< set up the operating environment based on the current config (or defaults) 42 | bool SetConfig (ArduinoJson::JsonObject& jsonConfig); ///< Set a new config in the driver 43 | uint32_t Poll (); ///< Call from loop (), renders output data 44 | bool RmtPoll (); 45 | void GetStatus (ArduinoJson::JsonObject& jsonStatus); 46 | void SetOutputBufferSize (uint32_t NumChannelsAvailable); 47 | bool DriverIsSendingIntensityData() {return (Rmt.DriverIsSendingIntensityData() || false == canRefresh());} 48 | void PauseOutput(bool State); 49 | 50 | private: 51 | 52 | c_OutputRmt Rmt; 53 | 54 | }; // c_OutputWS2811Rmt 55 | 56 | #endif // defined(SUPPORT_OutputType_WS2811) && defined(ARDUINO_ARCH_ESP32) 57 | -------------------------------------------------------------------------------- /include/output/OutputWS2811Uart.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | /* 3 | * OutputWS2811Uart.h - WS2811 driver code for ESPixelStick UART 4 | * 5 | * Project: ESPixelStick - An ESP8266 / ESP32 and E1.31 based pixel driver 6 | * Copyright (c) 2015, 2022 Shelby Merrick 7 | * http://www.forkineye.com 8 | * 9 | * This program is provided free for you to use in any way that you wish, 10 | * subject to the laws and regulations where you are using it. Due diligence 11 | * is strongly suggested before using this code. Please give credit where due. 12 | * 13 | * The Author makes no warranty of any kind, express or implied, with regard 14 | * to this program or the documentation contained in this document. The 15 | * Author shall not be liable in any event for incidental or consequential 16 | * damages in connection with, or arising out of, the furnishing, performance 17 | * or use of these programs. 18 | * 19 | * This is a derived class that converts data in the output buffer into 20 | * pixel intensities and then transmits them through the configured serial 21 | * interface. 22 | * 23 | */ 24 | 25 | #include "ESPixelStick.h" 26 | #if defined(SUPPORT_OutputType_WS2811) 27 | 28 | #include "OutputWS2811.hpp" 29 | #include "OutputUart.hpp" 30 | 31 | class c_OutputWS2811Uart : public c_OutputWS2811 32 | { 33 | public: 34 | // These functions are inherited from c_OutputCommon 35 | c_OutputWS2811Uart (c_OutputMgr::e_OutputChannelIds OutputChannelId, 36 | gpio_num_t outputGpio, 37 | uart_port_t uart, 38 | c_OutputMgr::e_OutputType outputType); 39 | virtual ~c_OutputWS2811Uart (); 40 | 41 | // functions to be provided by the derived class 42 | void Begin (); ///< set up the operating environment based on the current config (or defaults) 43 | uint32_t Poll (); 44 | #if defined(ARDUINO_ARCH_ESP32) 45 | bool RmtPoll () {return false;} 46 | #endif // defined(ARDUINO_ARCH_ESP32) 47 | void PauseOutput (bool State); 48 | bool SetConfig (ArduinoJson::JsonObject& jsonConfig); 49 | void GetConfig (ArduinoJson::JsonObject& jsonConfig); 50 | void GetStatus (ArduinoJson::JsonObject& jsonStatus); 51 | 52 | #define WS2811_NUM_DATA_BYTES_PER_INTENSITY_BYTE 4 53 | 54 | private: 55 | c_OutputUart Uart; 56 | #ifdef WS2811_UART_DEBUG_COUNTERS 57 | uint32_t NewFrameCounter = 0; 58 | uint32_t TimeSinceLastFrameMS = 0; 59 | uint32_t TimeLastFrameStartedMS = 0; 60 | #endif // def WS2811_UART_DEBUG_COUNTERS 61 | 62 | }; // c_OutputWS2811Uart 63 | 64 | #endif // defined(SUPPORT_OutputType_WS2811) 65 | -------------------------------------------------------------------------------- /include/platforms/GPIO_Defs_ESP32_CAM.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | /* 3 | * GPIO_Defs_ESP32_CAM.hpp - Output Management class 4 | * 5 | * Project: ESPixelStick - An ESP8266 / ESP32 and E1.31 based pixel driver 6 | * Copyright (c) 2021 - 2022 Shelby Merrick 7 | * http://www.forkineye.com 8 | * 9 | * This program is provided free for you to use in any way that you wish, 10 | * subject to the laws and regulations where you are using it. Due diligence 11 | * is strongly suggested before using this code. Please give credit where due. 12 | * 13 | * The Author makes no warranty of any kind, express or implied, with regard 14 | * to this program or the documentation contained in this document. The 15 | * Author shall not be liable in any event for incidental or consequential 16 | * damages in connection with, or arising out of, the furnishing, performance 17 | * or use of these programs. 18 | * 19 | */ 20 | 21 | //Output Manager 22 | #define DEFAULT_RMT_0_GPIO gpio_num_t::GPIO_NUM_0 23 | #define DEFAULT_RMT_1_GPIO gpio_num_t::GPIO_NUM_1 24 | 25 | #define DEFAULT_RMT_2_GPIO gpio_num_t::GPIO_NUM_3 26 | #define DEFAULT_RMT_3_GPIO gpio_num_t::GPIO_NUM_16 27 | 28 | #define LED_FLASH_GPIO gpio_num_t::GPIO_NUM_4 29 | #define LED_FLASH_OFF LOW 30 | 31 | // #define DEFAULT_I2C_SDA gpio_num_t::GPIO_NUM_21 32 | // #define DEFAULT_I2C_SCL gpio_num_t::GPIO_NUM_22 33 | 34 | // File Manager 35 | // #define USE_MISO_PULLUP 36 | #define SUPPORT_SD 37 | #define SD_CARD_MISO_PIN gpio_num_t::GPIO_NUM_2 38 | #define SD_CARD_MOSI_PIN gpio_num_t::GPIO_NUM_15 39 | #define SD_CARD_CLK_PIN gpio_num_t::GPIO_NUM_14 40 | #define SD_CARD_CS_PIN gpio_num_t::GPIO_NUM_13 41 | 42 | // Output Types 43 | // Not Finished - #define SUPPORT_OutputType_TLS3001 44 | // #define SUPPORT_OutputType_APA102 // SPI 45 | #define SUPPORT_OutputType_DMX // UART / RMT 46 | #define SUPPORT_OutputType_GECE // UART / RMT 47 | #define SUPPORT_OutputType_GS8208 // UART / RMT 48 | #define SUPPORT_OutputType_Renard // UART / RMT 49 | #define SUPPORT_OutputType_Serial // UART / RMT 50 | #define SUPPORT_OutputType_TM1814 // UART / RMT 51 | #define SUPPORT_OutputType_UCS1903 // UART / RMT 52 | #define SUPPORT_OutputType_UCS8903 // UART / RMT 53 | // #define SUPPORT_OutputType_WS2801 // SPI 54 | #define SUPPORT_OutputType_WS2811 // UART / RMT 55 | #define SUPPORT_OutputType_Relay // GPIO 56 | // #define SUPPORT_OutputType_Servo_PCA9685 // I2C (default pins) 57 | -------------------------------------------------------------------------------- /include/platforms/GPIO_Defs_ESP32_KA_4.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | /* 3 | * GPIO_Defs_ESP32_KA_4.hpp - Output Management class 4 | * 5 | * Project: ESPixelStick - An ESP8266 / ESP32 and E1.31 based pixel driver 6 | * Copyright (c) 2024 Shelby Merrick 7 | * http://www.forkineye.com 8 | * 9 | * This program is provided free for you to use in any way that you wish, 10 | * subject to the laws and regulations where you are using it. Due diligence 11 | * is strongly suggested before using this code. Please give credit where due. 12 | * 13 | * The Author makes no warranty of any kind, express or implied, with regard 14 | * to this program or the documentation contained in this document. The 15 | * Author shall not be liable in any event for incidental or consequential 16 | * damages in connection with, or arising out of, the furnishing, performance 17 | * or use of these programs. 18 | * 19 | */ 20 | 21 | //Output Manager 22 | #define DEFAULT_RMT_0_GPIO gpio_num_t::GPIO_NUM_2 23 | #define DEFAULT_RMT_1_GPIO gpio_num_t::GPIO_NUM_4 24 | #define DEFAULT_RMT_2_GPIO gpio_num_t::GPIO_NUM_0 25 | #define DEFAULT_RMT_3_GPIO gpio_num_t::GPIO_NUM_16 26 | 27 | 28 | #define DEFAULT_I2C_SDA gpio_num_t::GPIO_NUM_21 29 | #define DEFAULT_I2C_SCL gpio_num_t::GPIO_NUM_22 30 | 31 | 32 | // File Manager 33 | #define SUPPORT_SD 34 | #define SD_CARD_MISO_PIN gpio_num_t::GPIO_NUM_19 35 | #define SD_CARD_MOSI_PIN gpio_num_t::GPIO_NUM_23 36 | #define SD_CARD_CLK_PIN gpio_num_t::GPIO_NUM_18 37 | #define SD_CARD_CS_PIN gpio_num_t::GPIO_NUM_5 38 | 39 | 40 | // Output Types 41 | // Not Finished - #define SUPPORT_OutputType_TLS3001 42 | //#define SUPPORT_OutputType_APA102 // SPI 43 | #define SUPPORT_OutputType_DMX // UART 44 | #define SUPPORT_OutputType_GECE // UART 45 | #define SUPPORT_OutputType_GS8208 // UART / RMT 46 | #define SUPPORT_OutputType_Renard // UART 47 | #define SUPPORT_OutputType_Serial // UART 48 | #define SUPPORT_OutputType_TM1814 // UART / RMT 49 | #define SUPPORT_OutputType_UCS1903 // UART / RMT 50 | #define SUPPORT_OutputType_UCS8903 // UART / RMT 51 | //#define SUPPORT_OutputType_WS2801 // SPI 52 | #define SUPPORT_OutputType_WS2811 // UART / RMT 53 | #define SUPPORT_OutputType_Relay // GPIO 54 | #define SUPPORT_OutputType_Servo_PCA9685 // I2C (default pins) -------------------------------------------------------------------------------- /include/platforms/GPIO_Defs_ESP32_QUINLED_UNO_ESPSV3.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | /* 3 | * GPIO_Defs_ESP32_QUINLED_UNO_ESPSV3.hpp - Output Management class 4 | * 5 | * Project: ESPixelStick - An ESP8266 / ESP32 and E1.31 based pixel driver 6 | * Copyright (c) 2021 - 2022 Shelby Merrick 7 | * http://www.forkineye.com 8 | * 9 | * This program is provided free for you to use in any way that you wish, 10 | * subject to the laws and regulations where you are using it. Due diligence 11 | * is strongly suggested before using this code. Please give credit where due. 12 | * 13 | * The Author makes no warranty of any kind, express or implied, with regard 14 | * to this program or the documentation contained in this document. The 15 | * Author shall not be liable in any event for incidental or consequential 16 | * damages in connection with, or arising out of, the furnishing, performance 17 | * or use of these programs. 18 | * 19 | */ 20 | 21 | //Output Manager 22 | #define DEFAULT_RMT_0_GPIO gpio_num_t::GPIO_NUM_16 23 | 24 | // File Manager - Defnitions must be present even if SD is not supported 25 | #define SUPPORT_SD 26 | #define SD_CARD_MISO_PIN gpio_num_t::GPIO_NUM_19 27 | #define SD_CARD_MOSI_PIN gpio_num_t::GPIO_NUM_23 28 | #define SD_CARD_CLK_PIN gpio_num_t::GPIO_NUM_18 29 | #define SD_CARD_CS_PIN gpio_num_t::GPIO_NUM_5 30 | 31 | // Output Types 32 | // Not Finished - #define SUPPORT_OutputType_TLS3001 33 | // #define SUPPORT_OutputType_APA102 // SPI 34 | #define SUPPORT_OutputType_DMX // UART / RMT 35 | #define SUPPORT_OutputType_GECE // UART / RMT 36 | #define SUPPORT_OutputType_GS8208 // UART / RMT 37 | #define SUPPORT_OutputType_Renard // UART / RMT 38 | #define SUPPORT_OutputType_Serial // UART / RMT 39 | #define SUPPORT_OutputType_TM1814 // UART / RMT 40 | #define SUPPORT_OutputType_UCS1903 // UART / RMT 41 | #define SUPPORT_OutputType_UCS8903 // UART / RMT 42 | // #define SUPPORT_OutputType_WS2801 // SPI 43 | #define SUPPORT_OutputType_WS2811 // UART / RMT 44 | // #define SUPPORT_OutputType_Relay // GPIO 45 | // #define SUPPORT_OutputType_Servo_PCA9685 // I2C (default pins) 46 | -------------------------------------------------------------------------------- /include/platforms/GPIO_Defs_ESP32_generic.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | /* 3 | * GPIO_Defs_ESP32_generic.hpp - Output Management class 4 | * 5 | * Project: ESPixelStick - An ESP8266 / ESP32 and E1.31 based pixel driver 6 | * Copyright (c) 2021 Shelby Merrick 7 | * http://www.forkineye.com 8 | * 9 | * This program is provided free for you to use in any way that you wish, 10 | * subject to the laws and regulations where you are using it. Due diligence 11 | * is strongly suggested before using this code. Please give credit where due. 12 | * 13 | * The Author makes no warranty of any kind, express or implied, with regard 14 | * to this program or the documentation contained in this document. The 15 | * Author shall not be liable in any event for incidental or consequential 16 | * damages in connection with, or arising out of, the furnishing, performance 17 | * or use of these programs. 18 | * 19 | */ 20 | #include "GPIO_Defs_ESP32_LoLin_D32_PRO.hpp" 21 | -------------------------------------------------------------------------------- /include/platforms/GPIO_Defs_ESP8266_D1_mini_lolinsd.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | /* 3 | * GPIO_Defs_ESP8266_D1_mini_lolinsd.hpp - Output Management class 4 | * 5 | * Project: ESPixelStick - An ESP8266 / ESP32 and E1.31 based pixel driver 6 | * Copyright (c) 2021 Shelby Merrick 7 | * http://www.forkineye.com 8 | * 9 | * This program is provided free for you to use in any way that you wish, 10 | * subject to the laws and regulations where you are using it. Due diligence 11 | * is strongly suggested before using this code. Please give credit where due. 12 | * 13 | * The Author makes no warranty of any kind, express or implied, with regard 14 | * to this program or the documentation contained in this document. The 15 | * Author shall not be liable in any event for incidental or consequential 16 | * damages in connection with, or arising out of, the furnishing, performance 17 | * or use of these programs. 18 | * 19 | */ 20 | 21 | //Output Manager 22 | #define DEFAULT_UART_1_GPIO gpio_num_t::GPIO_NUM_2 23 | 24 | // File Manager 25 | #define SUPPORT_SD 26 | #define SD_CARD_MISO_PIN gpio_num_t::GPIO_NUM_12 27 | #define SD_CARD_MOSI_PIN gpio_num_t::GPIO_NUM_13 28 | #define SD_CARD_CLK_PIN gpio_num_t::GPIO_NUM_14 29 | #define SD_CARD_CS_PIN gpio_num_t::GPIO_NUM_0 30 | 31 | // Output Types 32 | // Not Finished - #define SUPPORT_OutputType_TLS3001 33 | // #define SUPPORT_OutputType_APA102 // SPI 34 | #define SUPPORT_OutputType_DMX // UART / RMT 35 | #define SUPPORT_OutputType_GECE // UART 36 | // #define SUPPORT_OutputType_GS8208 // UART / RMT 37 | #define SUPPORT_OutputType_Renard // UART / RMT 38 | #define SUPPORT_OutputType_Serial // UART / RMT 39 | // #define SUPPORT_OutputType_TM1814 // UART / RMT 40 | // #define SUPPORT_OutputType_UCS1903 // UART / RMT 41 | // #define SUPPORT_OutputType_UCS8903 // UART / RMT 42 | // #define SUPPORT_OutputType_WS2801 // SPI 43 | #define SUPPORT_OutputType_WS2811 // UART / RMT 44 | #define SUPPORT_OutputType_Relay // GPIO 45 | // #define SUPPORT_OutputType_Servo_PCA9685 // I2C (default pins) 46 | -------------------------------------------------------------------------------- /include/platforms/GPIO_Defs_ESP8266_ESP01S.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | /* 3 | * GPIO_Defs_ESP8266_ESP01S.hpp - Output Management class 4 | * 5 | * Project: ESPixelStick - An ESP8266 / ESP32 and E1.31 based pixel driver 6 | * Copyright (c) 2021 Shelby Merrick 7 | * http://www.forkineye.com 8 | * 9 | * This program is provided free for you to use in any way that you wish, 10 | * subject to the laws and regulations where you are using it. Due diligence 11 | * is strongly suggested before using this code. Please give credit where due. 12 | * 13 | * The Author makes no warranty of any kind, express or implied, with regard 14 | * to this program or the documentation contained in this document. The 15 | * Author shall not be liable in any event for incidental or consequential 16 | * damages in connection with, or arising out of, the furnishing, performance 17 | * or use of these programs. 18 | * 19 | */ 20 | 21 | //Output Manager 22 | #define DEFAULT_UART_1_GPIO gpio_num_t::GPIO_NUM_2 23 | 24 | // File Manager 25 | #define SUPPORT_SD 26 | #define SD_CARD_MISO_PIN gpio_num_t::GPIO_NUM_12 27 | #define SD_CARD_MOSI_PIN gpio_num_t::GPIO_NUM_13 28 | #define SD_CARD_CLK_PIN gpio_num_t::GPIO_NUM_14 29 | #define SD_CARD_CS_PIN gpio_num_t::GPIO_NUM_15 30 | 31 | // Output Types 32 | // Not Finished - #define SUPPORT_OutputType_TLS3001 33 | // #define SUPPORT_OutputType_APA102 // SPI 34 | #define SUPPORT_OutputType_DMX // UART / RMT 35 | #define SUPPORT_OutputType_GECE // UART 36 | // #define SUPPORT_OutputType_GS8208 // UART / RMT 37 | #define SUPPORT_OutputType_Renard // UART / RMT 38 | #define SUPPORT_OutputType_Serial // UART / RMT 39 | // #define SUPPORT_OutputType_TM1814 // UART / RMT 40 | // #define SUPPORT_OutputType_UCS1903 // UART / RMT 41 | // #define SUPPORT_OutputType_UCS8903 // UART / RMT 42 | // #define SUPPORT_OutputType_WS2801 // SPI 43 | #define SUPPORT_OutputType_WS2811 // UART / RMT 44 | // #define SUPPORT_OutputType_Relay // GPIO 45 | // #define SUPPORT_OutputType_Servo_PCA9685 // I2C (default pins) 46 | -------------------------------------------------------------------------------- /include/platforms/GPIO_Defs_ESP8266_ESPS_V3.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | /* 3 | * GPIO_Defs_ESP8266_ESPS_V3.hpp - Output Management class 4 | * 5 | * Project: ESPixelStick - An ESP8266 / ESP32 and E1.31 based pixel driver 6 | * Copyright (c) 2021 Shelby Merrick 7 | * http://www.forkineye.com 8 | * 9 | * This program is provided free for you to use in any way that you wish, 10 | * subject to the laws and regulations where you are using it. Due diligence 11 | * is strongly suggested before using this code. Please give credit where due. 12 | * 13 | * The Author makes no warranty of any kind, express or implied, with regard 14 | * to this program or the documentation contained in this document. The 15 | * Author shall not be liable in any event for incidental or consequential 16 | * damages in connection with, or arising out of, the furnishing, performance 17 | * or use of these programs. 18 | * 19 | */ 20 | 21 | //Output Manager 22 | #define DEFAULT_UART_1_GPIO gpio_num_t::GPIO_NUM_2 23 | 24 | // File Manager 25 | #define SUPPORT_SD 26 | #define SD_CARD_MISO_PIN gpio_num_t::GPIO_NUM_12 27 | #define SD_CARD_MOSI_PIN gpio_num_t::GPIO_NUM_13 28 | #define SD_CARD_CLK_PIN gpio_num_t::GPIO_NUM_14 29 | #define SD_CARD_CS_PIN gpio_num_t::GPIO_NUM_15 30 | 31 | // Output Types 32 | // Not Finished - #define SUPPORT_OutputType_TLS3001 33 | // #define SUPPORT_OutputType_APA102 // SPI 34 | #define SUPPORT_OutputType_DMX // UART / RMT 35 | #define SUPPORT_OutputType_GECE // UART 36 | // #define SUPPORT_OutputType_GS8208 // UART / RMT 37 | #define SUPPORT_OutputType_Renard // UART / RMT 38 | #define SUPPORT_OutputType_Serial // UART / RMT 39 | // #define SUPPORT_OutputType_TM1814 // UART / RMT 40 | // #define SUPPORT_OutputType_UCS1903 // UART / RMT 41 | // #define SUPPORT_OutputType_UCS8903 // UART / RMT 42 | // #define SUPPORT_OutputType_WS2801 // SPI 43 | #define SUPPORT_OutputType_WS2811 // UART / RMT 44 | // #define SUPPORT_OutputType_Relay // GPIO 45 | // #define SUPPORT_OutputType_Servo_PCA9685 // I2C (default pins) 46 | -------------------------------------------------------------------------------- /include/platforms/GPIO_Defs_ESP8266_Generic.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | /* 3 | * GPIO_Defs_ESP8266_Generic.hpp - Output Management class 4 | * 5 | * Project: ESPixelStick - An ESP8266 / ESP32 and E1.31 based pixel driver 6 | * Copyright (c) 2021 Shelby Merrick 7 | * http://www.forkineye.com 8 | * 9 | * This program is provided free for you to use in any way that you wish, 10 | * subject to the laws and regulations where you are using it. Due diligence 11 | * is strongly suggested before using this code. Please give credit where due. 12 | * 13 | * The Author makes no warranty of any kind, express or implied, with regard 14 | * to this program or the documentation contained in this document. The 15 | * Author shall not be liable in any event for incidental or consequential 16 | * damages in connection with, or arising out of, the furnishing, performance 17 | * or use of these programs. 18 | * 19 | */ 20 | 21 | //Output Manager 22 | #define DEFAULT_UART_1_GPIO gpio_num_t::GPIO_NUM_2 23 | 24 | // File Manager 25 | #define SUPPORT_SD 26 | #define SD_CARD_MISO_PIN gpio_num_t::GPIO_NUM_12 27 | #define SD_CARD_MOSI_PIN gpio_num_t::GPIO_NUM_13 28 | #define SD_CARD_CLK_PIN gpio_num_t::GPIO_NUM_14 29 | #define SD_CARD_CS_PIN gpio_num_t::GPIO_NUM_15 30 | 31 | // Output Types 32 | // Not Finished - #define SUPPORT_OutputType_TLS3001 33 | // #define SUPPORT_OutputType_APA102 // SPI 34 | #define SUPPORT_OutputType_DMX // UART / RMT 35 | #define SUPPORT_OutputType_GECE // UART 36 | // #define SUPPORT_OutputType_GS8208 // UART / RMT 37 | #define SUPPORT_OutputType_Renard // UART / RMT 38 | #define SUPPORT_OutputType_Serial // UART / RMT 39 | // #define SUPPORT_OutputType_TM1814 // UART / RMT 40 | // #define SUPPORT_OutputType_UCS1903 // UART / RMT 41 | // #define SUPPORT_OutputType_UCS8903 // UART / RMT 42 | // #define SUPPORT_OutputType_WS2801 // SPI 43 | #define SUPPORT_OutputType_WS2811 // UART / RMT 44 | #define SUPPORT_OutputType_Relay // GPIO 45 | // #define SUPPORT_OutputType_Servo_PCA9685 // I2C (default pins) 46 | -------------------------------------------------------------------------------- /include/service/SensorDS18B20.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | /* 3 | * c_SensorDS18B20.h 4 | * 5 | * Project: ESPixelStick - An ESP8266 / ESP32 and E1.31 based pixel driver 6 | * Copyright (c) 2018, 2024 Shelby Merrick 7 | * http://www.forkineye.com 8 | * 9 | * This program is provided free for you to use in any way that you wish, 10 | * subject to the laws and regulations where you are using it. Due diligence 11 | * is strongly suggested before using this code. Please give credit where due. 12 | * 13 | * The Author makes no warranty of any kind, express or implied, with regard 14 | * to this program or the documentation contained in this document. The 15 | * Author shall not be liable in any event for incidental or consequential 16 | * damages in connection with, or arising out of, the furnishing, performance 17 | * or use of these programs. 18 | * 19 | */ 20 | 21 | #include "ESPixelStick.h" 22 | 23 | #ifdef SUPPORT_SENSOR_DS18B20 24 | 25 | #ifdef ESP32 26 | # include 27 | # include 28 | #else 29 | # error Platform not supported 30 | #endif 31 | 32 | class c_SensorDS18B20 33 | { 34 | private: 35 | enum TempUnit_t 36 | { 37 | TempUnitCentegrade = 0, 38 | TempUnitFahrenheit, 39 | }; 40 | TempUnit_t TempUnit = TempUnit_t::TempUnitCentegrade; 41 | uint8_t SensorPresent = 0; 42 | time_t LastReadingTime = 0; 43 | float LastReading = 0.0; 44 | 45 | public: 46 | c_SensorDS18B20 () {}; 47 | virtual ~c_SensorDS18B20() {} 48 | 49 | void Begin (); 50 | void Poll (); 51 | void GetConfig (JsonObject& json); 52 | bool SetConfig (JsonObject& json); 53 | void GetStatus (JsonObject& json); 54 | 55 | void GetDriverName (String & name) {name = "TempSensor";} 56 | }; 57 | 58 | extern c_SensorDS18B20 SensorDS18B20; 59 | #endif // def SUPPORT_SENSOR_DS18B20 60 | -------------------------------------------------------------------------------- /include/utility/backported.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | 4 | 5 | // ESP32 defines various types and functions that are missing on ESP8266. 6 | // Backport missing types / macros to allow simpler source management. 7 | 8 | #if defined(ARDUINO_ARCH_ESP32) 9 | # include "esp_err.h" 10 | #elif defined(ARDUINO_ARCH_ESP8266) 11 | 12 | #ifdef __cplusplus 13 | extern "C" { 14 | #endif 15 | 16 | typedef int esp_err_t; // currently only need two defined status: OK & FAIL 17 | #define ESP_OK 0 18 | #define ESP_FAIL -1 19 | 20 | #ifdef DEBUG_ESP_PORT 21 | #define LOG_ERROR_MSG(...) DEBUG_ESP_PORT.printf( __VA_ARGS__ ) 22 | #else 23 | #define LOG_ERROR_MSG(...) 24 | #endif 25 | 26 | #ifndef likely 27 | #define likely(x) __builtin_expect(!!(x), 1) 28 | #endif 29 | #ifndef unlikely 30 | #define unlikely(x) __builtin_expect(!!(x), 0) 31 | #endif 32 | 33 | #if defined(NDEBUG) 34 | #define ESP_ERROR_CHECK(x) \ 35 | do { \ 36 | esp_err_t err_rc_ = (x); \ 37 | (void) sizeof(err_rc_); \ 38 | } while(0) 39 | #elif defined(CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT) 40 | #define ESP_ERROR_CHECK(x) \ 41 | do { \ 42 | esp_err_t err_rc_ = (x); \ 43 | if (unlikely(err_rc_ != ESP_OK)) { \ 44 | abort(); \ 45 | } \ 46 | } while(0) 47 | #else 48 | #define ESP_ERROR_CHECK(x) \ 49 | do { \ 50 | esp_err_t err_rc_ = (x); \ 51 | if (unlikely(err_rc_ != ESP_OK)) { \ 52 | LOG_ERROR_MSG("err: esp_err_t = %d", rc); \ 53 | assert(0 && #x); \ 54 | } \ 55 | } while(0); 56 | 57 | #endif 58 | 59 | 60 | 61 | 62 | 63 | #ifdef __cplusplus 64 | } 65 | #endif 66 | 67 | #else 68 | # error "Unsupported CPU type" 69 | #endif 70 | 71 | 72 | -------------------------------------------------------------------------------- /jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "target": "es2016", 5 | "jsx": "preserve", 6 | "checkJs": true 7 | }, 8 | "exclude": [ 9 | "node_modules", 10 | "**/node_modules/*" 11 | ] 12 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "espixelstick", 3 | "version": "1.0.0", 4 | "description": "Gulp based build system for ESPixelStick web files", 5 | "main": "gulpfile.mjs", 6 | "type": "module", 7 | "scripts": { 8 | "test": "echo \"Error: no test specified\" && exit 1" 9 | }, 10 | "repository": { 11 | "type": "git", 12 | "url": "git+https://github.com/forkineye/ESPixelStick.git" 13 | }, 14 | "author": "", 15 | "license": "ISC", 16 | "bugs": { 17 | "url": "https://github.com/forkineye/ESPixelStick/issues" 18 | }, 19 | "homepage": "https://github.com/forkineye/ESPixelStick#readme", 20 | "devDependencies": { 21 | "del": "^7.1.0", 22 | "eslint": "^8.56.0", 23 | "gulp": "^4.0.2", 24 | "gulp-clean-css": "^4.3.0", 25 | "gulp-concat": "^2.6.1", 26 | "gulp-gzip": "^1.4.2", 27 | "gulp-htmlmin": "^5.0.1", 28 | "gulp-markdown-github-style": "^1.1.1", 29 | "gulp-plumber": "^1.2.1", 30 | "gulp-rename": "^2.0.0", 31 | "gulp-terser": "^2.1.0", 32 | "gulp-using": "^0.1.1" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /platformio_user.ini.sample: -------------------------------------------------------------------------------- 1 | ;~~PlatformIO local user configuration 2 | ; Copy this file to platformio_user.ini and edit for your local config 3 | ; 4 | ;~~ Serial Port Configuration 5 | ; 'monitor_port' and 'upload_port' need to be defined. 6 | ; For ESPixelStick, these ports will be the same. 7 | ; 8 | ; The [env] section is top level and will be used for all devices 9 | ; and environments. If you have only one device, you can define 10 | ; the port here, or do nothing at all and PlatformIO will attempt 11 | ; to auto-detect it. 12 | ; 13 | ; If you have multiple devices, you can define global [esp8266] 14 | ; or [esp32] specific ports. If you want to target a specific 15 | ; build environment, you can do that as well. A list of all 16 | ; [env:] targets is defined in platformio.ini. 17 | ; 18 | ;~~ Optional configuration 19 | ; Configurations defined here will override platformio.ini 20 | ; https://docs.platformio.org/page/projectconf.html 21 | ; 22 | ; [esp8266] and [esp32] sections are inherited into [env:] targets: 23 | ; https://docs.platformio.org/en/latest/projectconf/section_env.html 24 | ; 25 | 26 | ;[platformio] 27 | ;default_envs = espsv3 28 | 29 | ;[env] 30 | ;build_type = debug 31 | ;monitor_port = COM3 32 | ;upload_port = COM3 33 | ;build_flags = 34 | ; -D SECRETS_SSID="DEFAULT_SSID_NOT_SET" 35 | ; -D SECRETS_PASS="DEFAULT_PASSPHRASE_NOT_SET" 36 | 37 | ;[esp8266] 38 | ;monitor_port = COM4 39 | ;upload_port = COM4 40 | 41 | ;[esp32] 42 | ;monitor_port = COM5 43 | ;upload_port = COM5 44 | 45 | ;[env:espsv3] 46 | ;monitor_port = COM6 47 | ;upload_port = COM6 -------------------------------------------------------------------------------- /src/input/InputCommon.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * InputCommon.cpp - Input Interface base class 3 | * 4 | * Project: ESPixelStick - An ESP8266 / ESP32 and E1.31 based pixel driver 5 | * Copyright (c) 2021, 2022 Shelby Merrick 6 | * http://www.forkineye.com 7 | * 8 | * This program is provided free for you to use in any way that you wish, 9 | * subject to the laws and regulations where you are using it. Due diligence 10 | * is strongly suggested before using this code. Please give credit where due. 11 | * 12 | * The Author makes no warranty of any kind, express or implied, with regard 13 | * to this program or the documentation contained in this document. The 14 | * Author shall not be liable in any event for incidental or consequential 15 | * damages in connection with, or arising out of, the furnishing, performance 16 | * or use of these programs. 17 | * 18 | * This is an Interface base class used to manage the Input port. It provides 19 | * a common API for use by the factory class to manage the object. 20 | * 21 | */ 22 | 23 | #include "ESPixelStick.h" 24 | #include "input/InputCommon.hpp" 25 | 26 | //------------------------------------------------------------------------------- 27 | ///< Start up the driver and put it into a safe mode 28 | c_InputCommon::c_InputCommon (c_InputMgr::e_InputChannelIds NewInputChannelId, 29 | c_InputMgr::e_InputType NewChannelType, 30 | uint32_t BufferSize) : 31 | InputDataBufferSize(BufferSize), 32 | InputChannelId(NewInputChannelId), 33 | ChannelType(NewChannelType) 34 | { 35 | } // c_InputMgr 36 | 37 | //------------------------------------------------------------------------------- 38 | // deallocate any resources and put the Input channels into a safe state 39 | c_InputCommon::~c_InputCommon () 40 | { 41 | // DEBUG_START; 42 | 43 | OutputMgr.ClearBuffer (); 44 | 45 | // DEBUG_END; 46 | 47 | } // ~c_InputMgr 48 | -------------------------------------------------------------------------------- /src/input/InputFPPRemotePlayItem.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * InputFPPRemotePlayItem.cpp 3 | * 4 | * Project: ESPixelStick - An ESP8266 / ESP32 and E1.31 based pixel driver 5 | * Copyright (c) 2021, 2025 Shelby Merrick 6 | * http://www.forkineye.com 7 | * 8 | * This program is provided free for you to use in any way that you wish, 9 | * subject to the laws and regulations where you are using it. Due diligence 10 | * is strongly suggested before using this code. Please give credit where due. 11 | * 12 | * The Author makes no warranty of any kind, express or implied, with regard 13 | * to this program or the documentation contained in this document. The 14 | * Author shall not be liable in any event for incidental or consequential 15 | * damages in connection with, or arising out of, the furnishing, performance 16 | * or use of these programs. 17 | * 18 | * Common Play object use to parse and play a play list or file 19 | */ 20 | 21 | #include "input/InputFPPRemotePlayItem.hpp" 22 | #include 23 | 24 | byte *LocalIntensityBuffer = nullptr; 25 | 26 | //----------------------------------------------------------------------------- 27 | c_InputFPPRemotePlayItem::c_InputFPPRemotePlayItem (c_InputMgr::e_InputChannelIds _InputChannelId) 28 | { 29 | // DEBUG_START; 30 | 31 | InputChannelId = _InputChannelId; 32 | 33 | // DEBUG_END; 34 | } // c_InputFPPRemotePlayItem 35 | 36 | //----------------------------------------------------------------------------- 37 | c_InputFPPRemotePlayItem::~c_InputFPPRemotePlayItem () 38 | { 39 | 40 | } // ~c_InputFPPRemotePlayItem 41 | 42 | //----------------------------------------------------------------------------- 43 | void c_InputFPPRemotePlayItem::ClearFileNames() 44 | { 45 | // DEBUG_START; 46 | 47 | BackgroundFileName = emptyString; 48 | FileControl[NextFile].FileName = emptyString; 49 | 50 | // DEBUG_END; 51 | } // ClearFileNames 52 | -------------------------------------------------------------------------------- /tools/README.md: -------------------------------------------------------------------------------- 1 | # ESPixelStick Tools 2 | 3 | These are tools / scripts to assist with the troublehsooting and analysis of blinky flashy stuff which may pertain to this project. 4 | 5 | - ```fseqinfo.py``` - Python script to dump header information from FSEQ files. ```fseqinfo.py -h``` for usage. 6 | --------------------------------------------------------------------------------