<< return to Pixycam.com

Using Pixy Cam with Netduino - I2C

Hi!

I’m trying to use Pixy with Netduino plus 2 using I2C (pins 5, 9 and 6 for ground) and I have some questions:

1 - Can I power Pixy using pin 2?
2 - I plan to use 10K pullups resistors, 5V. I read that Pixy has 4k7 pullups, can I don’t use my 10k?
3 - How many bytes are Pixy transmiting?

[edit]

4 - What’s the order of the data sent by pixy?

Thank you in advance

JB

Hello Jonatas,
There is some good information here about I2c, how to hook up to Pixy and the protocol Pixy uses:

http://cmucam.org/projects/cmucam5/wiki/Porting_Guide

Here are several possible ways to power Pixy:

http://cmucam.org/projects/cmucam5/wiki/Powering_Pixy

You can use pin 2 on the I/O connector to provide a regulated 5V supply. (Be careful though! This input is not reverse polarity protected!)

Hope this helps!

Thank you. :slight_smile:

That answers all my questions except one.

About the pullups for I2C?

another question.

why two bytes for each parameter?
(I’m trying to find this information in wiki, but so far, I’m not finding it)

Hello Jonatas,
Pixy does have 4.7K pullups on the I2C signals. This may be sufficient for your application, but it depends on how fast you want the data communication to be. Faster means smaller pull-up resistors. You might try a slow datarate (with the existing pull-up resistors) and go from there.

Why two bytes per parameter? I assume you mean for x, y, width and height in the object blocks? These values are typically beyond the range of 1 byte (0-255).

Hope this helps!

Thank you for your time

I’ll test it and later decide what to do (concerning the pullups).

About the bytes. I’ve achieved communication and saw what pixy is sending. And I don’t see the behaviour (I think) you say. The data I’m getting it’s something like this:

(in decimal, not real values, just for example)

@85
170
85
170
1
1
1
0
23
0
45
0
213
0
198
0@

and it’s always like this. The second byte is always 0. And I tested all camera range.

PS.: sorry for the bad english… Maybe this is an easy question and I’m being too dumb to see, but please be patient with me… I’m a noob and not really a programmer.

Hi Jonatas,
I’m probably not understanding your question. The byte-stream looks good. You are getting two sync words (0xaa55) followed by the checksum, etc. This is an object block. There is more information here:
http://cmucam.org/projects/cmucam5/wiki/Porting_Guide

(look for “object block format”)

Edward

I was confused with some values but now I understand.
I implemented I2C communication with Netduino and it seems all right

Hello Jonatas,
That’s great news! Glad to hear you got it working!

Edward