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

DHTXX: Use runtime interrupt instead of UART #328

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open

DHTXX: Use runtime interrupt instead of UART #328

wants to merge 2 commits into from

Conversation

Elfo404
Copy link
Contributor

@Elfo404 Elfo404 commented Oct 12, 2021

Implementing what was being suggested in #255 (comment).

i quickly tested this on a itsybitsy-nrf52840 and seems to work fine.

(Should) fix #255

shall I also add a smoke test for this? something like:

tinygo build -size short -o ./build/test.hex -target=itsybitsy-nrf52840 ./examples/dht/main.go

@didiermichel
Copy link

didiermichel commented Feb 9, 2022

Hi,
I have tried this with arduino target and I got folowing error at compilation time:

error: interp: ptrtoint integer size does not equal pointer size

Not sure how to analyse this.
it seems related to tinygo-org issue 2389

@doniacld
Copy link
Member

Hi @Elfo404
I spent some time struggling with why the DHT example was not printing any data. Do you think you could do a separate PR with your commit fixing the example? Since it is a quick fix and could be merged easily?!
Thanks a lot

@@ -12,7 +12,7 @@ func main() {
dhtSensor := dht.New(pin, dht.DHT11)
for {
temp, hum, err := dhtSensor.Measurements()
if err != nil {
if err == nil {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch!

@Elfo404
Copy link
Contributor Author

Elfo404 commented Feb 19, 2022

@doniacld here you go :) #381

@stevegt
Copy link

stevegt commented Mar 22, 2022

Not sure how to analyse this. it seems related to tinygo-org issue 2389

@didiermichel Yes, does sound like tinygo-org/tinygo#2389.

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

Successfully merging this pull request may close these issues.

4 participants