Editing SmartTerminal for Controlino
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
= What = | = What = | ||
− | This is part of the [[Instrumentino/Smart Terminal Challenge]]. In this part I am going to try to adapt the SmartTerminal ( PC/Python ) [[Python Smart Terminal]] to the ( microcontroller ) Controlino program [[Controlino Notes]]. | + | This is part of the [[Instrumentino/Smart Terminal Challenge]]. In this part I am going to try to adapt the SmartTerminal ( PC/Python ) [[Python Smart Terminal]] to the ( microcontroller ) Controlino program [[Controlino Notes]]. |
− | |||
= First Connection = | = First Connection = | ||
− | + | Here we will just try to establish a basic connection between the two programs, typically this involves matching the communications parameters. Baud rate is, perhaps, the most basic. | |
Steps: | Steps: | ||
− | * go to | + | * go to Controlino program find baudrate #define SERIAL0_BAUD 115200 |
* go to SmartTerminal parameters.py and define a new mode Controlino: ( this code is near the top of parameters.py and you will see a bunch of modes defined there, likely with several comented out, remember the lats value set is the one that wins. Your code should then look something like: | * go to SmartTerminal parameters.py and define a new mode Controlino: ( this code is near the top of parameters.py and you will see a bunch of modes defined there, likely with several comented out, remember the lats value set is the one that wins. Your code should then look something like: | ||
<pre> | <pre> | ||
− | + | self.mode = "GreenHouse" # add sensor processing, monitoring and logging for greenhouse sensors | |
# self.mode = "IR" | # self.mode = "IR" | ||
# self.mode = "MotorDriver" # special buttons, send arrays for motor controller arduino | # self.mode = "MotorDriver" # special buttons, send arrays for motor controller arduino | ||
Line 17: | Line 16: | ||
</pre> | </pre> | ||
− | ** defining a mode | + | ** defining a mode is not really needed but this way it is easy to turn on and off the Controlino settings. |
** find self.baudrate and add at end of baud rate section | ** find self.baudrate and add at end of baud rate section | ||
<pre> | <pre> | ||
if self.mode == "Controlino": | if self.mode == "Controlino": | ||
− | self.baudrate = 19200 | + | self.baudrate = 19200 |
</pre> | </pre> | ||
Line 93: | Line 92: | ||
= Automation = | = Automation = | ||
− | == Make | + | == Make co_processing == |
− | Here we will automate the above. This is done by creating a class called ControlinoProcessing in | + | Here we will automate the above. This is done by creating a class called ControlinoProcessing in co_processing.py and inserting/editing the code. To make this easier we will copy another processing unit of code. Copy gh_processing.py and save as co_processing.py |
+ | |||
== Edit Parameters == | == Edit Parameters == | ||
Line 173: | Line 173: | ||
I am going to give directions using the same style of Tkinker coding that I have used, but other style can also work, you just have to make sure the widgets link to the correct code. | I am going to give directions using the same style of Tkinker coding that I have used, but other style can also work, you just have to make sure the widgets link to the correct code. | ||
− | |||
− | |||
− |