Tiny 3250

Started using the Tiny 3250 which i received from Digikey.

One of the things I tried doing is using the QW / ST connector. I attached a Qwiic board (from Sparkfun ( STTS22H ) and tried the following MicroPython code:


import machine

Create I2C object

i2c = machine.I2C(0, scl=machine.Pin(17), sda=machine.Pin(16))

Print out any addresses found

devices = i2c.scan()

if devices:
for d in devices:
print(hex(d))
else:
print(“None found”)


I kept getting the “None found” response when IO was expected the I2C address response.
I suspect that it may be the SDL aqnd SDA pin number used or (maybe) defaulting on freq (?)

Any suggestions welcomed.

I think you may have used the wrong pin numbers?
I just ran this on mine

import machine
sda=machine.Pin(12) # Explorer 20 Breakout 4
scl=machine.Pin(13) # Explorer 21 Breakout 5
i2c=machine.I2C(0,sda=sda, scl=scl, freq=400000)
 
print('Scan i2c bus...')
devices = i2c.scan()
 
if len(devices) == 0:
  print("No i2c device !")
else:
  print('i2c devices found:',len(devices))
 
  for device in devices:  
    print("Decimal address: ",device," | Hex address: ",hex(device))

and got this. I have a multi-sensor stick plugged in.

MPY: soft reboot
Scan i2c bus...
i2c devices found: 3
Decimal address:  35  | Hex address:  0x23
Decimal address:  106  | Hex address:  0x6a
Decimal address:  118  | Hex address:  0x76

I went by the pinout diagram.

Thanks ! That did it. Looking at the pinout diagram vs the schematic confused me a bit.

1 Like

It’s pretty easy to swap the physical pin number in instead of the GP number, etc. Been there done that. Plus, the pins used move around from device to device. I find the pinout diagrams a lot easier to use versus the schematic. For stuff like i2c and SPI anyway. The other gotcha is what pins are used for an onboard RGB LED or buttons, if present. Saving said info in a text file for said device can save you time latter on down the road. I’m switching devices quit often and it saves me looking it up all over again. :)