Skip to content

1_led_matrix: Game of Life example using LED matrix and removal of 4_switch_controlled_motor_normal and accordingly rearrange the rest of the folders#172

Merged
Shankari02 merged 5 commits into
SRA-VJTI:masterfrom
5iri:1_led_matrix
Nov 18, 2025

Conversation

@5iri

@5iri 5iri commented Nov 16, 2025

Copy link
Copy Markdown
Member

• This PR replaces the basic LED blink example for 1_led_matrix with a Conway’s Game of Life demo running on the SRA Board LED matrix using ESP-IDF, and cleans up the remaining examples/CI to match the new layout.

Changes

  • LED matrix example
    • Rewrites 1_led_matrix/README.md to describe the Game of Life example, including build/flash instructions using idf.py and a note about
      configuring CONFIG_LED_MATRIX_ROWS and CONFIG_LED_MATRIX_COLUMNS to match the board.
    • Implements a Game of Life simulation in 1_led_matrix/main/main.c:
      • Initializes with a fixed pattern for 5x6 matrices, with sensible fallbacks (center blinker or middle row) for other sizes.
      • Treats the grid as toroidal (wrap-around) when counting neighbors.
      • Uses led_matrix_set_data instead of led_matrix_set_data_raw for updating the display.
      • Adjusts the frame delay to ~150 ms for a smoother animation.
      • Keeps the existing boot-time “blink all LEDs” check before starting the Game of Life loop.
  • Example layout & CI
    • Removes the deprecated 4_switch_controlled_motor_normal example and its references.
    • Renumbers the remaining examples to close the gap:
      • 5_PWM -> 4_PWM
      • 6_line_following -> 5_line_following
      • 7_self_balancing -> 6_self_balancing
    • Updates the Examples table in README.md to reflect the new directory names and paths.
    • Updates .github/workflows/test-build-app.yml so the build matrix tests the new example set: 1_led_matrix, 2_LSA, 3_MPU, 4_PWM, 5_line_following, 6_self_balancing.
    • Updates .gitmodules so the websocket submodule now lives at 6_self_balancing/components/websocket, matching the renumbered self-balancing example and fixing missing websocket_server.h during CI builds.

@5iri

5iri commented Nov 16, 2025

Copy link
Copy Markdown
Member Author
IMG_6744.MOV

working proof.

@5iri

5iri commented Nov 16, 2025

Copy link
Copy Markdown
Member Author

ahhh ci pipeline needs to change to 1_led_matrix instead of 1_led_blink LOL

@vovw

vovw commented Nov 16, 2025

Copy link
Copy Markdown
Member

@5iri fix the ci/cd, looks like it still does cd 1_ledblink

@Shankari02

Copy link
Copy Markdown
Contributor

The point of keeping led_blink simple is for fys to understand the code flow and as such how the build works, why to complicate it?

@Shankari02

Copy link
Copy Markdown
Contributor

This should probably given as an assignment and the codebase should contain a basic file to blink all leds in a simple pattern

@5iri

5iri commented Nov 16, 2025

Copy link
Copy Markdown
Member Author

The point of keeping led_blink simple is for fys to understand the code flow and as such how the build works, why to complicate it?

my thought process is that, the example in sra-board-component is already simple enough. Hence, why not make something nice to look at in the Wall-E Repo.

@5iri

5iri commented Nov 16, 2025

Copy link
Copy Markdown
Member Author

This should probably given as an assignment and the codebase should contain a basic file to blink all leds in a simple pattern

Wanted to up the standards of understanding as well. Wall-E is simple as is.

@vovw

vovw commented Nov 16, 2025

Copy link
Copy Markdown
Member

@5iri rebase and update, thanks

@5iri

5iri commented Nov 17, 2025

Copy link
Copy Markdown
Member Author

done @vovw ! check now!

@5iri

5iri commented Nov 17, 2025

Copy link
Copy Markdown
Member Author

#170 done.

@vovw

vovw commented Nov 17, 2025

Copy link
Copy Markdown
Member

@Shankari02 it works yay

@vovw vovw left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Comment thread 6_line_following/main/component.mk
Comment thread 6_line_following/.gitignore
Comment thread 7_self_balancing/main/component.mk
@Shankari02

Copy link
Copy Markdown
Contributor

Please update the PR description to refer the multiple changes i.e. removal of switch controlled bot and renaming of files along with the ip fix, thanks!

@5iri

5iri commented Nov 18, 2025

Copy link
Copy Markdown
Member Author

ip fix is not part of this pr, but I'll update the rest in the description.

@Shankari02

Copy link
Copy Markdown
Contributor

okay

@5iri 5iri changed the title 1_led_matrix: Game of Life example using LED matrix Replace 1_led_matrix LED blink with Game of Life and renumber examples Nov 18, 2025
@Shankari02 Shankari02 changed the title Replace 1_led_matrix LED blink with Game of Life and renumber examples 1_led_matrix: Game of Life example using LED matrix and removal of 4_switch_controlled_motor_normal and according rearrange the rest of the folders Nov 18, 2025
@Shankari02 Shankari02 changed the title 1_led_matrix: Game of Life example using LED matrix and removal of 4_switch_controlled_motor_normal and according rearrange the rest of the folders 1_led_matrix: Game of Life example using LED matrix and removal of 4_switch_controlled_motor_normal and accordingly rearrange the rest of the folders Nov 18, 2025
@Shankari02 Shankari02 merged commit 2d29675 into SRA-VJTI:master Nov 18, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants