Editing Python Smart Terminal
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: | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
= Goal = | = Goal = | ||
− | This program is up and running. | + | This program is up and running. Makeing improvements from time to time for my projects. Email me for source code. |
− | + | Provide an open source, programmable rs232 smart terminal in particular for use with microcontrollers like the arduino. Document it well enough so people can relatively easily extend and adapt the program. Make it easy to download and use even for those without a desire to dive into the code. Will assume some knowledge of Python, and a Python Environment to run it in. Currently Python 2.7 | |
+ | '''Actually upgraded to Python 3.6 and a bunch of other enhancements.''' | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
{| class="wikitable" | {| class="wikitable" | ||
Line 91: | Line 43: | ||
|} | |} | ||
− | = | + | = What/Why = |
Almost all my Arduino and other microcontroller projects use serial communications for a least debugging. And in many cases I pair the Arduino with a Raspberry Pi for a very flexible system. A good serial monitor, or terminal program is useful in this sort of project. Because I wanted features not in most terminals and the ability to program it myself, I started one from scratch using Python. | Almost all my Arduino and other microcontroller projects use serial communications for a least debugging. And in many cases I pair the Arduino with a Raspberry Pi for a very flexible system. A good serial monitor, or terminal program is useful in this sort of project. Because I wanted features not in most terminals and the ability to program it myself, I started one from scratch using Python. | ||
− | The program is also designed to be a stand alone data logging, environmental monitoring program. In this case it will kick off and run without an operator. Data | + | The program is also designed to be a stand alone data logging, environmental monitoring program. In this case it will kick off and run without an operator. Data will be access over the web. I will largely leave a discussion of these features to another page, but probably about half the code is devoted to these features. |
− | Currently the terminal waits for a | + | Currently the terminal waits for a cr ( or lf i will check ) until it displays ( or make available for processing ) the received string. This make sense for my application, it help the processing. This may not work best for you, let me know. |
So what are the features? | So what are the features? | ||
Line 110: | Line 62: | ||
* Copy all or part of receive area. | * Copy all or part of receive area. | ||
* Programmable | * Programmable | ||
− | |||
* Database Interface ( now MYSQL can connect across the network ) | * Database Interface ( now MYSQL can connect across the network ) | ||
− | |||
* Easily Modified or Replaceable GUI | * Easily Modified or Replaceable GUI | ||
* Parameter file for wide range of modifications of program behavior. | * Parameter file for wide range of modifications of program behavior. | ||
Line 118: | Line 68: | ||
* Uses standard Python logging class. | * Uses standard Python logging class. | ||
* Includes some advanced data logging features in addition to database data logging. | * Includes some advanced data logging features in addition to database data logging. | ||
− | |||
Limits: | Limits: | ||
− | * | + | * Pools the comm port at 10 to 100 hz. So full lines ( end with <cr> ) cannot come in too fast. This is theory I have not pushed the terminal. |
* One instance of the program per com port at a time, but easy to run multiple instances. | * One instance of the program per com port at a time, but easy to run multiple instances. | ||
Line 134: | Line 83: | ||
== My Environment/Your Environment == | == My Environment/Your Environment == | ||
− | The program has a better chance of running if your environment is not too much different from mine. The most important is that it is Python | + | The program has a better chance of running if your environment is not too much different from mine. The most important is that it is Python 2.7 or compatible. |
Before you begin to install you should know a bit about the environment that I have used to build, test and run the terminal. If your environment differs too much you may have trouble getting it to run. | Before you begin to install you should know a bit about the environment that I have used to build, test and run the terminal. If your environment differs too much you may have trouble getting it to run. | ||
− | I run Python mostly using the install that comes with Anaconda Spyder and often use the IDE it installs. This is not necessary, it is just an nice install that downloads a lot of stuff that technical folks find useful. I have use conda and pip to add to this install and do not know offhand all that is in it. | + | I run Python mostly using the install that comes with Anaconda Spyder and often use the IDE it installs. This is not necessary, it is just an nice install that downloads a lot of stuff that technical folks find useful. I have use conda and pip to add to this install and do not know offhand all that is in it. It is Python 2.7. You can look at the include statements to get some idea of what you might need to add. Or you can just keep running it and add the packages it complains about. |
− | |||
== Download == | == Download == | ||
− | + | I have not quite decided where to host the source code ( it is Python and you can run directly from the source ) so email me ( use this link [[User:Russ_hensel]] ) to get access. | |
You will get a zip file, unzip it and you should get: | You will get a zip file, unzip it and you should get: | ||
Line 149: | Line 97: | ||
.... whatever --| | .... whatever --| | ||
| | | | ||
− | |-- | + | |-- SmartTerminal |
− | + | ||
− | + | ||
− | |||
− | |||
− | |||
Put them in your system making "....whatever" anything convenient for your Python ( that is move the files to where you keep your Python source ). | Put them in your system making "....whatever" anything convenient for your Python ( that is move the files to where you keep your Python source ). | ||
Line 218: | Line 163: | ||
= Design = | = Design = | ||
− | + | [[Python Smart Terminal Technical]] | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
= Additional Info = | = Additional Info = | ||
*Click on the category smart terminal below ( and perhaps the others as well ) | *Click on the category smart terminal below ( and perhaps the others as well ) | ||
− | |||
− | |||
*[[Debugging the Smart Terminal]] | *[[Debugging the Smart Terminal]] | ||
− | *[[Smart Terminal as Smart Data Logger]] obsolete | + | *[[Smart Terminal as Smart Data Logger]] obsolete |
*[[Smart Terminal GUI]] | *[[Smart Terminal GUI]] | ||
*[[GreenHouse Monitor Program]] | *[[GreenHouse Monitor Program]] | ||
*[[Smart Terminal Parameter Examples]] | *[[Smart Terminal Parameter Examples]] | ||
− | |||
*[ https://github.com/russ-hensel/python_smart_terminal python_smart_terminal at git hub] | *[ https://github.com/russ-hensel/python_smart_terminal python_smart_terminal at git hub] | ||
*[http://www.instructables.com/id/Python-Terminal-for-Cheap-Pi-Arduino-Connection/ Python-Terminal-for-Cheap-Pi-Arduino-Connection/] Info on much earlier version may or may not be useful. | *[http://www.instructables.com/id/Python-Terminal-for-Cheap-Pi-Arduino-Connection/ Python-Terminal-for-Cheap-Pi-Arduino-Connection/] Info on much earlier version may or may not be useful. | ||
− | + | [[category:Python]] [[Category:Arduino/RaspberryPi]] [[Category:SmartTerminal]] |