Raspberry Pi Pico Animations on OLED displays using CircuitPython

preview_player
Показать описание
Raspberry Pi Pico Animations on OLED displays using CircuitPython

There are many ways to load and display an animation on an OLED screen, either with Arduino or CircuitPython. I am going to show you what I think is the easiest way to achieve it. I will work with the monochrome OLED, but the procedure works with the Color one as well with only one minor difference that I will show you later in this video.

🐍 New to Programming? Start Your Journey Here:

📘 FREE Python for Absolute Beginners Course:

📖 FREE Python Cheat Sheet:

0:00 Intro
0:23 Hardware used
0:44 What is animation?
2:20 Software needed
4:00 Convert GIF to Sprite Sheet

#circuitpython #educ8stv #raspberrypi
Рекомендации по теме
Комментарии
Автор

Good work. Back in 2017 I learned how to display bitmap image on Nokia lcd from your tutorials.

ABID
Автор

Great stuff. Love what you are doing with CIrcuitPython.

Tims_Projects
Автор

Great find
Great video as always
Thanks for sharing your experiences with all of us 🙂

avejst
Автор

Yasou Nick! Summers in Kim’s, Evian😁 Great video. I joined your other channel too. Looking forward to more videos.

Dgifts
Автор

If you take out the micro usb will the animation run independently with a separate power source

goaway
Автор

Have you had any luck connecting multiple oleds to a pico ?

thewilltejeda
Автор

Is there a faster way to display gifs? the animation playback is quite slow this way. When i was using micropython i was able to play at 60fps by using blit with individual frames

rakibshahid
Автор

Great, I am using micropython and i cannot upload bmp file, do i have to switch to circuit python for this feature?

Nazwan-rr
Автор

Do you think i can do the same if I have Feather RP2040 board and ST7789 TFT 1.47" display? I have been trying to make Mini gif player with the guide, but couldn't get it to work. So right now I'm trying yours project.

dannguyen
Автор

Hi Nick, thank you for making amazing training material.
I have a question about little project i'm doing.

The project has two buttons and a 12v LED strip. One button press needs to start LEDs flash then when the button is pressed again LEDs to stop.
Second button when pressed LEDs will start flashing then stop on its own after few seconds.

How can I go about doing that?

I don't have your email so wrote it here if that ok :)
I'm useing FastLED library and this is my code without buttons (not sure how to make add buttons to make the above operation) :


#include <FastLED.h>
#define NUM_LEDS 60
#define LED_PIN 6

CRGB leds[NUM_LEDS];

void setup() {
FastLED.addLeds<WS2811, LED_PIN, GRB>(leds, NUM_LEDS);
FastLED.setBrightness(1);

}

void loop() {
// Turn the LED on, then pause
fill_solid( leds, NUM_LEDS, CRGB( 255, 255, 255 ) );
FastLED.show();
delay(20);

fill_solid( leds, NUM_LEDS, CRGB( 0, 0, 0 ) );
FastLED.show();
delay(200);

}


Sorry if this is a wrong place to post. Don't have your email.
Thank you :)

No_Plastic
Автор

Will you make tutorial for micropython too?
I recently bought ESP32 and flashed bootloader to use micropython.
I wonder if this will work with this OLED too.

jumbo
Автор

The "code" link takes you to a page missing links to libraries and it's full of ads.
I'm lost. This didn't help me. How do you define the GP pins used, you don't show that part of the code.

convolution
Автор

RuntimeError: No pull up found on SDA or SCL; check your wiring 😢

sed
Автор

I'm trying code with Pi Pico, circuit python, screen nokia 5110 with adafuit_pcd5844 but it's not run yet. Please help:
run_action.bmp (1bit depth, 84x48 pixel, x 25 fp)

#
import board, busio, displayio, time
import digitalio
import adafruit_pcd8544
import adafruit_imageload


image, palette = adafruit_imageload.load(
"run_action.bmp", bitmap=displayio.Bitmap, palette=displayio.Palette
)
tile_grid = displayio.TileGrid(image, pixel_shader=palette)

IMAGE_FILE = "run_action.bmp"
SPRITE_SIZE = (84, 48)
FRAMES = 25

def invert_colors():
temp = icon_pal[0]
icon_pal[0] = icon_pal[1]
icon_pal[1] = temp

displayio.release_displays()

mosi_pin = board.GP11
clk_pin = board.GP10

spi = busio.SPI(clock=clk_pin, MOSI=mosi_pin)
dc = # data/command
cs = # Chip select
reset = # reset

display = adafruit_pcd8544.PCD8544(spi, dc, cs, reset)
display.bias = 5
display.contrast = 8


icon_bit, icon_pal = adafruit_imageload.load(IMAGE_FILE, bitmap=displayio.Bitmap, palette=displayio.Palette)
invert_colors()

icon_grid = displayio.TileGrid(icon_bit, pixel_shader=icon_pal,
width=1, height=1,
tile_height=SPRITE_SIZE[1], tile_width=SPRITE_SIZE[0],
default_tile=0,
x=48, y=0)

group = displayio.Group()
group.append(icon_grid)
display.show()

timer = 0
pointer = 0

while True:
if (timer + 0.1) < time.monotonic():
icon_grid[0] = pointer
pointer += 1
timer = time.monotonic()
if pointer > FRAMES-1:
pointer = 0

VietDoanDuc
welcome to shbcf.ru