LoganArmando
New Member
Hey everyone!
I am doing a project for an international robotics competition and I need to connect my robot's picaxe (40x2) to a Pixy camera. In the Pixy's website they only give instructions on how to connect it to Ardiuno or Raspberry.
In consequence, I searched for the pins of the I/O port in order to connect them to my picaxe.
So I looked for the SDA, SCL, 5V, and GND once I am using I2C communication.
After everything was well connected and functioning well I had to program the picaxe and debug the info coming from the camera. But I didn't know what to code in order to do get that debug right.
I searched for i2c commands which I have already used with a compass and found the differences between i2cfast/i2cslow, i2cbyte/i2cword. Without understanding so well the difference between these I tried all of them and didn't get anything in the debug window.
To get the debug, I needed to find the camera's address, which I found in the Pixymon's application, somewhere in the settings tab. I got it and then wrote this code:
After this I even tried adding more variables, once camera gives up to 10 different informations (position in x, position in y, width, height), and nothing happend.
I never coded a picaxe connected with a camera. And as this is my first time, I would like someone to tell me how I should code to get info.
Thanks for reading this!
I am doing a project for an international robotics competition and I need to connect my robot's picaxe (40x2) to a Pixy camera. In the Pixy's website they only give instructions on how to connect it to Ardiuno or Raspberry.
In consequence, I searched for the pins of the I/O port in order to connect them to my picaxe.
So I looked for the SDA, SCL, 5V, and GND once I am using I2C communication.
After everything was well connected and functioning well I had to program the picaxe and debug the info coming from the camera. But I didn't know what to code in order to do get that debug right.
I searched for i2c commands which I have already used with a compass and found the differences between i2cfast/i2cslow, i2cbyte/i2cword. Without understanding so well the difference between these I tried all of them and didn't get anything in the debug window.
To get the debug, I needed to find the camera's address, which I found in the Pixymon's application, somewhere in the settings tab. I got it and then wrote this code:
Code:
Main:
i2cslave 0x54, i2cfast, i2cbyte
readi2c 0, (b1)
readi2c 1, (b2)
debug
goto Main
I never coded a picaxe connected with a camera. And as this is my first time, I would like someone to tell me how I should code to get info.
Thanks for reading this!