mitra42 / frugal-iot

A platform to enable affordable sensor networks
https://drive.google.com/drive/folders/1VRrBSEATjN9i-Fx3X48nKeh_lJCg1sto?usp=sharing
1 stars 2 forks source link

Refactor: Consider reworking as classes #25

Open mitra42 opened 1 month ago

mitra42 commented 1 month ago

The current code is very Arduino-standard, with each .cpp having setup and loop . THis works well for now but ....

It would be worth considering reworking as a class hierarchy Base

Some of the code could then reuse code fragments - so for example the loop could automatically do the nextLoopTime recording if the class had a "MS" member.

One consideration would be saving code memory space, but another would be whether sensors etc then became easier or harder to add to the project.