<< return to Pixycam.com

Change default or build your own app

Hello I started to play with pixy and arduino.

I,m running the hello world example in arduino and the default in pixy.

i would like to start modifing simple thing like i get a message from pixy like :

sig: 2 x: 133 y: 143 width: 179 height: 111 angle 0

i want to get something like this :

133,143,179,111,0

where could i edit this in pixy code for example ?

or how could i start a full pixy code ?

cheers

Hi Abe,

All of the Pixy code is in “this”:https://github.com/charmedlabs/pixy Github repo. The Arduino hello_world.ino source can be found “here”:https://github.com/charmedlabs/pixy/blob/master/src/host/arduino/libraries/Pixy/examples/hello_world/hello_world.ino.

You can clone the repo and make all the edits you want :slight_smile: Let me know if you have any questions finding any specific code.

Good luck!

Scott

Hi Scott , thanks for your reply.

for some reason i can not clone via github the pixy repository but i can clone any other , is that something in my side only , any ideas?

i have some more questions not sure if too open many forum post or is it ok here ?

sorry for newbie question on pixy;D

those are some :

if you change the code from the github source , how do you upload to the pixy ? where are the codes saved in pixy like the example ones in the pixymon i did
not see any editor or to browse new code ?

how do i change the delay of one second to update data i see that in all the arduino examples there is this delay i check
https://github.com/charmedlabs/pixy/blob/master/src/host/arduino/libraries/Pixy/TPixy.h but i did not see such delay parameter?

i was trying to read also direcly the servo out pins in arduino via analog pins but i did not see any good data , what will be the way to read those values from this pins to arduino or other device
just for curiosity?

is it posible to output via analog the x and y in the same time , as far as i read you can set mode 3 for x and mode 4 for y ?

in the examples i see in the serial monitor of arduino for example : detected which will be the count of blobs and block as ID of the blob , will it be posible to get this blob ID as unique so instead of 0,1,2,3 and back to them they are a
diferent number each time a new one ?

if i want to get the texture from pixy in my own app what will be the way to go , so i can get raw data , process data etc as a texture ? i would use directx11 for it.

how to read the data using usb direcly ?

thank you again for your time and patience.

how to read the data using usb direcly ?

Hi Abe,

You can use the QTcpSocket Class and run it from the renderer.cpp to output the coordinates and signatures.
left, right, top, bottom and the blobs[i].m_model.

Emil

Hi Emil thanks for response.

so it is possible to get the blobs data out and receive them via tcp udp in any other app ?

btw it would be great that pixy could send this blob data directly via tuio for example as most tracking systems nowadays as a optional default configuration in pixymon.

i,m planning to get the data in www.vvvv.org i,m not too familiar with c++ mainly vvvv and some c# and hlsl so any example or help welcome.

i could get the data right now directly via serial but i get this default 1 second delay in all the examples not sur how to change it ? also i would rather getting the data in other way for easier parsing of the string.

thanks

Yes, definitely possible. By Tcp it is nearly real time - no delay can be noticed by eye. This way you’re completely bypassing the arduino part. You’ll need to install QT (the latest version) and the 4.8 too, install both and then add the 4.8 version - see here http://qt-project.org/doc/qtcreator-2.6/creator-project-qmake.html, as you need to choose 4.8 to work with pixymon.
From there you can just open the project file they provide in the pixy source code and start by adding the TCP class or UDP if you need that one. Of course try to compile the original code first to see if everything worked. I inserted a line around line 302 in the renderer.cpp where it displays the “s=1” and gives it’s coordinates, so now in addition it immediately sends the data out too.

For the record I used 1.0.2 with the firmware update.

Emil