<< return to Pixycam.com

Outputting X and Y values to non-arduino board

I would like to start out by saying that the pixycam is great! I plan on hooking it up to a non-arduino board, the Dragon12-Plus2-SM model DVB-020SM to be exact. I would need it to output the x and y value of the object. I see that mode 3 will output the x value and that mode 4 will output the y value. Is there a way to output both x and y values simultaneously? My board does have an accelerometer port that fits the connector the pixy ships with so would I be able to put the pixy in mode 0 or is mode 0 only for the arduino board? Does mode 2 output both x and y value? I am sorry if these seem like basic questions I am just starting out with all of this.

Thanks in advance!

EDIT: I am trying to do something very similar to the video you guys have on the kickstarter page with a car following an object. My board does have 3 SPI ports so I think I should be able to connect it to one of those.

If you’re interested in X and Y you should use SPI, I2C or UART. SPI is probably the best because it’s the fastest.

There’s more information here:
http://cmucam.org/projects/cmucam5/wiki/Hooking_up_Pixy_to_a_Microcontroller_like_an_Arduino

Hi Sander,

Pixy can not output both the x and y values simultaneously as analog since there is only one available DAC. I’d suggest you use the SPI communication in order to get both x and y values. Good luck with your project!

Scott

EDIT: Rich beat me to it. The link he provided has more information on what I was referring to.

Thanks for the info guys! I was looking into it and it looked like the SPI was the best bet but I didn’t have everything with me to try it out. Also, when we connect the pixy to the computer it seems that it disconnects a lot. I’m going to try a new usb cable since I saw on the site that some cheaper/longer cables have problems. Any other tips to try out? Thanks guys!

If your Pixy is disconnecting often then I think trying a different/shorter USB cable is a good way to go. The cheaper/longer cables have a large voltage drop across them, which may not provide sufficient power to Pixy.

Scott