Deutsch English Français Italiano |
<QZq*00-Fz@news.chiark.greenend.org.uk> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!nntp-feed.chiark.greenend.org.uk!ewrotcd!.POSTED.chiark.greenend.org.uk!not-for-mail From: Theo <theom+news@chiark.greenend.org.uk> Newsgroups: comp.sys.raspberry-pi Subject: Re: Need help with PI PICO... Date: 24 Mar 2024 09:39:30 +0000 (GMT) Organization: University of Cambridge, England Message-ID: <QZq*00-Fz@news.chiark.greenend.org.uk> References: <utn4f2$3p985$1@dont-email.me> Injection-Info: chiark.greenend.org.uk; posting-host="chiark.greenend.org.uk:212.13.197.229"; logging-data="9313"; mail-complaints-to="abuse@chiark.greenend.org.uk" User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (Linux/5.10.0-22-amd64 (x86_64)) Originator: theom@chiark.greenend.org.uk ([212.13.197.229]) Bytes: 1405 Lines: 15 The Natural Philosopher <tnp@invalid.invalid> wrote: > It would seem from the pin states that it gets permanently stuck in > > while(!gpio_get(ULTRASONIC_IN)) > ; > > Which as understand it is waiting for the module (HCSR04) to *start* to > send a pulse. Can you scope it to see if the module is actually sending a pulse? Is the pulse perhaps too short for the Pico to detect? eg if the loop or gpio_get() function took some time, it could be the signal goes 0-1-0 in the middle of a loop iteration and so the gpio_get() never sees it go 1. Theo