Grow Room Controller

I just finish publishing my first big project :grin:. It's a grow room controller that uses an Real-time clock and the TimeAlarms library to control a grow light, the arduino takes readings using a SHT15 digital temperature and humidity sensor that allows it to maintain the temperature using a heater and exhaust fan. It also logs data and events in two separate files and organizes them in a directory structure like so: "YEAR/MM/DD/". The controller displays info using a Serial LCD display and debug info over the Serial Port. I consider myself a learned novice at C++ so it's code is not to awesome :cold_sweat: (I think it could lose some weight considering it takes 32Kb :fearful:). Any polite criticism is appreciated :slight_smile:
Here's a link to my project page: http://arduinogrc.blogspot.com/

Code looks not bad, reasonable amount of comments, good use of functions (did not scan all 900 lines :wink:

I see some repeating patterns that could be combined in some functions (esp LCD math to display values /10 & %10 )

Furthermore you use Strings quite extensively, rewriting the code so you use only char arrays could shorten your code.
Yes you should estimate how long the arrays need to be but that is not too complex.

robtillaart:
Code looks not bad, reasonable amount of comments, good use of functions (did not scan all 900 lines :wink:

I see some repeating patterns that could be combined in some functions (esp LCD math to display values /10 & %10 )

Furthermore you use Strings quite extensively, rewriting the code so you use only char arrays could shorten your code.
Yes you should estimate how long the arrays need to be but that is not too complex.

Awesome. I'll work through those and release an update along with a version that'll fit on an Uno once the code loses enough weight lol
Thank you for you input :slight_smile:

I Just finished. Again, thank you rob for for looking it over, I did what you said and now there's only one string(which is a function) and the code for displaying numbers on the LCD is streamlined. It is now small enough to fit on an Arduino Uno and I saved enough space to add a humidity controller :grin:.
Check it out: arduinogrc.blogspot.com

Another step to take is to place const char array's in flash memory, so they will not use precious RAM. Search for PROGMEM ...

Looks like a sweet little project :slight_smile: I have to ask; what crop are growing? ]:smiley:

Great job. One addition could be using your ethernet sheild to tweet status changes: "Boy it's cold in here [15C], turning heater on." You could then view the twitter stream to see what it's up to in real time, which would avoid you having to download files from the SD card.

supercrab:
I have to ask; what crop are growing? ]:smiley:

Personally I don't want to know... :zipper_mouth_face:

Heh, no pics of the grow room. 8)

now there's only one string

If you meant String it would be nice to get rid of that as well so you don't pull the String library in at all. That must be fairly large.


Rob

Hey fellow growers!

We're starting the first open source growing platform (using the Arduino) so that we can automate the growing process and learn together as a community!

Checkout our project on Kickstarter! Your support and comments are greatly appreciated.

Learn together and grow together - we couldn't be more excited!

ryanwoltz:
Hey fellow growers!

We're starting the first open source growing platform (using the Arduino) so that we can automate the growing process and learn together as a community!

Checkout our project on Kickstarter! Your support and comments are greatly appreciated.

Learn together and grow together - we couldn't be more excited!

  1. Don't necropost.
  2. How are you the first OS growing platform when ArduinoGRC and GardenBot already exist? Had you read the OP you would know this.
  3. Stop spamming your kickstarter, you degenerate.