Difference between revisions of "GreenHouse Monitor Program"

From OpenCircuits
Jump to navigation Jump to search
Line 1: Line 1:
 
= What =
 
= What =
This is an arduino program intended to monitor the environment in a green house.  It has a simple command driven interface.  It is designed to run with [[Python Smart Terminal]]  Documentation on the construction of a Smart Terminal extension to support the green house monitor and save its data to a csv file are also part of this project.
+
This is an arduino program intended to monitor the environment in a green house.  It has a simple command driven interface.  It is designed to run with [[Python Smart Terminal]]  Documentation on the construction of a Smart Terminal extension to support the green house monitor and save its data to a csv file are also part of this project and the documentation here.
  
 
= Source Code =
 
= Source Code =

Revision as of 06:49, 7 February 2017

What

This is an arduino program intended to monitor the environment in a green house. It has a simple command driven interface. It is designed to run with Python Smart Terminal Documentation on the construction of a Smart Terminal extension to support the green house monitor and save its data to a csv file are also part of this project and the documentation here.

Source Code

Still working on where I will keep the source. It is open source, email me in the meantime: User:Russ_hensel The code is pretty straight forward, the heavy lifting is all left to the Python Smart Terminal. Look at the category SmartTerminal.

Commands

Commands are single letter strings, in some cases followed by numbers. All end with a <cr>. All envoke responses all of which also end with <cr>

Command Purpose Send Response Comment
Get version of arduino software v GreenHouse Monitor v3 2017 01 24.01 Of course exact string changes with version. This string is used by the SmartTerminal to verify the arduino connection.
Aquire Data a ok Data is held in arduino memory, access with further commands.
Get the Temperature t 33.0 60.0 In this version there are 2 sensors.


Smart Terminal Extension

In general when you want to make an extension you should find one that is similar to the one you want, copy it, then tweak the code. This description will not quite do that because the extension ( and arduino program ) are already written.

Copy Some Code

All the extensions that are written are in modules with names of the form xxx_processing. Look at the file headers .... and pick one to copy. If you run this copy it should start up without too much trouble. But how do you get the code to execute? Say your module ( file ) is my_processing.py and the class name ( which you will probably change when you make the copy ) is MyProcessing. You do not run your module, you run SmartTerminal. The trick is to first make some changes to the parameter file. What you need is to make sure that at the end of creating a Parameter class the final setting reflect something like:

     self.ext_processing_module      = "my_processing"
     self.ext_processing_class       = "MYProcessing"

are the setting that are made last.