Editing Python Smart Terminal Technical Details
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: | ||
This page is for some fairly fine scale detail on how things are implemented in the Smart Terminal, they may be useful as techniques in other applications. See also: [[Russ Python Tips and Techniques]] | This page is for some fairly fine scale detail on how things are implemented in the Smart Terminal, they may be useful as techniques in other applications. See also: [[Russ Python Tips and Techniques]] | ||
− | = | + | = Comm Port Details = |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
In the parameter file there is a setting for the comm port, this is typical of all communications programs. Other parameters hold other comm port values. Again typical. There are however, some less typical additions. | In the parameter file there is a setting for the comm port, this is typical of all communications programs. Other parameters hold other comm port values. Again typical. There are however, some less typical additions. | ||
Line 19: | Line 7: | ||
== Comm Port Validation == | == Comm Port Validation == | ||
− | + | * So you open a comm port, the first level of validation is that the port opens. | |
+ | * The second level of validation is that the port can send and receive, this is checked by sending a text string and looking for a response. | ||
+ | * The third level is to look at the received string. If it contains the correct substring then the port is valid. | ||
− | + | For example the terminal may send "v<cr>", recieve "GreenHouse Monitor v3 2017 01 24.01<cr>", and look for "GreenHouse" in the recieved string. This would validate the port. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | So what does the terminal send and what does it look for -- see the parameter file" | |
− | |||
− | So what does the terminal send and what does it look for -- see the parameter file | ||
<pre> | <pre> | ||
Line 36: | Line 19: | ||
# the arduino is supposed to respond to a version request with a string | # the arduino is supposed to respond to a version request with a string | ||
# containing this, they are part of the name of an Arduino application | # containing this, they are part of the name of an Arduino application | ||
+ | self.get_arduino_version = "v" | ||
− | + | self.arduino_version = "GreenHouse" | |
− | |||
− | self.arduino_version = "GreenHouse" | ||
</pre> | </pre> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |