<< return to Pixycam.com

Pixy program operation system

Hi

I only know some knowledge of C/C++ and others are poor.

In my coding project, there are only init() and loop() which the structure and routine are very simple and clear.

But now when I read pixy codes @src\device\video\exec.cpp@ , I think the exec_loop() is so complex that I don’t understand the background procedure. Is it a lite operation system in exec.cpp? In exec_run(), there are only assign values for flags, so where choose the program and run it?

What is in Chirp.c/Chirp.cpp/Chirp.hpp? What is the role of g_chirpUsb? I think g_chirpUsb is a variable for USB connection, but I found it may be more than a connection variable.

Thank you

Lin

Hi Lin,

There is no operating system running on Pixy. The exec.cpp is meant to provide a simple way to create Arduino-like programs (with init and loop) on Pixy. exec.cpp just manages the “programs” that are written this way. I’m not sure which flags you’re talking about exactly, but just keep in mind that the variables with the “g_” prefix are global variables and can be set anywhere within the Pixy firmware, even through Pixymon.

As for g_chripUsb, this is a reference to the Chirp USB connection/protocol, which is a special communication protocol written just for Pixy. So its not just a USB connection, but essentially a wrapper around the connection that encodes/decodes the data to/from the Chirp format.

Hope this clears things up.

Scott