Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spi reader dont work for me :( #22

Open
pronvis opened this issue Jun 2, 2024 · 1 comment
Open

Spi reader dont work for me :( #22

pronvis opened this issue Jun 2, 2024 · 1 comment

Comments

@pronvis
Copy link

pronvis commented Jun 2, 2024

I wrote a test example for your library: https://github.com/pronvis/drawer-robot/blob/master/crates/companion/src/bin/hx711_spi_read.rs
And it reads absolutely noise:

└─ hx711_spi_read::app::hx711_read @ src/bin/hx711_spi_read.rs:135
DEBUG #26: DYMH-06 data: -221.92485
└─ hx711_spi_read::app::hx711_read @ src/bin/hx711_spi_read.rs:135
DEBUG #31: DYMH-06 data: -0.000035274
└─ hx711_spi_read::app::hx711_read @ src/bin/hx711_spi_read.rs:135
DEBUG #35: DYMH-06 data: -221.92485
└─ hx711_spi_read::app::hx711_read @ src/bin/hx711_spi_read.rs:135
DEBUG #40: DYMH-06 data: -0.000035274
└─ hx711_spi_read::app::hx711_read @ src/bin/hx711_spi_read.rs:135
DEBUG #44: DYMH-06 data: 184.93732
└─ hx711_spi_read::app::hx711_read @ src/bin/hx711_spi_read.rs:135
DEBUG #49: DYMH-06 data: 258.91226

but non-spi reader that is used here: https://github.com/pronvis/drawer-robot/blob/master/crates/companion/src/bin/hx711_read.rs
works fine. What could be wrong?
All the difference in pin connections is:
with spi:

PB13 <-> SCK
PB14 <-> DT

with non-spi:

PA7 <-> SCK
PA6 <-> DT
@crjeder
Copy link
Owner

crjeder commented Jun 2, 2024

Hmm. Strange. I need to look into this...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants