pythonlego-mindstormslego-mindstorms-ev3

Cannot connect to Pixy with ev3dev


I have a pixy 2 that I'm trying to connect with the following code

pixy = Sensor(address=INPUT_1)
assert pixy.connected, "Connecting PixyCam"

Unfortunately I cannot connect to my Pixy 2 and don't really know what to do.

Connecting to a

TouchSensor(address=INPUT_4) 

works fine. But not when I try with Pixy 2

I've found the code from here: https://www.ev3dev.org/docs/tutorials/using-pixy-camera/

Do anyone know what I can do? See picture for error code.

enter image description here


Solution

  • Ev3Dev does not support Pixy 2 so I had to use Python SMBUS. And it worked.