[SOLVED] MegaPi I2C pins and motors don't work together?


#1

Why is it whenever I try to connect any non-makeblock sensor to the MegaPi using the I2C pins the motors stop working? I’ve connected a Lidar sensor to the MegaPi and created a block extension for it. It works when I read it through the Me 7-segment Display but then if I try using the any motors whether they are encoder motors or just normal DC motors, they just don’t work, but as soon as I unplug the I2C pins from my device, the motors top working.


#2

I’m not really sure what the problem was, but when I changed the address of the sensor, that seemed to do the trick. (You guys can mark this as solved now)


#3

@Besoxsr Awesome! Can you give a little more info and detail about how you solved it? For example, what did your code look like before and after?
Thank you!


#4

Initially I was using the VL53L0X.h library and it was working. As soon as I tried turning on the motors, I ran into this problem and thought that maybe there’s some conflict between the addresses. I moved on to the Adafruit_VL53l0X.h library which allowed me to change the address of the sensor and that ended up working.


#5

Thank you for the information. :+1: