Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
flow3r firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dos
flow3r firmware
Commits
06b0d3fe
Commit
06b0d3fe
authored
1 year ago
by
moon2
Committed by
q3k
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
rev1 is now building, led and sound verified, buttons and display ???
parent
41057e82
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
README.md
+2
-0
2 additions, 0 deletions
README.md
components/badge23/leds.c
+1
-43
1 addition, 43 deletions
components/badge23/leds.c
components/badge23/spio.c
+1
-3
1 addition, 3 deletions
components/badge23/spio.c
with
4 additions
and
46 deletions
README.md
+
2
−
0
View file @
06b0d3fe
...
...
@@ -62,6 +62,8 @@ $ nix-shell nix/shell.nix
## How to build and flash
Select the right firmware for your hardware in
`./revision_config.h`
by (un)commenting your (un)desired revision(s) (default: rev4).
Standard ESP-IDF project machinery present and working. You can run
`idf.py`
from the git checkout and things should just work.
### Building
...
...
This diff is collapsed.
Click to expand it.
components/badge23/leds.c
+
1
−
43
View file @
06b0d3fe
...
...
@@ -162,12 +162,11 @@ static int setupSPI()
return
ret
;
}
static
void
set_single_led
(
uint8_t
index
,
uint8_t
[
3
]
c
){
void
set_single_led
(
uint8_t
index
,
uint8_t
c
[
3
]){
setPixel
(
&
leds
,
index
,
c
);
}
static
void
_leds_init
()
{
leds_queue
=
xQueueCreate
(
10
,
sizeof
(
leds_cfg_t
));
memset
(
active_leds
,
0
,
sizeof
(
active_leds
));
setupSPI
();
...
...
@@ -191,47 +190,6 @@ led_strip_t *led_strip_init(uint8_t channel, uint8_t gpio, uint16_t led_num);
#define LED_GPIO_NUM 14
#define LED_RMT_CHAN 0
#if 0
//ESP-IDF 5.0 for reference
led_strip_handle_t led_strip;
/* LED strip initialization with the GPIO and pixels number*/
led_strip_config_t strip_config = {
.strip_gpio_num = 14, // The GPIO that connected to the LED strip's data line
.max_leds = 40, // The number of LEDs in the strip,
.led_pixel_format = LED_PIXEL_FORMAT_GRB, // Pixel format of your LED strip
.led_model = LED_MODEL_WS2812, // LED strip model
.flags.invert_out = false, // whether to invert the output signal (useful when your hardware has a level inverter)
};
led_strip_rmt_config_t rmt_config = {
.clk_src = RMT_CLK_SRC_DEFAULT, // different clock source can lead to different power consumption
.resolution_hz = 10 * 1000 * 1000, // 10MHz
.flags.with_dma = true, // whether to enable the DMA feature
};
static void renderLEDs()
{
ESP_ERROR_CHECK(led_strip_refresh(led_strip));
}
void set_single_led(int led, uint8_t c[3])
{
led = ((39-led) + 1 + 32)%40;
ESP_ERROR_CHECK(led_strip_set_pixel(led_strip, led, c[0], c[1], c[2]));
}
static void _leds_init() {
memset(active_leds, 0 , sizeof(active_leds));
ESP_ERROR_CHECK(led_strip_new_rmt_device(&strip_config, &rmt_config, &led_strip));
TaskHandle_t handle;
xTaskCreate(&leds_task, "LEDs player", 4096, NULL, configMAX_PRIORITIES - 2, &handle);
}
#endif
led_strip_t
*
led_strip
;
static
void
_leds_init
(){
...
...
This diff is collapsed.
Click to expand it.
components/badge23/spio.c
+
1
−
3
View file @
06b0d3fe
...
...
@@ -6,8 +6,6 @@
static
int8_t
leftbutton
=
0
;
static
int8_t
rightbutton
=
0
;
typedef
#ifdef HARDWARE_REVISION_01
#define RIGHT_BUTTON_LEFT 37
...
...
@@ -91,7 +89,7 @@ static void _init_buttons(){
cfg
.
pin_bit_mask
=
1
;
cfg
.
pull_up_en
=
GPIO_PULLUP_DISABLE
;
ESP_ERROR_CHECK
(
gpio_config
(
&
cfg
));
printf
(
"nya"
);
printf
(
"nya
\n
"
);
}
void
update_button_state
(){
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment