Project parameters r/t a wireless greenhouse controller

I am in the planning stages for a Greenhouse Wireless Controller Project. For instance, it is important to know how many lines of code I could expect to have available to me. i know some of this may be based on how long a line of code may be, but my main context is, I seem to be having problems trying to understand my compiled code in reference to what is really available to me as per the Arduino IDE we need to use. I realize everything comes at a cost, and maybe Arduino isn't even the correct processor for my project. This is why I'm here. It doesn't appear that Arduino will be able handle hundreds of lines of complex codes and library calls based on the available memory.

In referencing my Greenhouse Wireless Controller Project I need to not only be able to detect: pH TDS Dissolved oxygen Atmospheric CO2 Photo detection Temperature Humidity

Then respond to activate fans, pumps, lights, etc., wirelessly by sending my messages to electrical components so they can be either turned on or off as needed.

Ideally, everything will be controlled through a browser-type interface on a computer that allows me to input parameters on the fly, or possibly through my phone as well.

So please, anyone who is reading this, I am not looking for any programming code at this juncture. This is merely more a theoretical inquiry as to feasibility to be able to include everything I may need to get this job done based on code usage and the limitations of Arduino memory. I don't care which Arduino may be best suited, if at all ,for this venture. Also, more than one Arduino can be used to assist with the interfacing if appropriate.

My programming background is in BASIC, C++ and VB, other than the minimal time I've spent successfully programming my UNO for wirelssly gathering Temp/humidity data through a wireless shield and displaying this to a browser window.

Thank you all for any useful responses to help me better understand the limitations I may be faced with, including my own ignorance. houdinihar

Everything you want to do is possible, but you would be much better looking at one of the larger processors like the Mega or even a Duo, to make sure there is enough memory to handle your code. The requirement to control everything via a web browser, will really chew up memory .

Hi, you may also want to consider Spark Core. This is similar to an Adruino but with a more powerful processor and more memory (very similar to Due in fact). It has built-in wifi and connects to a "cloud" to allow monitoring and control via the web. However, the system is less mature than Arduino and there are fewer libraries available to support your more exotic sensors. The Spark community is very helpful and supportive, much like this forum.


If you are prepared to use two Arduinos you might consider dedicating one to the WiFi connection and communicate between it and the "working" Arduino using cables or Bluetooth or NRF24 modules.

I don't think the work of reading sensors or operating fans, pumps etc will be a big computational job but it might be wise to use a Mega simply because it has lots more I/O pins. I would be cautious about choosing a Due because it is not a main-stream Arduino.

And a RaspberryPi or BeagleBone might be a better choice as the communication device. I guess it could easily be connected to the Arduino Mega by cable to further simplify stuff.


I'd want to do some logging in such a system. Not only sensor data, but output states and commands received. It'll be invaluable when you're debugging and if desired, you can use it to show graphs & charts.

You could just emit such data to an SD card, but I'd be inclined to use something like a Pi to store the log data in a database and serve up the web site - then its complexity won't be restricted by the Arduino's tiny RAM. Let the Arduino concentrate on reading sensors and commanding outputs based on the parameters it gets from the Pi.

Thanks to everyone who has posted so far. I have read all of your posts and been doing more research as well and trying to solidify my starting needs more fully. Here is what I've come across so far:

  1. The single most important factor is to be able to have the microprocessor board be my main independent brain running the works thru good programming code once the sketch is uploaded-always a grand ideal isn't it? And having an independent power source of 2 types: main 110 vAC using a transformer; secondly, good old battery backup in case of power failure.
  2. Seems like the Arduino Yun could handle the code length requirements, plus it has built-in wifi and an SD card reader. Seems good so far. Plus I just read that I could adjust my usable code space by incorporating the SD card. I have a 16Gb one now. Here is the link on that one:
  3. Next, for my other wireless requirements to handle the sensors, etc. I have researched that the Xbees with regulated boards should be able to do all my other wireless needs handily, since they not only can send data thru my Netgear wireless router, or to the Yun, but one can also be programmed to be the necessary Coordinator to send messages to the other uniquely identified partners in the network to get my jobs done, such as turning on or off devices in response to set parameters. That was a potential sticking point in my design concept-being able to uniquely communicate with a particular wireless receiver to get a particular job done. with the Xbees, that problem is solved up front.
  4. Additionally, I believe my data display needs can be helped with Javascript, or another web-based language. I have read several articles dealing with that. This is actually my least necessary item, since plain serial data received from my peripheral wireless nodes is easy enough to display. I'm just looking for another avenue of enhanced display thru my local web server page, that may have graphing capabilities along with usable items on the page including "buttons" to push if necessary to get a job done. Although my goal is to minimize human interaction thru my coding schema, I still want to be able to interact if needed or desired.

Now with this new perspective, I am open for another round of brainstorming here and welcome your ideas and comments. Thank you all, houdinihar

I don't lightly complain about Arduino products but I can't help feeling the Arduino folks are out of their depth with the Yun and that its Linux support is poor.

At this stage in the Yun's development I would choose a RaspberryPi or BeagleBone for the communications plus an Arduino to manage the I/O. I think the total cost would be about the same.


TY Robin2 ,

Point well-taken.

Another thing I discovered on this journey while reading this:

is that "The downside to running a framework like Johnny-Five, is that your Arduino device has to be attached to the computer running your NodeJS/Johnny-Five code. It needs to be available via serial communications so that the Firmata protocol can do it’s job. This means that if you want to create a “production” hardware system that runs independently, you won’t be using Johnny-Five for long."

So this is definitely what I don't want. I need the microprocessor independent of my main computer when all is said and done.


"The downside to running a framework like Johnny-Five, is that your Arduino device has to be attached to the computer running your NodeJS/Johnny-Five code

I don’t know anything about Johhny-Five but I wonder can it run on an RPi.

By the way in another Thread somebody pointed out that i was wrong to think the RPi has Wifi whereas, of course, the Yun does. Not sure if that matters to you.

Unfortunately it doesn’t take away from my concern that the Yun is an unripe fruit.