Although I'm a compleet n00b, I did get a BMP180 sensor working with an Arduino. When trying the same with the Wipy, I get stuck at the very beginning...
I connected the BMP180 sensor board from sparkfun on pin 10 and 11, and tried to run the following code:
from machine import I2C
# configure the I2C bus
i2c = I2C(0, I2C.MASTER, baudrate=100000)
i2c.scan() # returns list of slave addresses
The result I get is: [], which seems wrong
Can anybody help me what I'm doing wrong?
Get I2C working
Re: Get I2C working
Nevermind, I got it working. I misread the way how to assign the pins yourself. This works:
>>> i2c_pins = ('GP11', 'GP10')
>>> i2c = I2C(I2C.MASTER, baudrate=100000, pins=i2c_pins)
>>> i2c.scan()
[119]
>>> i2c_pins = ('GP11', 'GP10')
>>> i2c = I2C(I2C.MASTER, baudrate=100000, pins=i2c_pins)
>>> i2c.scan()
[119]