!SfJCDXZbMHXkPovtKL:matrix.org

Rust Embedded Graphics

289 Members
Help and chat for embedded-graphics and the wider embedded Rust graphics ecosystem | https://github.com/embedded-graphics/embedded-graphics | https://crates.io/crates/embedded-graphics26 Servers

Load older messages


SenderMessageTime
15 Feb 2024
@greengenie:matrix.orgAdam Hott changed their display name from CodingInGreen to Adam Hott.12:32:22
17 Feb 2024
@riskable:matrix.orgriskable

Anyone have any ideas how to resolve this?

error[E0277]: the trait bound `Rgb888: embedded_graphics_core::pixelcolor::PixelColor` is not satisfied
   --> src/bin/ahek95/rgb.rs:627:32
    |
627 |         let tga: Tga<Rgb888> = Tga::from_slice(data).unwrap();
    |                                ^^^^^^^^^^^^^^^ the trait `embedded_graphics_core::pixelcolor::PixelColor` is not implemented for `Rgb888`
15:21:09
@bugadani:matrix.orgdanielb rgb888 docs. review your cargo tree and avoid importing embedded_graphics_core multiple times would be my guess 17:51:13
18 Feb 2024
@kristoffer_p:matrix.orgkristoffer_p joined the room.22:22:59
23 Feb 2024
@shnob:matrix.orgshnob joined the room.07:43:07
@shnob:matrix.orgshnobIs there a way to have images that have transparent regions such that when the image is drawn, those pixels stay as they were? I still want to be able to use both black and white, but also have a transparent 'color' too. This is a B&W screen if that's important.07:49:48
@peter9477:matrix.orgPeter HansenIf you mean BinaryColor, then I don't think so since the images are only one bit per pixel. To do transparency you need a third state, so at least two bits per pixel, or conceivably a pair of images, one for black+transparent and one for white+transparent. And I believe currently the standard image drawing for BinaryColor has no concept of transparency anyway so even that idea may need you to roll your own drawing routine. I could be wrong, but I believe only the text support handles transparency (with BinaryColor, that is... some other color formats presumably could).14:00:42
@peter9477:matrix.orgPeter Hansen shnob: ^^ 14:01:46
@dngrs:matrix.orgdngrsyeah I was thinking along similar lines. One image, one mask, and custom draw impl14:38:37
24 Feb 2024
@niedzwiedzw:matrix.orgWojciech Niedźwiedź joined the room.11:27:20
@niedzwiedzw:matrix.orgWojciech Niedźwiedźhello everyone, I was wondering if there is a kind soul here that would take a look at this PR I made - it upgrades a driver for a led matrix I'm using to from 5.x to 7.x11:28:36
@niedzwiedzw:matrix.orgWojciech Niedźwiedźit compiles but, then at the same time it doesn't work :D but there are so many things that could have gone wrong, maybe I messed up the wiring...11:29:05
@niedzwiedzw:matrix.orgWojciech Niedźwiedźhttps://github.com/david-sawatzke/hub75-rs/pull/711:29:40
@niedzwiedzw:matrix.orgWojciech Niedźwiedźhttps://github.com/Niedzwiedzw/esp-reaper-status-bar/blob/master/src/status_bar_display.rs my code for drawing... the no led on the matrix llights up11:33:38
25 Feb 2024
@niedzwiedzw:matrix.orgWojciech Niedźwiedźsooo my question still stands... I have managed to run this demo https://www.waveshare.com/wiki/RGB-Matrix-P2-64x64#Working_With_ESP32 on my setup, which means that hardware is fine - it must be software problem. If someone is feeling like helping me I'd be forever grateful :D15:06:51
@niedzwiedzw:matrix.orgWojciech Niedźwiedź * sooo my question still stands... I have managed to run this demo https://www.waveshare.com/wiki/RGB-Matrix-P2-64x64#Working_With_ESP32 on my setup, which means that hardware is fine - it must be software problem. If someone is feeling like helping me I'd be forever grateful :D (I'm open sourcing (MIT) everything btw) 15:10:36
@niedzwiedzw:matrix.orgWojciech Niedźwiedź * https://github.com/Niedzwiedzw/esp-reaper-status-bar/blob/master/src/status_bar_display.rs my code for drawing... no led on the matrix llights up 15:11:29
26 Feb 2024
@rfuest:matrix.orgrfuest

I've never used that crate, but my guess is that you aren't calling the output method: https://docs.rs/hub75/0.1.1/hub75/struct.Hub75.html#method.output

15:12:47
@niedzwiedzw:matrix.orgWojciech Niedźwiedźomg xD thank you16:12:27
28 Feb 2024
@rursprung:matrix.orgRalph joined the room.18:01:08
1 Mar 2024
@avlec:matrix.orgavlec

Hey guys got a interesting problem. In the progress of updating my embassy_rp project to their latest git version using epd-waveshare for my display. And I had this bit of code that worked before but now doesn't cause the epd-waveshare has tightened up its API just lost for what to do to resolve this any help or guidance appreciated!

    let mut spi_d_cfg = embassy_rp::spi::Config::default();
    spi_d_cfg.frequency = 4000000;
    let mut spi_d = embassy_rp::spi::Spi::new_blocking_txonly(p.SPI1, p.PIN_10, p.PIN_11, spi_d_cfg);

    let busy_d = Input::new(p.PIN_13, Pull::None);
    let dc_d = Output::new(p.PIN_8, Level::Low);
    let rst_d = Output::new(p.PIN_12, Level::Low);
    let mut delay = Delay;
    let mut epd = EPD3in7::new(&mut spi_d, busy_d, dc_d, rst_d, &mut delay, None).unwrap();

The error is as follows

error[E0277]: the trait bound `embassy_rp::rp_pac::spi::Spi: embedded_hal::spi::SpiDevice` is not satisfied
   --> src/main.rs:140:32
    |
140 |     let mut epd = EPD3in7::new(&mut SPI1, busy_d, dc_d, rst_d, &mut delay, None).unwrap();
    |                   ------------ ^^^^^^^^^ the trait `embedded_hal::spi::SpiDevice` is not implemented for `embassy_rp::rp_pac::spi::Spi`
    |                   |
    |                   required by a bound introduced by this call
05:29:19
@avlec:matrix.orgavlec *

Hey guys got a interesting problem. In the progress of updating my embassy_rp project to their latest git version using epd-waveshare for my display. And I had this bit of code that worked before but now doesn't cause the epd-waveshare has tightened up its API just lost for what to do to resolve this any help or guidance appreciated!

    let p = embassy_rp::init(Default::default());
// ...
    let mut spi_d_cfg = embassy_rp::spi::Config::default();
    spi_d_cfg.frequency = 4000000;
    let mut spi_d = embassy_rp::spi::Spi::new_blocking_txonly(p.SPI1, p.PIN_10, p.PIN_11, spi_d_cfg);

    let busy_d = Input::new(p.PIN_13, Pull::None);
    let dc_d = Output::new(p.PIN_8, Level::Low);
    let rst_d = Output::new(p.PIN_12, Level::Low);
    let mut delay = Delay;
    let mut epd = EPD3in7::new(&mut spi_d, busy_d, dc_d, rst_d, &mut delay, None).unwrap();

The error is as follows

error[E0277]: the trait bound `embassy_rp::rp_pac::spi::Spi: embedded_hal::spi::SpiDevice` is not satisfied
   --> src/main.rs:140:32
    |
140 |     let mut epd = EPD3in7::new(&mut SPI1, busy_d, dc_d, rst_d, &mut delay, None).unwrap();
    |                   ------------ ^^^^^^^^^ the trait `embedded_hal::spi::SpiDevice` is not implemented for `embassy_rp::rp_pac::spi::Spi`
    |                   |
    |                   required by a bound introduced by this call
05:30:08
@grantm11235:matrix.orgGrantM11235 avlec: You need to wrap the spi bus with something like embedded_hal_bus::spi::ExclusiveDevice. This explains the difference between an SpiBus and an SpiDevice https://docs.rs/embedded-hal/latest/embedded_hal/spi/index.html 20:35:26
@fdem234:matrix.orgfdem234problem with embassy build. I was following Hanno Braun's tutorial and after git clone of embassy the article had "git switch -d c3ef98a" That led to all my trouble21:20:08
2 Mar 2024
@avlec:matrix.orgavlec
In reply to @grantm11235:matrix.org
avlec: You need to wrap the spi bus with something like embedded_hal_bus::spi::ExclusiveDevice. This explains the difference between an SpiBus and an SpiDevice https://docs.rs/embedded-hal/latest/embedded_hal/spi/index.html
That seems to have been the gap in my understanding thank you! What changes when you step away from a project for a few months...
04:06:26
@niedzwiedzw:matrix.orgWojciech Niedźwiedź

hey, I can see that my raspberry pi pico (through embassy_rp is not fast enough to drive hub75 protocol and it flickers A LOT. it's off most of the time :D. So my assumption is that it uses too optimistic of a color depth, I was thinking about patching it to support less ambitious color space.
https://github.com/david-sawatzke/hub75-rs/blob/ba1eaa6de065909bba5776557e7986229df54863/src/lib.rs#L236

the problem is that despite using pure colors only - red green and blue, below threshold of 6 for brightness_bits it shows no colors at all.

could someone with more expertise help me out with this?

14:34:55
@niedzwiedzw:matrix.orgWojciech Niedźwiedźhttps://github.com/Niedzwiedzw/hub75-rs/commit/e9fdc886128cc7c44928b9d58f107210e0683095?diff=split&w=1 so for some reason this doesn't work... 15:38:02
@niedzwiedzw:matrix.orgWojciech Niedźwiedź * https://github.com/Niedzwiedzw/hub75-rs/commit/e9fdc886128cc7c44928b9d58f107210e0683095?diff=split&w=1 so for some reason this doesn't work... the screen is completely dark, nothing is displayed15:38:43
@niedzwiedzw:matrix.orgWojciech Niedźwiedź * https://github.com/Niedzwiedzw/hub75-rs/commit/e9fdc886128cc7c44928b9d58f107210e0683095?diff=split&w=1 so for some reason this doesn't work... the screen is completely dark, nothing is displayed...15:40:13
@zer0-x:kde.org@zer0-x:kde.org left the room.18:46:09

There are no newer messages yet.


Back to Room ListRoom Version: 5