
I’ve been meaning to make a nice little function to test available memory for some time, so tonight in response to a mailing list question, I went ahead and created an Arduino Available RAM Test for exploring memory allocation.
While I’m still learning about AVR’s memory management, here’s what I understand so far: The ATMEGA8 has 8K of program memory but only 1K of RAM. (Program memory is for code and RAM is for dynamic variables.) Actually it’s effectively less than 1K of RAM, I think because the Arduino libraries take up some dynamic memory space for themselves. The ATMEGA168 increases program memory to 16K, but RAM remains unchanged at 1K.
The Arduino environment will happily let you compile a program that exceeds the microcontroller’s RAM limits, however program behavior will become totally unpredictable, the code will do bizarre things and/or crash. It is equally difficult to describe the negative emotional results for the coder. Dysphoria comes to mind.
Hopefully, the Arduino Available RAM Test code can provide a pathway back to happiness, or at least cathartic understanding.

Botanicalls plants now can check on each other before making phone calls–part of my Sociable Objects thesis that explores using local sources to drive better-informed behaviors. Here’s the scenario:
Fiddle-leaf fig is low on light. Its light level for the last two days is only 30% of optimal and its Botanicalls event sensor is triggered. But is it time to make a phone call? As a Sociable Object device, its decisions don’t need to rely on single data points. The fig begins making contact with the Botanicalls plants around it. If they haven’t gotten enough light either recently, the call for help will be postponed because it’s probably been cloudy and that’s not a reason to disturb humans with a useless phone call. However in this case the spider plant, cuban oregano and prayer plant all respond that their light levels are close to optimal. So it’s not cloudy and Fiddle-leaf fig places a call for help.
Next steps will be checking the solar panel on ITP’s roof, the broadcast time clock and at least one interactive project so that the plant can double-check on sun, know it’s daytime, and detect that someone is around to answer its calls.