# PiicoDev issues "incorrect device"

**URL:** <https://forum.core-electronics.com.au/t/piicodev-issues-incorrect-device/23347>\
**Category:** Raspberry Pi\
**Created:** [25 September 2025 01:30 UTC](https://forum.core-electronics.com.au/t/piicodev-issues-incorrect-device/23347 "2025-09-25T01:30:30Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nick101707](https://avatars.discourse-cdn.com/v4/letter/n/f08c70/32.png) [@Nick101707](https://forum.core-electronics.com.au/u/Nick101707)\
**Post date:** [25 September 2025 01:30 UTC](https://forum.core-electronics.com.au/t/piicodev-issues-incorrect-device/23347/1 "2025-09-25T01:30:30Z")

</div>

Hi forum, getting a curly one, hoping for input on this issue.

I have a newly setup fresh Pi 3B+ setup exactly per the guide here:

> **[PiicoDev Ultrasonic Rangefinder | Getting Started Guide - Tutorial Australia](https://core-electronics.com.au/guides/piicodev/piicodev-ultrasonic-rangefinder-getting-started-guide/)**
>
> Similar to how bats echo-locate and how submarines use sonar, the PiicoDev® Ultrasonic Rangefinder uses sound waves to measure the distance to an object. It sends out a high-pitched sound wave, which bounces off of the object and comes back to the...

I’m getting bad (~7m) readings & rarely detecting a close object.  
I get a message when code starts “incorrect device found at address 53”

i2cdetect -y 1 works & shows sensor at 35

sensor light is on & blinks with activity

if relevant, installing piicodev via Thonny instructions didn’t work (got environment errors) & had to clone the git hub

---

<div class="post-metadata">

**Author:** ![Jane](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/jane/32/12622_2.png) [@Jane](https://forum.core-electronics.com.au/u/Jane)\
**Post date:** [25 September 2025 03:41 UTC](https://forum.core-electronics.com.au/t/piicodev-issues-incorrect-device/23347/2 "2025-09-25T03:41:20Z")

</div>

Hi there @Nick101707, and welcome to the forums, glad to have you here.

There’s definitely something wrong with your I2C addresses there.

The error message ‘incorrect device found at address 53’ indicates that the sensor is not where it’s supposed to be. The 0x35 address is in hexadecimal, or base 16, which means that 0x35 address translates to the decimal 53.

That is triggered because PiccoDev-Ultrasonic class expects itself to have the i2C address of 0x01 when it has the device ID of 578. But, for some reason in your setup, it does not.

One of two things is most likely occuring:

- Wiring could be off. Could you please upload photos of your setup, taking particular attention to show wiring, so we can confirm if its ok.
- If you’re getting environment errors in Thonny, it’s likely you have not configured a Virtual Environment. Did you follow the steps here:

 ![image](https://canada1.discourse-cdn.com/flex028/uploads/core_electronics/original/2X/9/904e5424dd859e21cad558917fdbb9154fd0ac05.png)

 ![image](https://canada1.discourse-cdn.com/flex028/uploads/core_electronics/original/2X/2/278b70429c386aef366d110cbf7190136124c58a.png)

---

<div class="post-metadata">

**Author:** ![Nick101707](https://avatars.discourse-cdn.com/v4/letter/n/f08c70/32.png) [@Nick101707](https://forum.core-electronics.com.au/u/Nick101707)\
**Post date:** [25 September 2025 04:36 UTC](https://forum.core-electronics.com.au/t/piicodev-issues-incorrect-device/23347/3 "2025-09-25T04:36:11Z")

</div>

![20250925_1423141](https://canada1.discourse-cdn.com/flex028/uploads/core_electronics/original/2X/3/368ecf13347742b1a823f5d43134e9eed8703c70.jpeg)

So here’s a pic of the setup producing this problem.

The environment errors were not in Thonny, I did create the environment there OK.

Problems were when trying to get Thonny to add the piicodev package, eg Using Tools \> Manage packages, enter “piicodev” \> Search on PyPI gave blank, no results found.

Since that didn’t work, I went to [GitHub - CoreElectronics/CE-PiicoDev-PyPI: PyPI package for the PiicoDev ecosystem](https://github.com/CoreElectronics/CE-PiicoDev-PyPI)

and tried this:

**Installation**

On Raspberry Pi, run the following to install:

```auto
sudo pip3 install piicodev

```

which gave errors about environment

---

<div class="post-metadata">

**Author:** ![Jane](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/jane/32/12622_2.png) [@Jane](https://forum.core-electronics.com.au/u/Jane)\
**Post date:** [25 September 2025 05:01 UTC](https://forum.core-electronics.com.au/t/piicodev-issues-incorrect-device/23347/4 "2025-09-25T05:01:57Z")

</div>

It is quite strange that you couldn’t find PiicoDev in Thonny. I just tried on a random computer and it was the top search result. So, I’m not sure what is happening there. But it sounds like you’re not using a Virtual Environment.

Essentially, Raspbian OS is refusing to download the code because it needs Python to function and doesn’t want any changes. To get around this, we need to make a Virtual Environment we can install the dependencies to.

```auto
cd /path/to/your/project 
python3 -m venv ultrasonic #Anything you want, ultrasonic seems on theme.
source ultrasonic/bin/activate 
sudo pip3 install piicodev

```

Then try running your code again.

Oh, and if you want to leave the Venv and go back to the regular shell, just type `deactivate`. Or close the terminal and open a new one (which is what I usually do…)

If you’re still receiving the same error, please upload a screenshot showing the error message. It will help us solve any issues.

---

<div class="post-metadata">

**Author:** ![Nick101707](https://avatars.discourse-cdn.com/v4/letter/n/f08c70/32.png) [@Nick101707](https://forum.core-electronics.com.au/u/Nick101707)\
**Post date:** [25 September 2025 05:32 UTC](https://forum.core-electronics.com.au/t/piicodev-issues-incorrect-device/23347/5 "2025-09-25T05:32:02Z")

</div>

> [@Jane](#):
>
> ```auto
> cd /path/to/your/project 
> python3 -m venv ultrasonic #Anything you want, ultrasonic seems on theme.
> source ultrasonic/bin/activate 
> sudo pip3 install piicodev
> 
> ```

Thanks for responding.

Re the env error, this was the issue, solved earlier as Thonny does now have the piicodev package listed in installed packages list.

However, guide instructions didn’t mention this, I got the error, googled, did the above already. I’m guessing this has to be done after the Thonny environment creation & the Thonny env can be used for this? Hopefully posting it here helps others.

Unfortunately after several reboots, the code still glitches as described.

Update: I changed the device addresses with the switches, copying the “ **Multiple Rangefinders on the same PiicoDev Bus”** section in the guide. I did connect both sensors. Suddenly it’s working perfectly, no more “incorrect device” errors.

---

<div class="post-metadata">

**Author:** ![Ryan](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/ryan/32/12254_2.png) [@Ryan](https://forum.core-electronics.com.au/u/Ryan)\
**Post date:** [25 September 2025 06:02 UTC](https://forum.core-electronics.com.au/t/piicodev-issues-incorrect-device/23347/6 "2025-09-25T06:02:28Z")

</div>

Hey @Nick101707,

Glad to see this one is up and running! Best of luck with the project.

---

<div class="post-metadata">

**Author:** ![Robert93820](https://avatars.discourse-cdn.com/v4/letter/r/ac91a4/32.png) [@Robert93820](https://forum.core-electronics.com.au/u/Robert93820)\
**Post date:** [25 September 2025 06:43 UTC](https://forum.core-electronics.com.au/t/piicodev-issues-incorrect-device/23347/7 "2025-09-25T06:43:18Z")

</div>

Hi Nick, Ryan

> [@Nick101707](#):
>
> Suddenly it’s working perfectly

I wonder why that happened. There has got to be a reason for everything.

> [@Ryan](#):
>
> Glad to see this one is up and running!

> [@Ryan](#):
>
> Best of luck

How true. Oh how I love those self fixing problems !!! I don’t think.  
Cheers Bob

---

<div class="post-metadata">

**Author:** ![Nick101707](https://avatars.discourse-cdn.com/v4/letter/n/f08c70/32.png) [@Nick101707](https://forum.core-electronics.com.au/u/Nick101707)\
**Post date:** [25 September 2025 11:20 UTC](https://forum.core-electronics.com.au/t/piicodev-issues-incorrect-device/23347/8 "2025-09-25T11:20:11Z")

</div>

I think the issue was the default address. Changing it from default 0000 with the switches seemed to get it going (1,0,0,0 & 0,1,0,0 switch settings worked).

---

<div class="post-metadata">

**Author:** ![Robert93820](https://avatars.discourse-cdn.com/v4/letter/r/ac91a4/32.png) [@Robert93820](https://forum.core-electronics.com.au/u/Robert93820)\
**Post date:** [25 September 2025 23:38 UTC](https://forum.core-electronics.com.au/t/piicodev-issues-incorrect-device/23347/9 "2025-09-25T23:38:12Z")

</div>

Hi Nic.  
Yes that would probably do it. Thanks for confirming.  
Cheers Bob
