<< return to Pixycam.com

Arduino memory usage

In looking over the code in the Arduino library for Pixy (arduino_pixy-0.1.2.zip) I notice that it’s designed ao automatically increase it’s usage of RAM up to an amount sufficient for 130 blocks. At 10 bytes/block this translates to 1300 bytes of RAM for just the blocks buffer. Given that many Arduino boards have only 2K of RAM, this using this much RAM in the Pixy driver could be problematic for some users. So, is there some way to reduce, or limit the amount of RAM the library uses?

Also, given that the most blocks an Arduino can see at any one time, it seems like the 1000 blocks max default setting in the Pixy is a bit of overkill, too. I assume yuo would advise reducing this to 130 when used with the current Arduino library.

Wayne

Hi Wayne,

You are correct. We’d recommend reducing the maximum number of blocks in the Pixymon configuration window. As for limiting the amount of RAM the library uses, maybe we’ll add a parameter for you to specify whether it should be conservative with memory. We’re always looking to improve, so suggestions are welcome!

Thanks.

Scott