-
Notifications
You must be signed in to change notification settings - Fork 178
Open
Description
Hardware
- Waveshare 2.13inch rev2.1 v3
- ESP32s3
Issue
My screen has a big black bar on top (with random pixels on top of it). Please see the image below.
Code
use epd_waveshare::{epd2in13_v2::*, prelude::*};
use embedded_graphics::{
mono_font::{iso_8859_7::FONT_10X20, MonoTextStyle}, prelude::*, primitives::Rectangle, text::Text
};
use esp_idf_svc::hal::{delay::Ets, gpio::{AnyIOPin, PinDriver}, spi::{config::Config, SpiDriverConfig}};
use esp_idf_svc::hal::spi::SpiDeviceDriver;
use esp_idf_svc::hal::prelude::Peripherals;
fn main() {
esp_idf_svc::sys::link_patches();
let peripherals = Peripherals::take().unwrap();
let pins = peripherals.pins;
let spi = peripherals.spi2;
let sclk = pins.gpio12;
let sdo = pins.gpio11;
let busy_in = PinDriver::input(pins.gpio16).unwrap();
let dc = PinDriver::output(pins.gpio18).unwrap();
let rst = PinDriver::output(pins.gpio17).unwrap();
let mut device = SpiDeviceDriver::new_single(
spi,
sclk,
sdo,
Option::<AnyIOPin>::None,
Some(pins.gpio8),
&SpiDriverConfig::default(),
&Config::new().baudrate(112500.into())
).unwrap();
let mut delay = Ets;
// Setup EPD
let mut epd = Epd2in13::new(&mut device, busy_in, dc, rst, &mut delay, None).unwrap();
// Use display graphics from embedded-graphics
let mut display = Display2in13::default();
display.clear(Color::White).unwrap();
display.set_rotation(DisplayRotation::Rotate90);
// Display updated frame
epd.update_and_display_frame(&mut device, &display.buffer(), &mut delay).unwrap();
// Set the EPD to sleep
epd.sleep(&mut device, &mut delay).unwrap();
}Workaround
My workaround around that is modifying WIDTH on the mod.rs file to around 130 instead of 122.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
