Search found 3 matches

by ss5622759
Tue Jul 19, 2022 10:58 am
Forum: General Discussion and Questions
Topic: I2C with Raspberry pico
Replies: 5
Views: 6978

Re: I2C with Raspberry pico

Dear Roberthh The PINs given by Pin(xx) are GPIO numbers, not board PINs. : SDA - GPIO12 and SCL - GPIO13 Is Ground Connected: Yes are Pull-up resistors in place: Yes what is the result of i2c.scan() after instantiating i2c: d58 or 0x38 Still, I'm getting the same error. Traceback (most recent call ...
by ss5622759
Tue Jul 19, 2022 9:36 am
Forum: General Discussion and Questions
Topic: I2C with Raspberry pico
Replies: 5
Views: 6978

Re: I2C with Raspberry pico

Dear Roberthh

Thanks for the prompt reply.

I just want to know, do we have to provide external pull-up resistors with Pico?

Thanks
by ss5622759
Mon Jul 18, 2022 10:48 am
Forum: General Discussion and Questions
Topic: I2C with Raspberry pico
Replies: 5
Views: 6978

I2C with Raspberry pico

import machine import sys import utime ADDR = 0x38 def reg_write(i2c,addr,reg,data): msg = bytearray(data) i2c.writeto_mem(addr, reg, msg, addrsize = 16) def reg_read(i2c,addr,reg,nbytes = 1): if nbytes < 1: return bytearray() data = i2c.readfrom_mem(addr,reg,nbytes, addrsize = 16) return data # Ma...