Difference between revisions of "Smart Terminal Parameter Examples"
Russ hensel (talk | contribs) |
Russ hensel (talk | contribs) |
||
Line 23: | Line 23: | ||
*More see the file. | *More see the file. | ||
− | + | = An Intermediate Difficulty Parameter Example = | |
*This is based on the file ..../smart_terminal/example_parms/parameters_intermediate.py. | *This is based on the file ..../smart_terminal/example_parms/parameters_intermediate.py. | ||
Line 32: | Line 32: | ||
== What the Parameter File Does == | == What the Parameter File Does == | ||
− | * | + | *Everything the basic file does plus the following. |
− | *.... | + | *The SmartTerminal needs some additional code to support the GreenHouse arduino program. The code is '''gh_csv_processing.GHCSVProcessing'''. To cause this to be loaded we have the following: |
+ | |||
+ | <pre> | ||
+ | .... | ||
+ | elif self.mode == "GreenHouseCSV": | ||
+ | # this is the module and class name of another class that will be built to support | ||
+ | # automatic processing of a anduino monitoring a greenhouse | ||
+ | # this also adds buttons to the gui | ||
+ | self.ext_processing_module = "gh_csv_processing" | ||
+ | self.ext_processing_class = "GHCSVProcessing" | ||
+ | |||
+ | </pre> | ||
+ | |||
+ | In the code above we use the "meta" parameter self.mode to make it easy to switch on/off these settings. | ||
+ | |||
+ | |||
*More see the file. | *More see the file. | ||
Revision as of 06:16, 8 February 2017
Contents
What/Why
A lot of the behavior of the terminal is controlled by the file parameters.py. My own files have grown to be quite complicated with modifications to match many different arduino projects, and to automatically adjust to different hardware and software environments.
Because of this complexity I am providing a set of parameter files that you can use more easily as a basis for your own. These are in a subdirectory example_parms. To use copy one over into the smart_terminal directory and rename to parameters.py. I will start by explaining the file parameters_basic.py, and later explain more powerful and complex files.
The details of each parameter are commented in the parameter files, and you may also find it helpful to search the other SmartTerminal files to find their use. If at any point you find it useful to add parameters that is ok as long as you do not use a name already in use.
Basic Parameter Example
- This is based on the file ..../smart_terminal/example_parms/parameters_basic.py.
- The parameters are all that are needed for a basic terminal application, nothing fancy but all the basics, and much more than the arduino serial monitor.
- Well commented read the file!
What the Parameter File Does
- Sets part of the title of the application.
- Sets the communications parameters.
- Specifies a program for file editing.
- Sets the size of the application.
- Defaults data to be sent.
- Change number of send areas.
- More see the file.
An Intermediate Difficulty Parameter Example
- This is based on the file ..../smart_terminal/example_parms/parameters_intermediate.py.
- The parameters include all the basic parameters plus ones to support a greenhouse arduino monitor.
- You should also look at the arduino application and the SmartTerminal extension to support it GreenHouse Monitor Program as they are closely related.
- Well commented read the file!
What the Parameter File Does
- Everything the basic file does plus the following.
- The SmartTerminal needs some additional code to support the GreenHouse arduino program. The code is gh_csv_processing.GHCSVProcessing. To cause this to be loaded we have the following:
.... elif self.mode == "GreenHouseCSV": # this is the module and class name of another class that will be built to support # automatic processing of a anduino monitoring a greenhouse # this also adds buttons to the gui self.ext_processing_module = "gh_csv_processing" self.ext_processing_class = "GHCSVProcessing"
In the code above we use the "meta" parameter self.mode to make it easy to switch on/off these settings.
- More see the file.