Piico Dev errors RPI

Hi

Im using the Piicodev RPI kit on a zero 2 running 32-bit Raspberry OS with desktop. I previously had temp and LED modules working using the example scripts. After letting it sit for a week i now get cannot communicate errors in thorny when i run the example scripts. Oddly every 50 or so tries it works as intended, without me touching any of the modules etc.

I have tried swapping the cables out, re flashing with Raspberry OS and setting it all up again. The rpi module is installed so that it covers the zero, rather than hangs off. Same issue with 1 or multiple plugged in. Never chained.

any help would be appreciated.

temp module gives:
PiicoDev could not communicate with module at address 0x48, check wiring
display:
PiicoDev could not communicate with module at address 0x48, check wiring

2 Likes

Hi @Kram,

It’s a little strange that both modules are reporting the same address in the error message. Do you mind sharing your minimal code to replicate the issue?

Also, have you modified the hardware address configuration on either device?

2 Likes

Apologies, the display is reporting:
PiicoDev could not communicate with module at address 0x3C, check wiring

Scripts

from PiicoDev_SSD1306 import *

display = create_PiicoDev_SSD1306()

display.rect(10, 10, 20, 50, 1) # unfilled rectangle
display.fill_rect(50, 10, 50, 40, 1) # filled rectangle (white)
display.fill_rect(60, 20, 30, 20, 0) # filled rectangle (black)
display.show()
# PiicoDev TMP117 minimal example code
# This program reads the temperature from the PiicoDev TMP117 precision temperature sensor
# and displays the result in Degrees Celsius, Farenheit and Kelvin

from PiicoDev_TMP117 import PiicoDev_TMP117
from PiicoDev_Unified import sleep_ms # cross-platform compatible sleep function

tempSensor = PiicoDev_TMP117() # initialise the sensor

while True:
    # Read and print the temperature in various units
    tempC = tempSensor.readTempC() # Celsius
    tempF = tempSensor.readTempF() # Farenheit
    tempK = tempSensor.readTempK() # Kelvin
    
    # Convert temperature into a string and print the data
    print(str(tempC) + " °C")
    
    sleep_ms(10000) # delay 1 second

2 Likes

Hi Kram,

Oh good, this makes more sense now.

Have you tested using other PiicoDev connectors (using just the TMP117 module)?

image

Have both of the PiicoDev modules got the correct address configured? Older modules have a cuttable track on the back of the module (don’t cut it if you want the default address). Newer ones have dip switches.

If yes to both of the above, then it seems something along the common path is not working properly. Could you do a continuity test with everything connected (no power) between these pins (GND and 3.3V tests should be 0ohm. SDA and SCL will either be 0ohms or 120ohm depending on the version board you have - both the same though):

If that checks out, then with everything connected and power applied, measure the 3.3V voltage between these two pins (should measure 3.3V):

Fyi, while there are pull-up resistors on the PiicoDev adaptor for RPI, PiicoDev modules have them as well. I wouldn’t expect to see the symptom you have reported for 1-2 modules if there was an open circuit fault with either pull-up resistor due to a soldering issue (so not suggesting a test for them).

3 Likes