Skip to content

Commit

Permalink
updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Pharkie committed Nov 1, 2023
1 parent e43903b commit 8d0ce21
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 5 deletions.
19 changes: 15 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
# pico-pumpkin

8x8 led matrix eyes for a halloween pumpkin full detailed instructions can be found below.
Here's modification of 8x8 led matrix eyes for a halloween pumpkin.

You can edit the sprites and animations and pretty much everything. Works with multiple matrix drivers and microcontrollers.
I removed support for i2c and the HT16k33 LED matrix in the process of making the code clearer for myself using
the MAX7219. I used these (Amazon UK) for the eyes: https://amzn.eu/d/e5Kw5vX

[Link To Full Instructions](https://gurgleapps.com/learn/projects/8x8-led-matrix-halloween-jack-o-lantern-pumpkin-project-with-a-pico)
I fixed the issue mentioned in the video that the left and right eyes needed to be swapped to display scrolling messages.

[8x8 Make Your Own Sprite Online Tool](https://gurgleapps.com/tools/matrix)
I couldn't get the LED matrices to work from the tutorial, so I used the PIN connections shown in:
https://microcontrollerslab.com/max7219-led-dot-matrix-display-raspberry-pi-pico/

I also added a (common anode) RGB LED to light up the mouth, which you could comment out if you don't need.

For the RGB LED, I used one of these: https://amzn.eu/d/9fQ5G3V

Known issues:
I think some of the animations don't work e.g. winkLeft, winkRight.

[Instructions](https://gurgleapps.com/learn/projects/8x8-led-matrix-halloween-jack-o-lantern-pumpkin-project-with-a-pico)
8 changes: 7 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
Written by: GurgleApps.com
Tool To Make Sprites https://gurgleapps.com/tools/matrix
Full Instructions
Instructions
https://gurgleapps.com/learn/projects/8x8-led-matrix-halloween-jack-o-lantern-pumpkin-project-with-a-pico
Revised by: Adam Knowles
Expand Down Expand Up @@ -48,6 +48,7 @@

max7219_eyes = max7219_matrix(SPI(0, sck=Pin(2), mosi=Pin(3)), Pin(CS_PIN, Pin.OUT, True))

# Initiliase common anode RGB LED as a global variable
rgb_led = RGBLED(red = 19, green = 20, blue = 21, active_high = False)

def load_anims(file_name):
Expand All @@ -71,12 +72,17 @@ def anim_runner(anims, font):

left = anim.get("l")
right = anim.get("r")

if left is not None and right is not None:
max7219_eyes.show_char(font[left], font[right])

brightness = anim.get("bl")

if brightness is not None:
max7219_eyes.set_brightness(brightness)

delay = anim.get("d")

if delay is not None:
time.sleep(delay)

Expand Down

0 comments on commit 8d0ce21

Please sign in to comment.