Skip to content

A guide for the code in Incuvers V1.9

Tim Spekkens edited this page Mar 16, 2018 · 1 revision

While version 1.9 was derived from the earlier code, the project was segmented into various files so that maintenance would be easier to handle. Another reason for the change is that, as of the time I write this, version 1.9 with no debugging code compiles to 30,044 bytes which uses up 93% of the ATmega328 flash space in order to support the Heat, Cozir CO2 sensor, and Luminox O2 sensor along with the settings, UI, serial wrapper, and required libraries.

With the constrained space in mind, adding extra functionality or support for alternate models of sensor will be tight. In a quick test, adding a preprocessor definition and wrapping the Luminox O2 sensor code in an #ifdef and providing a blank skeleton of the class in a matching #ifndef shrinks the sketch to 27,082 bytes giving us back 10% of the resources which could now be used for other functionality. If testing with this change goes well I'll likely extend it to all modules. This would allow the main code repository to include code for a variety of sensors and situations but still ensure that users can easily download the source, include the parts that correspond to their hardware and needs and still end have a sketch which is under 32 kilobytes in size.

Clone this wiki locally