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:
= Why this Terminal =
 
 
This terminal has a variety of uses, most are focused on interaction with
 
micro controller projects where ASCII data is exchanged, typically with messages
 
terminated with a newline or carriage return ( typical for most Arduino projects).
 
 
It is also intended for those with a minimal understanding of Python ( required skill
 
ranges from the vary basic to familiarity with multi-threaded applications ).
 
 
Its repository includes several examples of projects where the interaction is
 
either with a PC ( windows, mac, or Linux ) or a raspberry pi ( Linux ).
 
 
Applications may be set up so control of the Arduino is manual, or entirely
 
automated.
 
 
If this is the case there are many ways to use it:
 
 
* Base Case
 
Use as a replacement for an Arduino serial monitor.  One nice feature is multiple places for user input, each of which is remembed until changed.
 
 
* Base Case Plus
 
Typically the micro controller is used with a small number of command strings, typically just a few letters, and in complicated cases more complicated strings.  The terminal can be set up with these preloaded and with a button that "documents" their use.  This can be very nice for debugging or manually controlled projects.
 
 
* Automatic modes
 
The automatic mode implements the "Base Case Plus" but there is additional code running in another thread that makes the entire operation automatic and is intended for projects that just "run".  In my case all these projects are used with a raspberry pi plus Arduino.  This typically gives the project:
 
** high speed response in the Arduino code ( micro second )
 
** internet access wifi and cat5
 
** bluetooth support
 
** Python and other high level program support
 
** Graphical interface support via remote terminal to a raspberry pi.
 
** HTTP server support
 
** Email access
 
** Remote terminal support -- either Desktop GUI or ssh terminal
 
 
I have example code for these applications included in the repository that I have completed as projects of my own.
 
 
 
= Goal =
 
= Goal =
This program is up and running.  Making improvements from time to time for my projects.  Code at GitHub, see [[https://github.com/russ-hensel/python_smart_terminal Code at GitHub]] See the GUI here at [[Smart Terminal GUI]]
+
This program is up and running.  Makeing improvements from time to time for my projects.  Code at GitHub, see [[https://github.com/russ-hensel/python_smart_terminal Code at GitHub]]
 
 
SmartTerminal an open source, programmable rs232 smart terminal in particular for use with micro controllers like the arduino.  My motivation for writing it was first to aid in managing and debugging micro controller projects, and then actually becoming part of hybrid raspberry pi / arduino projects.  The program can run in many modes ( which you can create if you wish ).  Included in the repository is the code for many modes that I have created, each normally paired with an arduino application ( code may be posted, contact me if interested ) to produce a final application.  For more information on these projects see the category Arduino/RaspberryPi.
 
 
 
This program is designed to be:
 
*Easily configurable through a configuration file parameters.py
 
*Easily extended with additional modules, several of which are in the code at GitHub and can be activated with a simple change to the parameter file.
 
  
I think it is documented well enough so people can relatively easily extend and adapt the program.  It easy to download and use even for those without a desire to dive into the code.  I assume some knowledge of Python, and a Python Environment to run it in.  Was Python 2.7 now upgraded to Python 3.6 and a bunch of other enhancements.  See features below.
+
SmartTerminal an open source, programmable rs232 smart terminal in particular for use with microcontrollers like the arduino.  I think it is documented well enough so people can relatively easily extend and adapt the program.  It easy to download and use even for those without a desire to dive into the code.  I assume some knowledge of Python, and a Python Environment to run it in.  Was Python 2.7 now upgraded to Python 3.6 and a bunch of other enhancements.  See features below.
  
See the graphical user interface here ( with screen shot ): [[Smart Terminal GUI]]
+
See the graphical user interface here (lots of screen shots): [[Smart Terminal GUI]]
 
 
This application is also part of a family of applications see the category below: Python Projects.
 
  
 
This is an article started by Russ Hensel, see "http://www.opencircuits.com/index.php?title=Russ_hensel#About My Articles" About My Articles for a bit of info.
 
This is an article started by Russ Hensel, see "http://www.opencircuits.com/index.php?title=Russ_hensel#About My Articles" About My Articles for a bit of info.
Line 91: Line 47:
 
|}
 
|}
  
= More on What and Why =
+
= 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.
Line 134: Line 90:
 
== 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 3.6 because of fstrings.
+
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.  '''No now Pyton 3.6'''
 
    
 
    
 
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.    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.
 
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.    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.
There is an informal requirements.txt in the repository that may be helpful.
 
  
 
== Download ==
 
== Download ==
Line 149: Line 104:
 
     .... whatever --|
 
     .... whatever --|
 
                     |
 
                     |
                     |-- smart_terminal --| -> all code required to run the application ( not sure if smart_terminal or python_smart_terminal or nothing is top level name, just put it in some well named place )
+
                     |-- SmartTerminal
                                          |    some logs from my running of the code may or may not be present, these will be deleted as they creep in, when you run the program you will
+
 
                                          |    get your own log files ... all typically named xxx.py_log
+
 
                                          | -- images -> image files, mostly screen shots, icons... or what ever, not important for the code.
 
                                          | -- sounds -> wav files used for the deer me extension, my attempt to scare deer.
 
                                          | -- wiki_etc -> various files documenting program, including at least some of the material from this wiki
 
  
 
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 217: Line 169:
  
 
= Design =
 
= Design =
 
Description of the design, and a bit to help you figure out what the files do ( for .py files also see the top of file ).
 
  
 
see: [[Python Smart Terminal Technical]]
 
see: [[Python Smart Terminal Technical]]
Line 236: Line 186:
 
*[[GreenHouse Monitor Program]]
 
*[[GreenHouse Monitor Program]]
 
*[[Smart Terminal Parameter Examples]]
 
*[[Smart Terminal Parameter Examples]]
*[[Python Desk Top Applications]]
 
 
*[ 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 Projects]] [[category:Python]]  [[Category:Arduino/RaspberryPi]] [[Category:SmartTerminal]] [[Category:Serial Communications]]
+
[[category:Python]]  [[Category:Arduino/RaspberryPi]] [[Category:SmartTerminal]]

Please note that all contributions to OpenCircuits may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see OpenCircuits:Copyrights for details). Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)