-
Notifications
You must be signed in to change notification settings - Fork 491
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #774 from pimoroni/breakout_encoder_wheel
Support for RGB Encoder Wheel Breakout
- Loading branch information
Showing
47 changed files
with
3,727 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
add_subdirectory(buttons) | ||
add_subdirectory(chase_game) | ||
add_subdirectory(clock) | ||
add_subdirectory(colour_picker) | ||
add_subdirectory(encoder) | ||
add_subdirectory(gpio_pwm) | ||
add_subdirectory(interrupt) | ||
add_subdirectory(led_rainbow) | ||
add_subdirectory(stop_watch) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
# RGB Encoder Wheel Breakout Examples (C++) <!-- omit in toc --> | ||
|
||
- [Function Examples](#function-examples) | ||
- [Buttons](#buttons) | ||
- [Encoder](#encoder) | ||
- [Interrupt](#interrupt) | ||
- [LED Examples](#led-examples) | ||
- [LED Rainbow](#led-rainbow) | ||
- [Clock](#clock) | ||
- [Interactive Examples](#interactive-examples) | ||
- [Colour Picker](#colour-picker) | ||
- [Stop Watch](#stop-watch) | ||
- [Chase Game](#chase-game) | ||
- [GPIO Examples](#gpio-examples) | ||
- [GPIO PWM](#gpio-pwm) | ||
|
||
|
||
## Function Examples | ||
|
||
### Buttons | ||
[buttons/buttons.cpp](buttons/buttons.cpp) | ||
|
||
A demonstration of reading the 5 buttons on Encoder Wheel. | ||
|
||
|
||
### Encoder | ||
[encoder/encoder.cpp](encoder/encoder.cpp) | ||
|
||
A demonstration of reading the rotary dial of the Encoder Wheel breakout. | ||
|
||
|
||
### Interrupt | ||
[interrupt/interrupt.cpp](interrupt/interrupt.cpp) | ||
|
||
How to read the buttons and rotary dial of the Encoder Wheel breakout, only when an interrupt occurs. | ||
|
||
|
||
## LED Examples | ||
|
||
### LED Rainbow | ||
[led_rainbow/led_rainbow.cpp](led_rainbow/led_rainbow.cpp) | ||
|
||
Displays a rotating rainbow pattern on Encoder Wheel's LED ring. | ||
|
||
|
||
### Clock | ||
[clock/clock.cpp](clock/clock.cpp) | ||
|
||
Displays a 12 hour clock on Encoder Wheel's LED ring, getting time from the system. | ||
|
||
|
||
## Interactive Examples | ||
|
||
### Colour Picker | ||
[colour_picker/colour_picker.cpp](colour_picker/colour_picker.cpp) | ||
|
||
Create a colour wheel on the Encoder Wheel's LED ring, and use all functions of the wheel to interact with it. | ||
|
||
|
||
### Stop Watch | ||
[stop_watch/stop_watch.cpp](stop_watch/stop_watch.cpp) | ||
|
||
Display a circular stop-watch on the Encoder Wheel's LED ring. | ||
|
||
|
||
### Chase Game | ||
[chase_game/chase_game.cpp](chase_game/chase_game.cpp) | ||
|
||
A simple alignment game. Use Encoder Wheel's rotary dial to align the coloured band to the white goal. The closer to the goal, the greener your coloured band will be. When you reach the goal, the goal will move to a new random position. | ||
|
||
|
||
## GPIO Examples | ||
|
||
### GPIO PWM | ||
[gpio_pwm/gpio_pwm.cpp](gpio_pwm/gpio_pwm.cpp) | ||
|
||
Output a sine wave PWM sequence on the Encoder Wheel's side GPIO pins. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
set(OUTPUT_NAME encoderwheel_buttons) | ||
add_executable(${OUTPUT_NAME} buttons.cpp) | ||
|
||
# Pull in pico libraries that we need | ||
target_link_libraries(${OUTPUT_NAME} | ||
pico_stdlib | ||
breakout_encoder_wheel | ||
) | ||
|
||
# enable usb output | ||
pico_enable_stdio_usb(${OUTPUT_NAME} 1) | ||
|
||
pico_add_extra_outputs(${OUTPUT_NAME}) |
Oops, something went wrong.