Use this command to see the cpu info::
Use this command to see the memory info:
This gives a lot of hardware related info:
Use this command to get PCI bus info:
I tested this on centOS. You can get the OS from this command:
I haven’t worked on the Tri-Temp project in a while. I am going to go through and update the code a bit to lower the memory usage based on what I’ve learned for the LCC projects.
The original LCC code will have an update posted soon too. Mostly memory updates and a few control changes. I wasn’t sure if I wanted to bother but since the original LCC is still running my lizard’s climate I figured why not.
I’ve been programming for most of my life. Very very rarely have I had issues with memory or lack of memory.
Now that I’m hot an heavy into microcontroller programming I’ve stumbled across an issue that has apparently been causing me issues without me know it it.
Lack of memory!
The ATmega328 series chip that is the brain of the typical Arduino board has 3 memory locations.
- The Flash is typically 32k bytes. This is what the Arduino IDE tells you about when you compile/upload your code.
- The SRAM is something no one told me about…this is the actual operating program memory space (RAM). This is where your app runs and lives. Your variables live here. When this space is used up things get wonky. The Arduino crashes or worse does strange unexplainable things.
- The EEPROM is generally not used by the average programmer so I won’t cover it here.
JeeLabs has a killer write up on the SRAM and…wait for it….how to see how much is used!
I added their little function to output RAM usage and holy cow. I had it all used up!
So I had to learn about memory management. Lesson one- strings use up a lot of space!
JeeLabs also has a killer write up on how to optimize your string usage. READ IT! The Arduino site also has a write up on how to use the Flash memory for storing static variables too.
After all this learning I finally got my code “optimized”. I thought my latest project was a gonner but putting variables in Flash, dumping A LOT of debug code made a huge difference. I went from zero bytes of RAM and crashes to about 646 bytes free. Doesn’t sound like much but when you only have 2048 bytes to start with, that’s pretty good!
Now to figure out how to have my debug code and still keep the memory usage low!