Git Product home page Git Product logo

st7735-lcd-examples's Introduction

st7735-lcd-examples

Usage examples for the st7735-lcd Rust crate

Building

Metro M4

cd metro-m4-examples
cargo build --release --examples --target=thumbv7em-none-eabihf

STM32F103 Blue Pill

cd blue-pill-examples
cargo build --release --examples --target=thumbv7m-none-eabi

STM32F411CE Black Pill

Build with:

cd black-pill-examples
cargo build --release --example draw_ferris

create a bin file and flash in DFU-Mode. To get to the DFU-Mode hold the BOOT0 button while pressing the NRST button. To flash use:

cd black-pill-examples
cargo objcopy  --release --example draw_ferris -- -O binary draw_ferris.bin
sudo dfu-util -d 0483:df11 -a 0 -s 0x08000000:leave -D draw_ferris.bin

Nucleo F411RE

cd nucleo-411re-examples
cargo build --release --examples --target=thumbv7em-none-eabihf

Raspberry Pi Pico

cd rp2040-examples
cargo build --release --example draw_ferris

M5Stamp C3U Mate

cd esp32c3-examples
cargo build --release --example draw_ferris

Wiring

Metro M4

ST7735 Pin Metro M4 Pin
GND GND
VCC 5V
SCL/SCK SCK (see picture)
SDA/MOSI MOSI (see picture)
RES/RST D1
DC D0
CS D2 or GND
BLK Not connected

Blue Pill

ST7735 Pin Blue Pill Pin
GND G
VCC 5V
SCL/SCK A5
SDA/MOSI A7
RES/RST B1
DC B0
CS G
BLK Not connected

Black Pill

Black Pill connections

ST7735 Pin Black Pill Pin
GND G
VCC 5V
SCL/SCK A5
SDA/MOSI/DIN A7
RES/RST B1
DC B0
CS G or PA4
BL 3V3

Nucleo F411RE

ST7735 Pin Nucleo F411RE Pin
GND GND
VCC 5V
SCL/SCK SCK/D13
SDA/MOSI PWM/MOSI/D11
RES/RST A1
DC A0
CS GND
BLK Not connected

Raspberry Pi Pico

ST7735 Pin Raspberry Pi Pico Pin
GND GND
VCC 5V
SCL/SCK gpio6
SDA/MOSI gpio7
RES/RST gpio14
DC gpio13
CS GND
LED gpio12

M5Stamp C3U

ST7735R Pin M5Stamp C3U Pin
GND GND
3V3 3V3
SCL/SCK gpio8
SDA/MOSI/SI gpio10
RES/RST gpio3
DC gpio4
TCS/CS GND
LED Not connected

st7735-lcd-examples's People

Contributors

drewtchrist avatar enaut avatar fkohlgrueber avatar kons-9 avatar sajattack avatar yruamalairba avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

st7735-lcd-examples's Issues

Does not compile on Pico

I get below errors when trying to compile:

error[E0599]: no method named `integer` found for struct `fugit::rate::Rate` in the current scope
  --> examples/draw_ferris.rs:72:87
   |
72 |     let mut delay = cortex_m::delay::Delay::new(core.SYST, clocks.system_clock.freq().integer());
   |                                                                                       ^^^^^^^ method not found in `fugit::rate::Rate<u32, 1, 1>`

error[E0277]: the trait bound `fugit::rate::Rate<u32, 1, 1>: From<Hertz>` is not satisfied
   --> examples/draw_ferris.rs:99:9
    |
96  |     let spi = spi.init(
    |                   ---- required by a bound introduced by this call
...
99  |         16_000_000u32.Hz(),
    |         ^^^^^^^^^^^^^^^^^^ the trait `From<Hertz>` is not implemented for `fugit::rate::Rate<u32, 1, 1>`

Proposed modification of argument values for esp32c3

I have used the esp32c3 example.
I think the color and range of the display is incorrect.
Please check the following suggested corrections.

--- a/esp32c3-examples/examples/draw_ferris.rs
+++ b/esp32c3-examples/examples/draw_ferris.rs
@@ -35,10 +35,10 @@ fn main() -> Result<()> {
     let rst = PinDriver::output(peripherals.pins.gpio3)? ;
     let dc = PinDriver::output(peripherals.pins.gpio4)? ;

- let rgb = false;
+ let rgb = true;
     let inverted = false;
     let width = 128;
- let height = 128;
+ let height = 160;

I am sorry, but you have written a note in the readme regarding this matter.
However, I still think it would be better to modify it according to the actual situation.
I have confirmed that it works as follows.
https://twitter.com/Yu2Ta7Ka/status/1687927576898224128

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.