-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Readings on STM32Discovery #2
Comments
Hello. I'm not sure why it is not the case for you, but open drain pin should work. Look into my example https://github.com/rustrum/dht-hal-drv/blob/master/examples/stm32f103/src/main.rs Looks like |
Thanks for looking into that! Actually I am closely following exactly the example you have linked. Maybe to illustrate this a bit further, here is my error message:
Maybe I am a bit confused, but I thought the trait bounds In your example you are using this method and I don't understand how this can return an |
I just found your PR is ongoing, so I just subscribed to these and will look again into the |
BTW it would not work on Stm32 in debug mode (zero readings of yours DHT). Looks like it can not measure time correctly with required granularity. |
First of all, thank you for this crate (I especially like that it only relies on the
embedded-hal
and nothing else).I'm trying to use your driver on a STM32Discovery. I have attempted both measurement strategies, but was not successful:
Open Drain
I cannot get the program properly typed. In your code you have the trait bound of
InputPin + OutputPin
. So far, I could not find a method in the stm32f3xx_hal that gives me a pin that is both at the same time. Though, there areinto_open_drain_output
methods that produce aOutput<OpenDrain>
. Would it be possible to adaptdht_read()
to accepthal::gpio::OpenDrain
?Here is my code:
Split Mode
For split mode, my code "works" as that it successfully prints the readings to ITM. What it does not is providing values that are non-zero. I have checked my DHT22 some time ago with a different another driver and a Raspi board, so I would assume the chip is intact.
Question
Do you have any ideas about 1) how the types can be changed to work with open drain pins from embedded-hal or 2) how to fix
Thanks in advance!
The text was updated successfully, but these errors were encountered: