Comments (4)
Can you try the github master version of the crate? You are using the new embedded-graphics which isn't yet supported by the released version of this crate.
from ssd1306.
You can't use Rgb565
with this display, you can only use BinaryColor
which has an On
and an Off
option.
from ssd1306.
Same code*
Cargo.toml
[dependencies]
panic-halt = "0.2.0"
ufmt = "0.1.0"
nb = "0.1.2"
embedded-hal = "0.2.3"
ssd1306 = { git = "https://github.com/jamwaffles/ssd1306.git", branch = "master" }
embedded-graphics = "0.8.0"
New Error
error[E0271]: type mismatch resolving `<Ssd1306<I2CInterface<avr_hal_generic::i2c::I2c<Atmega, arduino_hal::pac::TWI, avr_hal_generic::port::Pin<Input, PC4>, avr_hal_generic::port::Pin<Input, PC5>, MHz16>>, ssd1306::prelude::DisplaySize128x64, BufferedGraphicsMode<ssd1306::prelude::DisplaySize128x64>> as DrawTarget>::Color == Rgb565`
--> src/main.rs:35:10
|
35 | .draw(&mut display)
| ^^^^ expected struct `Rgb565`, found enum `BinaryColor`
|
note: required by a bound in `embedded_graphics::Drawable::draw`
--> /Users/danny/.cargo/registry/src/github.com-1ecc6299db9ec823/embedded-graphics-core-0.4.0/src/drawable.rs:106:23
|
106 | D: DrawTarget<Color = Self::Color>;
| ^^^^^^^^^^^^^^^^^^^ required by this bound in `embedded_graphics::Drawable::draw`
from ssd1306.
Thanks @bugadani it was the embedded_graphics::pixelcolor::Rgb565
, instead using embedded_graphics::pixelcolor::binarycolor
fixed it 🚀
from ssd1306.
Related Issues (20)
- ssd1306 with rtic 1.0.0 HOT 7
- memory.x or probe-run "fix" HOT 6
- [N00b help request] Init fails with Raspberry Pi Pico and Adafruit OLED HOT 3
- Noob Issue: Cant manage to get this building for the stm32f1xx_hal HOT 6
- Newbie: No signs of life from SSD1306 atmega32u4 SPI 128x64 HOT 2
- How to use display with multiple I2C peripherals ([shared-bus] crate?) HOT 3
- Static noise when using crate with embedded_graphics HOT 4
- Using `DrawTarget::clear` is difficult in buffered graphics mode HOT 5
- Yet another `DrawTarget` is not implemented for `Ssd1306<SPIInterface<Spi... HOT 6
- Unable to draw circles & lines using embedded graphics crate
- Issues with 128x32 Display on Elegoo Arduino UnoR3
- read or toggle pixel in bufferedMode? HOT 4
- Using terminal mode with 90/270 degree rotation leads to incorrect output and panic HOT 1
- Configurable I2C address HOT 1
- trait `DrawTarget` is not implemented for ... / esp_idf_hal::i2c::*
- Buffered graphics paging issues.
- embedded-hal v1.0.0 and embedded-hal-bus HOT 4
- Custom mode support
- :rotating_light: Finding a new owner for this crate HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.