Skip to content

Commit cacaebf

Browse files
committed
Add Adafruit ItsyBitsy rp2040
1 parent 9a32274 commit cacaebf

File tree

3 files changed

+48
-27
lines changed

3 files changed

+48
-27
lines changed

.github/workflows/push-master.yml

+41-20
Original file line numberDiff line numberDiff line change
@@ -34,78 +34,99 @@ jobs:
3434
if: (startsWith(github.event.ref, 'refs/tags') != true)
3535
with:
3636
path: |
37-
firmwares/*.uf2
37+
firmware/*.uf2
3838
3939
- uses: actions/upload-artifact@v3
4040
name: Upload artifacts (release)
4141
if: startsWith(github.ref, 'refs/tags/')
4242
with:
4343
name: firmware-release
4444
path: |
45-
firmwares/*.uf2
45+
firmware/*.uf2
4646
4747
- name: Build packages for Adafruit Feather RP2040 Scorpio (release-only)
4848
if: startsWith(github.ref, 'refs/tags/')
4949
shell: bash
5050
run: |
5151
cd build
5252
rm *.*
53-
rm ../firmwares/*
54-
echo "Neopixel is using GPIO16(OUTPUT_SPI_DATA_PIN) on output 0." > ../firmwares/Firmwares_for_Adafruit_Feather_RP2040_Scorpio.txt
55-
echo "SPI is using spi0 interface pins: GPIO19(OUTPUT_SPI_DATA_PIN) and GPIO18(OUTPUT_SPI_CLOCK_PIN) on output 3 and 2 respectively." >> ../firmwares/Firmwares_for_Adafruit_Feather_RP2040_Scorpio.txt
53+
rm ../firmware/*
54+
echo "Neopixel is using GPIO16(OUTPUT_DATA_PIN) on output 0." > ../firmware/Firmwares_for_Adafruit_Feather_RP2040_Scorpio.txt
55+
echo "SPI is using spi0 interface pins: GPIO19(OUTPUT_SPI_DATA_PIN) and GPIO18(OUTPUT_SPI_CLOCK_PIN) on output 3 and 2 respectively." >> ../firmware/Firmwares_for_Adafruit_Feather_RP2040_Scorpio.txt
5656
cmake -DOVERRIDE_DATA_PIN=16 -DOVERRIDE_SPI_DATA_PIN=19 -DOVERRIDE_SPI_CLOCK_PIN=18 -DCMAKE_BUILD_TYPE=Release ..
5757
cmake --build .
58-
zip -j ../firmwares/Adafruit_Feather_RP2040_Scorpio.zip ../firmwares/*
58+
zip -j ../firmware/Adafruit_Feather_RP2040_Scorpio.zip ../firmware/*
5959
6060
- uses: actions/upload-artifact@v3
61-
name: Upload artifacts (release)
61+
name: Upload artifacts (release Adafruit_Feather)
62+
if: startsWith(github.ref, 'refs/tags/')
63+
with:
64+
name: firmware-release
65+
path: |
66+
firmware/*.zip
67+
68+
- name: Build packages for Adafruit ItsyBitsy RP2040 (release-only)
69+
if: startsWith(github.ref, 'refs/tags/')
70+
shell: bash
71+
run: |
72+
cd build
73+
rm *.*
74+
rm ../firmware/*
75+
echo "Neopixel is using GPIO5(OUTPUT_DATA_PIN) on output 5." > ../firmware/Firmwares_for_Adafruit_ItsyBitsy_2040.txt
76+
cmake -DOVERRIDE_DATA_PIN=5 -DCMAKE_BUILD_TYPE=Release ..
77+
cmake --build .
78+
rm ../firmware/*_Spi.uf2
79+
zip -j ../firmware/Adafruit_ItsyBitsy_2040.zip ../firmware/*
80+
81+
- uses: actions/upload-artifact@v3
82+
name: Upload artifacts (release Adafruit_ItsyBitsy)
6283
if: startsWith(github.ref, 'refs/tags/')
6384
with:
6485
name: firmware-release
6586
path: |
66-
firmwares/*.zip
87+
firmware/*.zip
6788
6889
- name: Build packages for Pimoroni Plasma Stick 2040 W (release-only)
6990
if: startsWith(github.ref, 'refs/tags/')
7091
shell: bash
7192
run: |
7293
cd build
7394
rm *.*
74-
rm ../firmwares/*
75-
echo "Neopixel is using GPIO15(OUTPUT_SPI_DATA_PIN) on output PIXELS." > ../firmwares/Firmwares_for_Pimoroni_Plasma_Stick_2040_W.txt
95+
rm ../firmware/*
96+
echo "Neopixel is using GPIO15(OUTPUT_DATA_PIN) on output PIXELS." > ../firmware/Firmwares_for_Pimoroni_Plasma_Stick_2040_W.txt
7697
cmake -DOVERRIDE_DATA_PIN=15 -DCMAKE_BUILD_TYPE=Release ..
7798
cmake --build .
78-
rm ../firmwares/*_Spi.uf2
79-
zip -j ../firmwares/Pimoroni_Plasma_Stick_2040_W.zip ../firmwares/*
99+
rm ../firmware/*_Spi.uf2
100+
zip -j ../firmware/Pimoroni_Plasma_Stick_2040_W.zip ../firmware/*
80101
81102
- uses: actions/upload-artifact@v3
82-
name: Upload artifacts (release)
103+
name: Upload artifacts (release Pimoroni_Plasma_Stick_W)
83104
if: startsWith(github.ref, 'refs/tags/')
84105
with:
85106
name: firmware-release
86107
path: |
87-
firmwares/*.zip
108+
firmware/*.zip
88109
89110
- name: Build packages for Pimoroni Plasma 2040 (release-only)
90111
if: startsWith(github.ref, 'refs/tags/')
91112
shell: bash
92113
run: |
93114
cd build
94115
rm *.*
95-
rm ../firmwares/*
96-
echo "Neopixel is using GPIO15(OUTPUT_SPI_DATA_PIN) on output DA." > ../firmwares/Firmwares_for_Pimoroni_Plasma_2040.txt
97-
echo "SPI is using spi1 interface pins: GPIO15(OUTPUT_SPI_DATA_PIN) and GPIO14(OUTPUT_SPI_CLOCK_PIN) on output DA and CL respectively." >> ../firmwares/Firmwares_for_Pimoroni_Plasma_2040.txt
116+
rm ../firmware/*
117+
echo "Neopixel is using GPIO15(OUTPUT_DATA_PIN) on output DA." > ../firmware/Firmwares_for_Pimoroni_Plasma_2040.txt
118+
echo "SPI is using spi1 interface pins: GPIO15(OUTPUT_SPI_DATA_PIN) and GPIO14(OUTPUT_SPI_CLOCK_PIN) on output DA and CL respectively." >> ../firmware/Firmwares_for_Pimoroni_Plasma_2040.txt
98119
cmake -DOVERRIDE_DATA_PIN=15 -DOVERRIDE_SPI_INTERFACE=spi1 -DOVERRIDE_SPI_DATA_PIN=15 -DOVERRIDE_SPI_CLOCK_PIN=14 -DCMAKE_BUILD_TYPE=Release ..
99120
cmake --build .
100-
zip -j ../firmwares/Pimoroni_Plasma_2040.zip ../firmwares/*
121+
zip -j ../firmware/Pimoroni_Plasma_2040.zip ../firmware/*
101122
102123
- uses: actions/upload-artifact@v3
103-
name: Upload artifacts (release)
124+
name: Upload artifacts (release Pimoroni_Plasma)
104125
if: startsWith(github.ref, 'refs/tags/')
105126
with:
106127
name: firmware-release
107128
path: |
108-
firmwares/*.zip
129+
firmware/*.zip
109130
110131
################################
111132
###### Publish Releases ########

CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ pico_sdk_init()
4949
set(HyperSerialPicoCompanionLibs FreeRTOS-Kernel FreeRTOS-Kernel-Heap1 pico_stdlib pico_multicore hardware_pio hardware_dma hardware_spi)
5050
set(HyperSerialPicoCompanionIncludes ${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/sdk/config)
5151
file(MAKE_DIRECTORY ${CMAKE_SOURCE_DIR}/generated)
52-
file(MAKE_DIRECTORY ${CMAKE_SOURCE_DIR}/firmwares)
52+
file(MAKE_DIRECTORY ${CMAKE_SOURCE_DIR}/firmware)
5353

5454
if(NOT CMAKE_HOST_WIN32)
5555
string(ASCII 27 EscChar)
@@ -96,7 +96,7 @@ macro(HyperSerialPicoTarget HyperSerialPicoTargetName)
9696
pico_enable_stdio_uart(${HyperSerialPicoTargetName} 0)
9797
pico_generate_pio_header(${HyperSerialPicoTargetName} ${CMAKE_SOURCE_DIR}/pio/neopixel.pio OUTPUT_DIR ${CMAKE_SOURCE_DIR}/generated)
9898
pico_generate_pio_header(${HyperSerialPicoTargetName} ${CMAKE_SOURCE_DIR}/pio/neopixel_ws2812b.pio OUTPUT_DIR ${CMAKE_SOURCE_DIR}/generated)
99-
add_custom_command(TARGET ${HyperSerialPicoTargetName} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/${HyperSerialPicoTargetName}.uf2 ${CMAKE_SOURCE_DIR}/firmwares)
99+
add_custom_command(TARGET ${HyperSerialPicoTargetName} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/${HyperSerialPicoTargetName}.uf2 ${CMAKE_SOURCE_DIR}/firmware)
100100
endmacro()
101101

102102
# targets for different LED strips

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ Adalight serial port LED driver implementation for Raspberry Pi Pico RP2040.
55
<p align="center"><img src="https://user-images.githubusercontent.com/69086569/236885968-baab51ba-a54b-4072-9a2a-cf867f2edb4b.png" width="250" height="250"/><img src="https://user-images.githubusercontent.com/69086569/236885360-dce9cfd7-92a8-43c6-911f-649325ee8a96.png" width="250" height="250"/></p>
66

77
# Recommended boards with a built-in level shifter
8-
To ensure the LEDs will work properly with the Pico board, a 3.3V to 5V level shifter is needed. You can use an external one e.g. SN74AHCT125N or just buy a model of rp2040 that already has it built-in: Adafruit Feather RP2040 Scorpio (output: GPIO16-23), Pimoroni Plasma 2040 (GPIO14-15) or Pimoroni Plasma Stick 2040 W (GPIO15).
8+
To ensure the LEDs will work properly with the Pico board, a 3.3V to 5V level shifter is needed. You can use an external one e.g. SN74AHCT125N or just buy a model of rp2040 that already has it built-in: Adafruit Feather RP2040 Scorpio (output: GPIO16-23), Adafruit ItsyBitsy RP2040 (output: GPIO5), Pimoroni Plasma 2040 (GPIO14-15) or Pimoroni Plasma Stick 2040 W (GPIO15).
99

10-
<p align="center"><img src="https://user-images.githubusercontent.com/69086569/242393809-4e491159-76c7-4c1e-be0a-1f10cd5291f2.png" width="200" height="200"/><img src="https://user-images.githubusercontent.com/69086569/241395006-ee27175e-677b-4971-97bc-ed294eaa8f3b.png" width="200" height="200"/><img src="https://user-images.githubusercontent.com/69086569/241394387-f8193ed8-56d5-46c6-b406-911720aed605.png" width="200" height="200"/></p>
10+
<p align="center"><img src="https://user-images.githubusercontent.com/69086569/242393809-4e491159-76c7-4c1e-be0a-1f10cd5291f2.png" width="200" height="200"/><img src="https://github.com/awawa-dev/HyperSerialPico/assets/69086569/e7a2a945-be12-47b1-8e48-ffc1b11c5b2f.png" width="200" height="200"/><img src="https://user-images.githubusercontent.com/69086569/241395006-ee27175e-677b-4971-97bc-ed294eaa8f3b.png" width="200" height="200"/><img src="https://user-images.githubusercontent.com/69086569/241394387-f8193ed8-56d5-46c6-b406-911720aed605.png" width="200" height="200"/></p>
1111

1212
# Supported LED strips
1313
| LED strip / Device | Single lane | Multi-segment |
@@ -26,9 +26,9 @@ It's very easy and you don't need any special flasher.
2626
\
2727
For HyperHDR and generic rp2040 choose `HyperSerialPico_<type>.uf2` firmware where *type* is one of supported LEDs: sk6812 cold/neutral white, variants of ws2812 and apa102. \
2828
\
29-
Due to the often neglected issue of the required 5 volt logic necessary for the correct operation of the supported LEDs, we want to promote rp2040 boards with a built-in 3.3V to 5V level shifter and we provide firmwares compiled to their GPIO specifications. You can find these firmwares & short pin-out manuals in the archives: `Adafruit_Feather_RP2040_Scorpio.zip`, `Pimoroni_Plasma_2040.zip`, `Pimoroni_Plasma_Stick_2040_W.zip`. Also you can read about their specific GPIO output in the `Recommended boards with a built-in level shifter` section above. \
29+
Due to the often neglected issue of the required 5 volt logic necessary for the correct operation of the supported LEDs, we want to promote rp2040 boards with a built-in 3.3V to 5V level shifter and we provide firmware compiled to their GPIO specifications. You can find these firmware & short pin-out manuals in the archives: `Adafruit_Feather_RP2040_Scorpio.zip`, `Adafruit_ItsyBitsy_2040.zip`, `Pimoroni_Plasma_2040.zip`, `Pimoroni_Plasma_Stick_2040_W.zip`. Also you can read about their specific GPIO output in the `Recommended boards with a built-in level shifter` section above. \
3030
\
31-
If you are using an application other than HyperHDR, select the `classic_adalight.zip` archive, unzip it and select `classic_adalight_HyperSerialPico_<type>.uf2` firmware (note: do not use firmwares from this archive for HyperHDR, they do not support my AWA protocol extension, missing many options and are simply only backwards compatible with other applications).
31+
If you are using an application other than HyperHDR, select the `classic_adalight.zip` archive, unzip it and select `classic_adalight_HyperSerialPico_<type>.uf2` firmware (note: do not use firmware from this archive for HyperHDR, they do not support my AWA protocol extension, missing many options and are simply only backwards compatible with other applications).
3232

3333
3) Next put your Pico board into DFU mode:
3434
* If your Pico board has only one button (`boot`) then press & hold it and connect the board to the USB port. Then you can release the button.
@@ -53,7 +53,7 @@ rp2040 allows hardware SPI on corresponding pairs of pins:
5353
spi0 ⇒ Data/Clock: GPIO3/GPIO2, GPIO19/GPIO18, GPIO7/GPIO6
5454
spi1 ⇒ Data/Clock: GPIO11/GPIO10, GPI15/GPIO14, GPIO27/GPI26
5555

56-
Pinout can be changed, but you need to make changes to `CMakeList.txt` (e.g. `OUTPUT_DATA_PIN` / `OUTPUT_SPI_DATA_PIN` / `OUTPUT_SPI_CLOCK_PIN`) and recompile the project. Also multi-segment mode can be enabled in this file: `SECOND_SEGMENT_INDEX` option at the beginning and optionally `SECOND_SEGMENT_REVERSED`. Once compiled, the results can be found in the `firmwares` folder.
56+
Pinout can be changed, but you need to make changes to `CMakeList.txt` (e.g. `OUTPUT_DATA_PIN` / `OUTPUT_SPI_DATA_PIN` / `OUTPUT_SPI_CLOCK_PIN`) and recompile the project. Also multi-segment mode can be enabled in this file: `SECOND_SEGMENT_INDEX` option at the beginning and optionally `SECOND_SEGMENT_REVERSED`. Once compiled, the results can be found in the `firmware` folder.
5757

5858
Of course, you can also build your custom firmware completely online using Github Actions. The manual can be found on [wiki](https://github.com/awawa-dev/HyperSerialPico/wiki). Be sure to follow the steps in the correct order.
5959

0 commit comments

Comments
 (0)