<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://www.opencircuits.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Russ+hensel</id>
	<title>OpenCircuits - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://www.opencircuits.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Russ+hensel"/>
	<link rel="alternate" type="text/html" href="http://www.opencircuits.com/index.php?title=Special:Contributions/Russ_hensel"/>
	<updated>2026-09-03T04:00:36Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.34.2</generator>
	<entry>
		<id>http://www.opencircuits.com/index.php?title=Resistors&amp;diff=93212</id>
		<title>Resistors</title>
		<link rel="alternate" type="text/html" href="http://www.opencircuits.com/index.php?title=Resistors&amp;diff=93212"/>
		<updated>2025-02-14T14:45:57Z</updated>

		<summary type="html">&lt;p&gt;Russ hensel: Protected &amp;quot;Resistors&amp;quot; ([Edit=Allow only administrators] (expires 13:45, 14 March 2025 (UTC)) [Move=Allow only administrators] (expires 13:45, 14 March 2025 (UTC)))&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{stub}}&lt;br /&gt;
&lt;br /&gt;
This article is being split into components check for duplication prior to updataing.  You can find the components at ??&lt;br /&gt;
&lt;br /&gt;
== Resistors ==&lt;br /&gt;
Probably the most basic component, just a hunk of wire ( low resistance ) or a long thin wire ( high resistance ). &lt;br /&gt;
&lt;br /&gt;
When a voltage is applied to the two ends of an object, then a current usually flows through the object. If the object resists the voltage then the current will be small, if it does not then the current will be high. The amount of resistance is, tactfully, called the resistance. It is measured in ohms. ( Note that acting as a resistor is the simplest thing the object can do, there are more complicated behaviors, see capacitor, diodes, inductors, etc. A resistor is pretty much the simplest of electrical components.&lt;br /&gt;
If almost no current flows we call the object an insulator, if a large current flows we call it a conductor. We often view a wire as a resistor of 0 ohms and an insulator as a resistor of infinite ohms. The key equation for a resistor is:&lt;br /&gt;
&lt;br /&gt;
 R=V/I&lt;br /&gt;
&lt;br /&gt;
where I = current ( unit: amperes, amps )&lt;br /&gt;
V = voltage ( unit: volts )&lt;br /&gt;
R = resistance ( unit: ohms = volts per amp )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
List of standard 1% resistors.  If you want 1% resistors, you must pick from this list or you will pay a fortune for the resistor, assuming you can ever get it.&lt;br /&gt;
Interpret these numbers as the &amp;quot;mantissa&amp;quot; of the value.  &lt;br /&gt;
You can multiply the value by anything from 0.01 to about 100,000.&lt;br /&gt;
&lt;br /&gt;
100 102 105 107 110 113 115 118 121 124 127 130 133 137 140 143 147 150 154 158 162 165 169 174 178 182 187 191 196&lt;br /&gt;
200 205 210 215 221 226 232 237 243 249 255 261 267 274 280 287 294 &lt;br /&gt;
301 309 316 324 332 340 348 357 365 374 383 392 &lt;br /&gt;
402 412 422 432 442 453 464 475 487 499 &lt;br /&gt;
511 523 536 549 562 576 590&lt;br /&gt;
604 619 634 649 665 681 698 &lt;br /&gt;
715 732 750 768 787 &lt;br /&gt;
806 825 845 866 887 &lt;br /&gt;
909 931 953 976&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Uses&lt;br /&gt;
*current limiting:&lt;br /&gt;
Putting a resistor in a circuit, usually in series with another component it will reduce the current in the circuit, this is often useful to protect the other component. Very common to limit the current in a LED.&lt;br /&gt;
current sense:&lt;br /&gt;
When a resistor is in series with a circuit the voltage across it will vary with the current ( ohms law ) Sometimes we do this with a low value of resistance and use the voltage across the resistor to measure or control the current.&lt;br /&gt;
*Isolation : &lt;br /&gt;
A resistor between but connecting 2 components will tend to equalize their voltage, but only using small currents. It the components “want to go there own way, voltage wise” all they need do is put out a small current. For example people will sometimes ground themselves through a 10 mega ohm resistor. This tends to bring them to ground voltage, but they are protected from a deadly shock because most voltages cannot push a lethal current through 10 megs.&lt;br /&gt;
*pull up or pull down:&lt;br /&gt;
Sometimes a component will have a very high resistance to both the positive and negative side of the power supply and the voltage can easily drift around due to more or less random events. Under these conditions we will often connect a resistance ( typically around 10 K ohms ) to either the positive or negative side of the power supply. If to the positive side it is called a pull up resistor, if to the negative side a pull down resistor.&lt;br /&gt;
*voltage divider: &lt;br /&gt;
A voltage divider takes some voltage as an input and has an output that is some fraction of the input ( from 0 to 1 ) A volume control is usually some sort of voltage divider.&lt;br /&gt;
&lt;br /&gt;
Links&lt;br /&gt;
&lt;br /&gt;
#[http://www.resistorguide.com/what-is-a-resistor/  All about resistors]&lt;br /&gt;
#[http://www.piclist.com/techref/resistors.htm  Components: Resistors]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Inductors Resistor From Wikipedia, the free encyclopedia]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Pull_up_resistor Pull-up resistor From Wikipedia, the free encyclopedia]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Voltage_divider Voltage divider rule From Wikipedia, the free encyclopedia]&lt;br /&gt;
#[http://www.radio-electronics.com/info/data/index.php Electronics and radio components] see section on '''Resistors'''&lt;br /&gt;
&lt;br /&gt;
=== Carbon ===&lt;br /&gt;
The most common found resistor is the carbor film. Theses are generally the cheapest and most used in devices. The commonly are designed to withstand 1/8, 1/4, 1/2, and 1 watts of power. Much more information on [http://www.resistorguide.com/carbon-film-resistor/  carbon film resistors].&lt;br /&gt;
&lt;br /&gt;
=== Metal Film ===&lt;br /&gt;
The resistive material is a thin metal film in which a spiral is cut to produce the desired resistance, see [http://www.resistorguide.com/metal-film-resistor/  metal film resistors]&lt;br /&gt;
&lt;br /&gt;
=== Wire-Wound ===&lt;br /&gt;
The resistive material is wire, typically wound on a bobbin.  Useful for cheap and accurate resistance, but has significant inductance compared to film resistors.  Some may be wound in one direction, others half in one direction half in the other, this second method reduces but does not entirely eliminate the inductance.  Very common in the range of 5 watts and up.  Beware of these for use.&lt;br /&gt;
&lt;br /&gt;
=== Precision ===&lt;br /&gt;
Accurate to 1% of marked value or better.  In the old days even a 5% resistor was considered precision.&lt;br /&gt;
&lt;br /&gt;
=== FET as a Variable Resistor ===&lt;br /&gt;
&lt;br /&gt;
FETs can be used as a variable resitor over some of the gate voltages -- I think.  This clearly needs more work.&lt;br /&gt;
&lt;br /&gt;
Hello, &lt;br /&gt;
&lt;br /&gt;
This is Dennis Perpetua from QGP.com,&lt;br /&gt;
&lt;br /&gt;
We’re interested in advertising on your site. &lt;br /&gt;
&lt;br /&gt;
Is this something you’d be willing to discuss? &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dennis Perpetua&lt;br /&gt;
Outreach Manager&lt;br /&gt;
www.qgp.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
P.S.: If you don't want me to contact you again, just let me know.&lt;br /&gt;
&lt;br /&gt;
Hello, &lt;br /&gt;
&lt;br /&gt;
I wonder if you received the message I sent a few days ago? &lt;br /&gt;
&lt;br /&gt;
This is Dennis Perpetua from QGP.com,&lt;br /&gt;
&lt;br /&gt;
We’re interested in advertising on your blog. Is this something you’d be willing to discuss? &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dennis Perpetua&lt;br /&gt;
Outreach Manager&lt;br /&gt;
www.qgp.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
P.S.: If you don't want me to contact you again, just let me know.&lt;br /&gt;
&lt;br /&gt;
== Potentiometers ==&lt;br /&gt;
&lt;br /&gt;
A Potentiometer is a resistor that has a third connection somewhere between the two main terminals. This connection is movable and if put at one end of the resistor will have no resistance between that end of the resistor and the full resistance to the other end. By moving the connection ( sometimes called a tap ) we can control the resistance to each end of the pot, but the sum of the two resistances always equals the total resistance of the potentiometer. A potentiometer is often used as a sort or adjustable voltage divider.&lt;br /&gt;
There is an electriclly adjustable version: [[Digital_Potentiometers]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Uses&lt;br /&gt;
*Adjustable voltage divider.&lt;br /&gt;
*Volume control.&lt;br /&gt;
*Variable resistor ( sometimes used when the correct value of resistance is not know or available, then the pot is use: it is adjusted, perhaps just once, after the circuit is built – to “tweak” the circuit into operating correctly.&lt;br /&gt;
*Trim or 0 adjustment&lt;br /&gt;
&lt;br /&gt;
External Links&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Potentiometer Potentiometer From Wikipedia, the free encyclopedia( inc. Schematic and Picture )]&lt;br /&gt;
* [http://www.sc-fa.com/blog/2009/08/05/slide_potentiometers/ How to buy slide potentiometers]... and extensive blog post on what to watch out for when you're ready to buy sliders/faders/slide potentiometers.&lt;br /&gt;
* [http://www.vsensors.com/potentiometer_tutorial.htm Precision Potentiometer Tutorial]&lt;br /&gt;
&lt;br /&gt;
=== Types of pots: ===&lt;br /&gt;
&lt;br /&gt;
One set of classifications overlap with resistors (resistive material, precision, power dissapation ), others like number of turns and purpose differ from resistors.&lt;br /&gt;
&lt;br /&gt;
=== Trimmer ===&lt;br /&gt;
&lt;br /&gt;
Small pots, typically mounted on a circuit board to make fine adjustments to a circuit.  Typically changed only when the device is built and then cemented in place, or adjusted when the circuit is serviced.&lt;br /&gt;
&lt;br /&gt;
=== 10 Turn ===&lt;br /&gt;
&lt;br /&gt;
Often precision with special dials to give a wide range of adjustability with calibrated results.  Sometimes found in trim pots.&lt;br /&gt;
&lt;br /&gt;
=== Digital Pots ===&lt;br /&gt;
&lt;br /&gt;
Accept digital signals to control a solid state pot.   [[Programmable Potentiometers]]&lt;br /&gt;
&lt;br /&gt;
=== Laboratory Pots ===&lt;br /&gt;
&lt;br /&gt;
These are very fancy pots, typically precision 10 turn mounted in a box with other auxiliary components.  Often used with a standard cell to measure voltages precisely.  I think they have be largely superceded by modern devices.&lt;br /&gt;
&lt;br /&gt;
*[http://physics.kenyon.edu/EarlyApparatus/Electrical_Measurements/Potentiometer/Potentiometer.html The Potentiometer]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Components]]&lt;/div&gt;</summary>
		<author><name>Russ hensel</name></author>
		
	</entry>
	<entry>
		<id>http://www.opencircuits.com/index.php?title=Resistors&amp;diff=93211</id>
		<title>Resistors</title>
		<link rel="alternate" type="text/html" href="http://www.opencircuits.com/index.php?title=Resistors&amp;diff=93211"/>
		<updated>2025-02-14T14:44:18Z</updated>

		<summary type="html">&lt;p&gt;Russ hensel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{stub}}&lt;br /&gt;
&lt;br /&gt;
This article is being split into components check for duplication prior to updataing.  You can find the components at ??&lt;br /&gt;
&lt;br /&gt;
== Resistors ==&lt;br /&gt;
Probably the most basic component, just a hunk of wire ( low resistance ) or a long thin wire ( high resistance ). &lt;br /&gt;
&lt;br /&gt;
When a voltage is applied to the two ends of an object, then a current usually flows through the object. If the object resists the voltage then the current will be small, if it does not then the current will be high. The amount of resistance is, tactfully, called the resistance. It is measured in ohms. ( Note that acting as a resistor is the simplest thing the object can do, there are more complicated behaviors, see capacitor, diodes, inductors, etc. A resistor is pretty much the simplest of electrical components.&lt;br /&gt;
If almost no current flows we call the object an insulator, if a large current flows we call it a conductor. We often view a wire as a resistor of 0 ohms and an insulator as a resistor of infinite ohms. The key equation for a resistor is:&lt;br /&gt;
&lt;br /&gt;
 R=V/I&lt;br /&gt;
&lt;br /&gt;
where I = current ( unit: amperes, amps )&lt;br /&gt;
V = voltage ( unit: volts )&lt;br /&gt;
R = resistance ( unit: ohms = volts per amp )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
List of standard 1% resistors.  If you want 1% resistors, you must pick from this list or you will pay a fortune for the resistor, assuming you can ever get it.&lt;br /&gt;
Interpret these numbers as the &amp;quot;mantissa&amp;quot; of the value.  &lt;br /&gt;
You can multiply the value by anything from 0.01 to about 100,000.&lt;br /&gt;
&lt;br /&gt;
100 102 105 107 110 113 115 118 121 124 127 130 133 137 140 143 147 150 154 158 162 165 169 174 178 182 187 191 196&lt;br /&gt;
200 205 210 215 221 226 232 237 243 249 255 261 267 274 280 287 294 &lt;br /&gt;
301 309 316 324 332 340 348 357 365 374 383 392 &lt;br /&gt;
402 412 422 432 442 453 464 475 487 499 &lt;br /&gt;
511 523 536 549 562 576 590&lt;br /&gt;
604 619 634 649 665 681 698 &lt;br /&gt;
715 732 750 768 787 &lt;br /&gt;
806 825 845 866 887 &lt;br /&gt;
909 931 953 976&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Uses&lt;br /&gt;
*current limiting:&lt;br /&gt;
Putting a resistor in a circuit, usually in series with another component it will reduce the current in the circuit, this is often useful to protect the other component. Very common to limit the current in a LED.&lt;br /&gt;
current sense:&lt;br /&gt;
When a resistor is in series with a circuit the voltage across it will vary with the current ( ohms law ) Sometimes we do this with a low value of resistance and use the voltage across the resistor to measure or control the current.&lt;br /&gt;
*Isolation : &lt;br /&gt;
A resistor between but connecting 2 components will tend to equalize their voltage, but only using small currents. It the components “want to go there own way, voltage wise” all they need do is put out a small current. For example people will sometimes ground themselves through a 10 mega ohm resistor. This tends to bring them to ground voltage, but they are protected from a deadly shock because most voltages cannot push a lethal current through 10 megs.&lt;br /&gt;
*pull up or pull down:&lt;br /&gt;
Sometimes a component will have a very high resistance to both the positive and negative side of the power supply and the voltage can easily drift around due to more or less random events. Under these conditions we will often connect a resistance ( typically around 10 K ohms ) to either the positive or negative side of the power supply. If to the positive side it is called a pull up resistor, if to the negative side a pull down resistor.&lt;br /&gt;
*voltage divider: &lt;br /&gt;
A voltage divider takes some voltage as an input and has an output that is some fraction of the input ( from 0 to 1 ) A volume control is usually some sort of voltage divider.&lt;br /&gt;
&lt;br /&gt;
Links&lt;br /&gt;
&lt;br /&gt;
#[http://www.resistorguide.com/what-is-a-resistor/  All about resistors]&lt;br /&gt;
#[http://www.piclist.com/techref/resistors.htm  Components: Resistors]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Inductors Resistor From Wikipedia, the free encyclopedia]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Pull_up_resistor Pull-up resistor From Wikipedia, the free encyclopedia]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Voltage_divider Voltage divider rule From Wikipedia, the free encyclopedia]&lt;br /&gt;
#[http://www.radio-electronics.com/info/data/index.php Electronics and radio components] see section on '''Resistors'''&lt;br /&gt;
&lt;br /&gt;
=== Carbon ===&lt;br /&gt;
The most common found resistor is the carbor film. Theses are generally the cheapest and most used in devices. The commonly are designed to withstand 1/8, 1/4, 1/2, and 1 watts of power. Much more information on [http://www.resistorguide.com/carbon-film-resistor/  carbon film resistors].&lt;br /&gt;
&lt;br /&gt;
=== Metal Film ===&lt;br /&gt;
The resistive material is a thin metal film in which a spiral is cut to produce the desired resistance, see [http://www.resistorguide.com/metal-film-resistor/  metal film resistors]&lt;br /&gt;
&lt;br /&gt;
=== Wire-Wound ===&lt;br /&gt;
The resistive material is wire, typically wound on a bobbin.  Useful for cheap and accurate resistance, but has significant inductance compared to film resistors.  Some may be wound in one direction, others half in one direction half in the other, this second method reduces but does not entirely eliminate the inductance.  Very common in the range of 5 watts and up.  Beware of these for use.&lt;br /&gt;
&lt;br /&gt;
=== Precision ===&lt;br /&gt;
Accurate to 1% of marked value or better.  In the old days even a 5% resistor was considered precision.&lt;br /&gt;
&lt;br /&gt;
=== FET as a Variable Resistor ===&lt;br /&gt;
&lt;br /&gt;
FETs can be used as a variable resitor over some of the gate voltages -- I think.  This clearly needs more work.&lt;br /&gt;
&lt;br /&gt;
Hello, &lt;br /&gt;
&lt;br /&gt;
This is Dennis Perpetua from QGP.com,&lt;br /&gt;
&lt;br /&gt;
We’re interested in advertising on your site. &lt;br /&gt;
&lt;br /&gt;
Is this something you’d be willing to discuss? &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dennis Perpetua&lt;br /&gt;
Outreach Manager&lt;br /&gt;
www.qgp.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
P.S.: If you don't want me to contact you again, just let me know.&lt;br /&gt;
&lt;br /&gt;
Hello, &lt;br /&gt;
&lt;br /&gt;
I wonder if you received the message I sent a few days ago? &lt;br /&gt;
&lt;br /&gt;
This is Dennis Perpetua from QGP.com,&lt;br /&gt;
&lt;br /&gt;
We’re interested in advertising on your blog. Is this something you’d be willing to discuss? &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Dennis Perpetua&lt;br /&gt;
Outreach Manager&lt;br /&gt;
www.qgp.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
P.S.: If you don't want me to contact you again, just let me know.&lt;br /&gt;
&lt;br /&gt;
== Potentiometers ==&lt;br /&gt;
&lt;br /&gt;
A Potentiometer is a resistor that has a third connection somewhere between the two main terminals. This connection is movable and if put at one end of the resistor will have no resistance between that end of the resistor and the full resistance to the other end. By moving the connection ( sometimes called a tap ) we can control the resistance to each end of the pot, but the sum of the two resistances always equals the total resistance of the potentiometer. A potentiometer is often used as a sort or adjustable voltage divider.&lt;br /&gt;
There is an electriclly adjustable version: [[Digital_Potentiometers]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Uses&lt;br /&gt;
*Adjustable voltage divider.&lt;br /&gt;
*Volume control.&lt;br /&gt;
*Variable resistor ( sometimes used when the correct value of resistance is not know or available, then the pot is use: it is adjusted, perhaps just once, after the circuit is built – to “tweak” the circuit into operating correctly.&lt;br /&gt;
*Trim or 0 adjustment&lt;br /&gt;
&lt;br /&gt;
External Links&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Potentiometer Potentiometer From Wikipedia, the free encyclopedia( inc. Schematic and Picture )]&lt;br /&gt;
* [http://www.sc-fa.com/blog/2009/08/05/slide_potentiometers/ How to buy slide potentiometers]... and extensive blog post on what to watch out for when you're ready to buy sliders/faders/slide potentiometers.&lt;br /&gt;
* [http://www.vsensors.com/potentiometer_tutorial.htm Precision Potentiometer Tutorial]&lt;br /&gt;
&lt;br /&gt;
=== Types of pots: ===&lt;br /&gt;
&lt;br /&gt;
One set of classifications overlap with resistors (resistive material, precision, power dissapation ), others like number of turns and purpose differ from resistors.&lt;br /&gt;
&lt;br /&gt;
=== Trimmer ===&lt;br /&gt;
&lt;br /&gt;
Small pots, typically mounted on a circuit board to make fine adjustments to a circuit.  Typically changed only when the device is built and then cemented in place, or adjusted when the circuit is serviced.&lt;br /&gt;
&lt;br /&gt;
=== 10 Turn ===&lt;br /&gt;
&lt;br /&gt;
Often precision with special dials to give a wide range of adjustability with calibrated results.  Sometimes found in trim pots.&lt;br /&gt;
&lt;br /&gt;
=== Digital Pots ===&lt;br /&gt;
&lt;br /&gt;
Accept digital signals to control a solid state pot.   [[Programmable Potentiometers]]&lt;br /&gt;
&lt;br /&gt;
=== Laboratory Pots ===&lt;br /&gt;
&lt;br /&gt;
These are very fancy pots, typically precision 10 turn mounted in a box with other auxiliary components.  Often used with a standard cell to measure voltages precisely.  I think they have be largely superceded by modern devices.&lt;br /&gt;
&lt;br /&gt;
*[http://physics.kenyon.edu/EarlyApparatus/Electrical_Measurements/Potentiometer/Potentiometer.html The Potentiometer]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Components]]&lt;/div&gt;</summary>
		<author><name>Russ hensel</name></author>
		
	</entry>
	<entry>
		<id>http://www.opencircuits.com/index.php?title=Chemical_Etchants&amp;diff=93210</id>
		<title>Chemical Etchants</title>
		<link rel="alternate" type="text/html" href="http://www.opencircuits.com/index.php?title=Chemical_Etchants&amp;diff=93210"/>
		<updated>2025-02-14T14:43:17Z</updated>

		<summary type="html">&lt;p&gt;Russ hensel: Protected &amp;quot;Chemical Etchants&amp;quot; ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite))&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{stub}}&lt;br /&gt;
&lt;br /&gt;
Chemical etching is one step of some popular [[techniques | PCB fabrication techniques]].&lt;br /&gt;
&lt;br /&gt;
In this technique,&lt;br /&gt;
* one starts with a copper-clad board.&lt;br /&gt;
* one puts a mask over all the copper he want to keep. There are a variety of ways to do this -- see [[Toner Transfer]] and [[Photoetching]].&lt;br /&gt;
* one removes the parts he don't want to keep, by chemically etching away the copper.&lt;br /&gt;
* cleanup: wash off the board in the sink; carefully store or dispose of the acid.&lt;br /&gt;
&lt;br /&gt;
There are a lot of different chemical techniques for doing this, each with its own advantages and drawbacks.&lt;br /&gt;
&lt;br /&gt;
None of these chemicals is incredibly dangerous, but they can all be toxic or caustic, and should be treated with care. Eye protection and gloves are a very good idea. Before you start, make sure you know how dangerous each chemical is, and figure out what you will need to do if you spill it or get it on yourself. Washing with plenty of water is usually a good start. For some chemicals you may want to keep a neutralizing agent handy. An MSDS (Materials Safety Data Sheet) for the chemical will give you some basic information.&lt;br /&gt;
&lt;br /&gt;
== vinegar and salt ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.kobakant.at/DIY/?p=2575 How to get what you want: Salt and Vinegar Etching]&lt;br /&gt;
* [http://www.flickr.com/photos/jeanbaptisteparis/4831465916/ smt pcb with Salt and Vinegar]&lt;br /&gt;
* [http://www.instructables.com/id/The-Saltwater-etch-process/ The Saltwater etch process]&lt;br /&gt;
* [http://www.electro-tech-online.com/general-electronics-chat/33876-electro-etching-no-acid.html electro etching a PCB with vinegar, salt, and a 12 V power supply] (the copper etched off the PCB is plated on the anode?) -- however, other people claim that &amp;quot;You should not be using any acids (or basic 'acids') with your [electro] etcher at all. No FeCl no vinegar, etc &amp;quot;.[http://www.bladeforums.com/forums/showthread.php?t=671936]&lt;br /&gt;
&lt;br /&gt;
== Ferric Chloride ==&lt;br /&gt;
This is the most common hobbyist etchant. Ferric chloride, FeCl&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt;, is a brownish substance. It's usually sold in a bottle (dissolved in water, perhaps with a little acid or peroxide) or as a powder (which you have to dissolve in water).&lt;br /&gt;
&lt;br /&gt;
When in solution, ferric chloride is a ferric ion (Fe&amp;lt;sup&amp;gt;3+&amp;lt;/sup&amp;gt;) and a chloride ion (Cl&amp;lt;sup&amp;gt;-&amp;lt;/sup&amp;gt;). The ferric ion reacts with the metallic copper on the circuit board in a redox reaction, producing a ferrous ion (Fe&amp;lt;sup&amp;gt;2+&amp;lt;/sup&amp;gt;) and cuprous or cupric (Cu&amp;lt;sup&amp;gt;1+&amp;lt;/sup&amp;gt; or Cu&amp;lt;sup&amp;gt;2+&amp;lt;/sup&amp;gt;) copper. The chlorine is just along for the ride. The copper ion, unlike the metallic copper, is soluble, so it leaves the circuit board and goes into solution. The reaction products form a black sludge which settles to the bottom of the etching tank. After etching enough copper, all your Fe&amp;lt;sup&amp;gt;3+&amp;lt;/sup&amp;gt; is used up and your solution is full of Cu&amp;lt;sup&amp;gt;1+&amp;lt;/sup&amp;gt;, and you need to get more etchant.&lt;br /&gt;
&lt;br /&gt;
== Ammonium Persulfate ==&lt;br /&gt;
Expensive &amp;amp; hard to control and optimize the process parameters (such as specific gravity &amp;amp; pH value).&lt;br /&gt;
&lt;br /&gt;
== HydroChloric Acid / Hydrogen Peroxide ==&lt;br /&gt;
&lt;br /&gt;
Mixing about 1 part HCl (Which can be found at most hardware stores, also known as Muriatic Acid. Ask for concrete cleaner.) into 2 parts Hydrogen peroxide (normally used for cleaning cuts) you can make a fairly powerful etchant. Use gloves and don't breathe the fumes though. This will etch a 3&amp;quot;x5&amp;quot; board in less than 10 minutes. No need to heat it up. I usually like to drill a small hole through the board on a corner and thread a wire or nylon string through to help agitate / remove the board.&lt;br /&gt;
&lt;br /&gt;
When the board is done etching, the etchant will probably look like green kool-aid, from the copper content in it. This stuff is highly corrosive and will burn skin, which is why you should wear gloves. But it is easy to handle, and fairly easy to dispose of. the etchant is easily deactivated with baking soda. Pour enough baking soda into it slowly (to keep it from boiling and overflowing... remember what happens with baking soda/vinegar? ya...) until it is a solid mass, then leave it in the sun to dry. You should contact your local authorities to find out what you should do with it next. Whatever you do, DO NOT dump the stuff down the drain, it will eat through your pipes just like any of the other etchants.&lt;br /&gt;
&lt;br /&gt;
Alternatively, instead of disposing of the etchant, you can re-use it again and again. In fact, after etching a few boards with this solution, you will have successfully made [[Chemical Etchants#Acid Cupric Chloride|Acid Cupric Chloride]] (see below).&lt;br /&gt;
You can also find a detailed tutorial on etching at [http://robotplatform.com/howto/pcb%20etching/pcb_etching_1.html Muriatic Acid etching tutorial]&lt;br /&gt;
&lt;br /&gt;
== Sodium Persulfate ==&lt;br /&gt;
More environmentally friendly than ferric chloride.  Can monitor the etching as initially clear new etchant solution turns blue from the copper ions.&lt;br /&gt;
&lt;br /&gt;
== Acid Cupric Chloride ==&lt;br /&gt;
Dead simple etchant made from ordinary, store-bought chemicals (hydrochloric acid and hydrogen peroxide). Has the advantage that it can be regenerated by bubbling oxygen/air through it, or by adding more H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;. In addition, it doesn't get used up: the etchant bath simply grows with use (kind of like sourdough starter…)&lt;br /&gt;
The used etchant also makes a great algecide/pH reducer for your pool (and a whole lot cheaper than that stuff they sell at the pool store).&lt;br /&gt;
&lt;br /&gt;
What you need:&lt;br /&gt;
* 38% Hydrochloric Acid, HCl (available at finer hardware stores or pool supply stores as Muriatic Acid)&lt;br /&gt;
* 3% Hydrogen Peroxide, H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; (available from any drug store)&lt;br /&gt;
* Plastic or Glass Pans, Jars, and tongs (no metal)&lt;br /&gt;
Directions:&lt;br /&gt;
&lt;br /&gt;
# Mix your HCl and H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; 1:1 in a non-metalic container, making sure to add the acid slowly to the H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;. DO NOT ADD THE H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; TO THE ACID!!!&lt;br /&gt;
# After you've masked your board, dip it in the solution and constantly agitate. You should notice a dark green cloud start to come from the board almost immedately which quickly dissapears or turns lighter as it gets further from the surface of the board.&lt;br /&gt;
# Etching should take about 10min depending on the temperature and how well you agitated the etchant. When all of the copper is gone, dip in water to wash off any stray etchant and stop the reaction.&lt;br /&gt;
# When done etching, save used etchant in a non-metalic container and mark clearly its contents.&lt;br /&gt;
# If your etchant has become a dark, murky green color, add a little bit of H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; or bubble air/O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; through the solution to regenerate it back to a light, transparent green color.&lt;br /&gt;
See links at bottom for more information on the chemistry and some pictures of the process.&lt;br /&gt;
&lt;br /&gt;
== Disposal procedures ==&lt;br /&gt;
Flushing used etchant down the drain is a bad idea (and usually illegal) because copper ion is toxic. The usual recommended way to dispose of hobbyist amounts of etchant is to convert it to a solid somehow and dispose of the solid in accordance with local laws.&lt;br /&gt;
&lt;br /&gt;
== External Links == &lt;br /&gt;
&lt;br /&gt;
* [http://www.instructables.com/id/Sponge-Ferric-Chloride-Method-Etch-Circuit-Bo/ &amp;quot;Sponge + Ferric Chloride Method -- Etch PCBs in One Minute!&amp;quot;]&lt;br /&gt;
* [http://www.k9spud.com/wiki/PCB:Etchants Ferric Chloride vs. Ammonium Persulfate] and other etching chemicals.&lt;br /&gt;
* [http://members.optusnet.com.au/~eseychell/PCB/etching_CuCl/index.html Etching with Air Regenerated Acid Cupric Chloride] — an excellent in-depth page on acid cupric chloride etching by Adam Seychell.&lt;br /&gt;
* [http://www.esmonde-white.com/home/diversions/etching-a-copper-pcb Etching a Copper PCB with HCl and H2O2]&lt;br /&gt;
* [http://www.mgchemicals.com/ MG Chemicals] A possible source?&lt;br /&gt;
* [http://reprap.org/wiki/MakePCBInstructions RepRap wiki: Make PCB instructions]&lt;br /&gt;
&lt;br /&gt;
== Internal Links ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*[[Toner Transfer]]&lt;br /&gt;
*[[Techniques]]&lt;br /&gt;
*[[Eagle Links]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Techniques]]&lt;/div&gt;</summary>
		<author><name>Russ hensel</name></author>
		
	</entry>
	<entry>
		<id>http://www.opencircuits.com/index.php?title=Chemical_Etchants&amp;diff=93209</id>
		<title>Chemical Etchants</title>
		<link rel="alternate" type="text/html" href="http://www.opencircuits.com/index.php?title=Chemical_Etchants&amp;diff=93209"/>
		<updated>2025-02-14T14:42:19Z</updated>

		<summary type="html">&lt;p&gt;Russ hensel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{stub}}&lt;br /&gt;
&lt;br /&gt;
Chemical etching is one step of some popular [[techniques | PCB fabrication techniques]].&lt;br /&gt;
&lt;br /&gt;
In this technique,&lt;br /&gt;
* one starts with a copper-clad board.&lt;br /&gt;
* one puts a mask over all the copper he want to keep. There are a variety of ways to do this -- see [[Toner Transfer]] and [[Photoetching]].&lt;br /&gt;
* one removes the parts he don't want to keep, by chemically etching away the copper.&lt;br /&gt;
* cleanup: wash off the board in the sink; carefully store or dispose of the acid.&lt;br /&gt;
&lt;br /&gt;
There are a lot of different chemical techniques for doing this, each with its own advantages and drawbacks.&lt;br /&gt;
&lt;br /&gt;
None of these chemicals is incredibly dangerous, but they can all be toxic or caustic, and should be treated with care. Eye protection and gloves are a very good idea. Before you start, make sure you know how dangerous each chemical is, and figure out what you will need to do if you spill it or get it on yourself. Washing with plenty of water is usually a good start. For some chemicals you may want to keep a neutralizing agent handy. An MSDS (Materials Safety Data Sheet) for the chemical will give you some basic information.&lt;br /&gt;
&lt;br /&gt;
== vinegar and salt ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.kobakant.at/DIY/?p=2575 How to get what you want: Salt and Vinegar Etching]&lt;br /&gt;
* [http://www.flickr.com/photos/jeanbaptisteparis/4831465916/ smt pcb with Salt and Vinegar]&lt;br /&gt;
* [http://www.instructables.com/id/The-Saltwater-etch-process/ The Saltwater etch process]&lt;br /&gt;
* [http://www.electro-tech-online.com/general-electronics-chat/33876-electro-etching-no-acid.html electro etching a PCB with vinegar, salt, and a 12 V power supply] (the copper etched off the PCB is plated on the anode?) -- however, other people claim that &amp;quot;You should not be using any acids (or basic 'acids') with your [electro] etcher at all. No FeCl no vinegar, etc &amp;quot;.[http://www.bladeforums.com/forums/showthread.php?t=671936]&lt;br /&gt;
&lt;br /&gt;
== Ferric Chloride ==&lt;br /&gt;
This is the most common hobbyist etchant. Ferric chloride, FeCl&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt;, is a brownish substance. It's usually sold in a bottle (dissolved in water, perhaps with a little acid or peroxide) or as a powder (which you have to dissolve in water).&lt;br /&gt;
&lt;br /&gt;
When in solution, ferric chloride is a ferric ion (Fe&amp;lt;sup&amp;gt;3+&amp;lt;/sup&amp;gt;) and a chloride ion (Cl&amp;lt;sup&amp;gt;-&amp;lt;/sup&amp;gt;). The ferric ion reacts with the metallic copper on the circuit board in a redox reaction, producing a ferrous ion (Fe&amp;lt;sup&amp;gt;2+&amp;lt;/sup&amp;gt;) and cuprous or cupric (Cu&amp;lt;sup&amp;gt;1+&amp;lt;/sup&amp;gt; or Cu&amp;lt;sup&amp;gt;2+&amp;lt;/sup&amp;gt;) copper. The chlorine is just along for the ride. The copper ion, unlike the metallic copper, is soluble, so it leaves the circuit board and goes into solution. The reaction products form a black sludge which settles to the bottom of the etching tank. After etching enough copper, all your Fe&amp;lt;sup&amp;gt;3+&amp;lt;/sup&amp;gt; is used up and your solution is full of Cu&amp;lt;sup&amp;gt;1+&amp;lt;/sup&amp;gt;, and you need to get more etchant.&lt;br /&gt;
&lt;br /&gt;
== Ammonium Persulfate ==&lt;br /&gt;
Expensive &amp;amp; hard to control and optimize the process parameters (such as specific gravity &amp;amp; pH value).&lt;br /&gt;
&lt;br /&gt;
== HydroChloric Acid / Hydrogen Peroxide ==&lt;br /&gt;
&lt;br /&gt;
Mixing about 1 part HCl (Which can be found at most hardware stores, also known as Muriatic Acid. Ask for concrete cleaner.) into 2 parts Hydrogen peroxide (normally used for cleaning cuts) you can make a fairly powerful etchant. Use gloves and don't breathe the fumes though. This will etch a 3&amp;quot;x5&amp;quot; board in less than 10 minutes. No need to heat it up. I usually like to drill a small hole through the board on a corner and thread a wire or nylon string through to help agitate / remove the board.&lt;br /&gt;
&lt;br /&gt;
When the board is done etching, the etchant will probably look like green kool-aid, from the copper content in it. This stuff is highly corrosive and will burn skin, which is why you should wear gloves. But it is easy to handle, and fairly easy to dispose of. the etchant is easily deactivated with baking soda. Pour enough baking soda into it slowly (to keep it from boiling and overflowing... remember what happens with baking soda/vinegar? ya...) until it is a solid mass, then leave it in the sun to dry. You should contact your local authorities to find out what you should do with it next. Whatever you do, DO NOT dump the stuff down the drain, it will eat through your pipes just like any of the other etchants.&lt;br /&gt;
&lt;br /&gt;
Alternatively, instead of disposing of the etchant, you can re-use it again and again. In fact, after etching a few boards with this solution, you will have successfully made [[Chemical Etchants#Acid Cupric Chloride|Acid Cupric Chloride]] (see below).&lt;br /&gt;
You can also find a detailed tutorial on etching at [http://robotplatform.com/howto/pcb%20etching/pcb_etching_1.html Muriatic Acid etching tutorial]&lt;br /&gt;
&lt;br /&gt;
== Sodium Persulfate ==&lt;br /&gt;
More environmentally friendly than ferric chloride.  Can monitor the etching as initially clear new etchant solution turns blue from the copper ions.&lt;br /&gt;
&lt;br /&gt;
== Acid Cupric Chloride ==&lt;br /&gt;
Dead simple etchant made from ordinary, store-bought chemicals (hydrochloric acid and hydrogen peroxide). Has the advantage that it can be regenerated by bubbling oxygen/air through it, or by adding more H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;. In addition, it doesn't get used up: the etchant bath simply grows with use (kind of like sourdough starter…)&lt;br /&gt;
The used etchant also makes a great algecide/pH reducer for your pool (and a whole lot cheaper than that stuff they sell at the pool store).&lt;br /&gt;
&lt;br /&gt;
What you need:&lt;br /&gt;
* 38% Hydrochloric Acid, HCl (available at finer hardware stores or pool supply stores as Muriatic Acid)&lt;br /&gt;
* 3% Hydrogen Peroxide, H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; (available from any drug store)&lt;br /&gt;
* Plastic or Glass Pans, Jars, and tongs (no metal)&lt;br /&gt;
Directions:&lt;br /&gt;
&lt;br /&gt;
# Mix your HCl and H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; 1:1 in a non-metalic container, making sure to add the acid slowly to the H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;. DO NOT ADD THE H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; TO THE ACID!!!&lt;br /&gt;
# After you've masked your board, dip it in the solution and constantly agitate. You should notice a dark green cloud start to come from the board almost immedately which quickly dissapears or turns lighter as it gets further from the surface of the board.&lt;br /&gt;
# Etching should take about 10min depending on the temperature and how well you agitated the etchant. When all of the copper is gone, dip in water to wash off any stray etchant and stop the reaction.&lt;br /&gt;
# When done etching, save used etchant in a non-metalic container and mark clearly its contents.&lt;br /&gt;
# If your etchant has become a dark, murky green color, add a little bit of H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; or bubble air/O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; through the solution to regenerate it back to a light, transparent green color.&lt;br /&gt;
See links at bottom for more information on the chemistry and some pictures of the process.&lt;br /&gt;
&lt;br /&gt;
== Disposal procedures ==&lt;br /&gt;
Flushing used etchant down the drain is a bad idea (and usually illegal) because copper ion is toxic. The usual recommended way to dispose of hobbyist amounts of etchant is to convert it to a solid somehow and dispose of the solid in accordance with local laws.&lt;br /&gt;
&lt;br /&gt;
== External Links == &lt;br /&gt;
&lt;br /&gt;
* [http://www.instructables.com/id/Sponge-Ferric-Chloride-Method-Etch-Circuit-Bo/ &amp;quot;Sponge + Ferric Chloride Method -- Etch PCBs in One Minute!&amp;quot;]&lt;br /&gt;
* [http://www.k9spud.com/wiki/PCB:Etchants Ferric Chloride vs. Ammonium Persulfate] and other etching chemicals.&lt;br /&gt;
* [http://members.optusnet.com.au/~eseychell/PCB/etching_CuCl/index.html Etching with Air Regenerated Acid Cupric Chloride] — an excellent in-depth page on acid cupric chloride etching by Adam Seychell.&lt;br /&gt;
* [http://www.esmonde-white.com/home/diversions/etching-a-copper-pcb Etching a Copper PCB with HCl and H2O2]&lt;br /&gt;
* [http://www.mgchemicals.com/ MG Chemicals] A possible source?&lt;br /&gt;
* [http://reprap.org/wiki/MakePCBInstructions RepRap wiki: Make PCB instructions]&lt;br /&gt;
&lt;br /&gt;
== Internal Links ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*[[Toner Transfer]]&lt;br /&gt;
*[[Techniques]]&lt;br /&gt;
*[[Eagle Links]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Techniques]]&lt;/div&gt;</summary>
		<author><name>Russ hensel</name></author>
		
	</entry>
	<entry>
		<id>http://www.opencircuits.com/index.php?title=Electronic_design_automation&amp;diff=91749</id>
		<title>Electronic design automation</title>
		<link rel="alternate" type="text/html" href="http://www.opencircuits.com/index.php?title=Electronic_design_automation&amp;diff=91749"/>
		<updated>2024-10-06T16:13:45Z</updated>

		<summary type="html">&lt;p&gt;Russ hensel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Content vandalized with a link to:&lt;br /&gt;
&lt;br /&gt;
Buy now: https://thawking.shop&lt;br /&gt;
History damaged as well&lt;/div&gt;</summary>
		<author><name>Russ hensel</name></author>
		
	</entry>
	<entry>
		<id>http://www.opencircuits.com/index.php?title=DB9_Serial_Connector&amp;diff=91748</id>
		<title>DB9 Serial Connector</title>
		<link rel="alternate" type="text/html" href="http://www.opencircuits.com/index.php?title=DB9_Serial_Connector&amp;diff=91748"/>
		<updated>2024-10-06T16:12:50Z</updated>

		<summary type="html">&lt;p&gt;Russ hensel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Content vandalized perhaps by:  &lt;br /&gt;
https://wa.link/uqh66k&lt;br /&gt;
Seems to have damaged history as well.&lt;/div&gt;</summary>
		<author><name>Russ hensel</name></author>
		
	</entry>
	<entry>
		<id>http://www.opencircuits.com/index.php?title=Connectors&amp;diff=91731</id>
		<title>Connectors</title>
		<link rel="alternate" type="text/html" href="http://www.opencircuits.com/index.php?title=Connectors&amp;diff=91731"/>
		<updated>2024-09-19T20:55:09Z</updated>

		<summary type="html">&lt;p&gt;Russ hensel: Protected &amp;quot;Connectors&amp;quot;: Excessive vandalism ([Edit=Allow only administrators] (expires 20:55, 19 September 2025 (UTC)) [Move=Allow only administrators] (expires 20:55, 19 September 2025 (UTC)))&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Main-GM862header.jpg|69px|GM862 SMD Connector]]&lt;br /&gt;
[[GM862 SMD Connector]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Main-DB9-PCB-1.jpg||69px|DB9 Connector]]&lt;br /&gt;
[[DB9 Serial Connector]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Main-Barrel-Connector.jpg|69px|Barrel Jack]]&lt;br /&gt;
[[Barrel Power Jack]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Mini-USB.jpg|69px|Mini-USB]]&lt;br /&gt;
[[Mini-USB SMD connector]]&lt;br /&gt;
&lt;br /&gt;
[[Image:sf-microsd.jpg|69px|Mini-USB]]&lt;br /&gt;
[[MicroSD/Transflash Socket]]&lt;br /&gt;
&lt;br /&gt;
UEXT: universal expansion connector. The standard UEXT connector consists of ten pins (two rows of five, with 0.1&amp;quot; spacing) and supports I2C, SPI, and RS-232 serial communication, as well as carrying +3.3V power and common ground. -- [http://en.wikipedia.org/wiki/UEXT Wikipedia: UEXT]&lt;br /&gt;
&lt;br /&gt;
[[JTAG]] connectors?&lt;br /&gt;
&lt;br /&gt;
[[ideas#better data cable ideas]]&lt;br /&gt;
&lt;br /&gt;
Some connector companies in no particular order:&lt;br /&gt;
[[Samtec]], [[Molex]], &lt;br /&gt;
&lt;br /&gt;
Rather than wiring a connector up directly to a CPU, one typically has some [[input protection]] between them.&lt;br /&gt;
&lt;br /&gt;
The [[SFE Footprint Library]] includes a few connectors.&lt;br /&gt;
&lt;br /&gt;
Mark Whitis has a list of &amp;quot;common pitfalls of Micro Development Boards&amp;quot;.&lt;br /&gt;
He describes how the 26 pin connectors on his&lt;br /&gt;
[https://web.archive.org/web/20110929182706/http://www.freelabs.com/~whitis/electronics/9S12DP256/micro_board/ Mark Whitis Microcontroller Development Board]&lt;br /&gt;
avoid those pitfalls and&lt;br /&gt;
have many non-obvious features that make them superior to many other connectors.&lt;br /&gt;
&lt;br /&gt;
[http://techref.massmind.org/techref/pcbixmax.htm Massmind: &amp;quot;Maximum interconnect options from minimum board space&amp;quot;]&lt;br /&gt;
discusses a board pattern that gives you the option of plugging in any one of a variety of different connectors.&lt;br /&gt;
&lt;br /&gt;
Connectors and data cable ideas are further discussed at [[Ideas#better_data_cable_ideas]].&lt;br /&gt;
&lt;br /&gt;
== Power-only USB connectors and cables ==&lt;br /&gt;
&lt;br /&gt;
* Adafruit. [https://www.adafruit.com/product/4907 &amp;quot;USB C SMT / THM Jack Connector - Power Only&amp;quot;].&lt;br /&gt;
&lt;br /&gt;
* Simon Lewis. [https://www.instructables.com/USB-Condom/ &amp;quot;Make a USB Cable 'power Only'&amp;quot;].&lt;br /&gt;
* Charlie Sorrel. [https://www.cultofmac.com/632796/how-and-why-to-make-your-own-power-only-usb-cable/ &amp;quot;How (and why) to make your own power-only USB cable&amp;quot;].&lt;br /&gt;
* [https://arstechnica.com/civis/viewtopic.php?f=11&amp;amp;t=1377799 &amp;quot;I want to make a USB C charge only cable&amp;quot;].&lt;br /&gt;
&lt;br /&gt;
* Jeff Smoot. [https://www.cuidevices.com/blog/an-introduction-to-power-only-usb-type-c-connectors &amp;quot;An Introduction to Power-Only USB Type C Connectors&amp;quot;].&lt;br /&gt;
** Jeff Smoot. [https://www.digikey.com/en/articles/an-overview-of-usb-type-c-in-power-only-designs &amp;quot;An Overview of USB Type-C in Power-Only Designs&amp;quot;].&lt;br /&gt;
** [https://www.reddit.com/r/UsbCHardware/ Reddit &amp;quot;USB Type-C devices &amp;amp; hardware&amp;quot;] :  [https://www.reddit.com/r/UsbCHardware/comments/qo24e6/an_introduction_to_poweronly_usb_type_c_connectors/ comments on &amp;quot;An Introduction to Power-Only USB Type C Connectors&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
* [https://electronics.stackexchange.com/questions/140225/how-can-i-tell-charge-only-usb-cables-from-usb-data-cables &amp;quot;How can I tell charge-only USB cables from USB data cables?&amp;quot;].&lt;br /&gt;
* [https://electronics.stackexchange.com/questions/327791/using-usb-c-as-a-power-source &amp;quot;Using USB-C as a power source&amp;quot;].&lt;br /&gt;
* [https://hardwarerecs.stackexchange.com/questions/16164/what-is-the-max-usb-cable-type-a-male-to-type-c-male-volt-current-wattage-possib &amp;quot;What is the max USB cable type-A male to type-c male Volt/current/Wattage possible?&amp;quot;].&lt;br /&gt;
* [https://superuser.com/questions/961176/usb-type-c-power-delivery-profile-max-length &amp;quot;USB Type C Power Delivery ... max length?&amp;quot;]: &amp;quot;Is there a maximum length for a charging only cable?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* Matthew Lai. [https://dubiouscreations.com/2021/04/06/designing-with-usb-c-lessons-learned/ &amp;quot;Designing with USB-C: Lessons Learned&amp;quot;]: &amp;quot;Type-C connectors tend to be much harder to solder ... Power-Only SMT ... simpler connectors that only have power and the CC pins ... [such as] Korean Hroparts TYPE-C-31-M-17.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* [https://gct.co/news/6_pin_usb_type_c &amp;quot;GCT 6 Pin USB Type-C for Charging&amp;quot;]: [https://gct.co/usb-connector/list?style=Type%20C&amp;amp;version=Charging&amp;amp;interface=C &amp;quot;GCT USB Charging Connectors&amp;quot;]: GCT USB4125, GCT USB4135, GCT USB4515, GCT USB4715 Waterproof IP67 USB Type C Connector, GCT USB4180, GCT USB4130, GCT USB4140, GCT USB4175. All these USB C connectors have 6 contacts: the CC1 and CC2 pins used for USB PD negotiation, the 2 GND pins, and the 2 VBUS pins.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Directive 2022/2380 will require any electronical hand held devices marketed in the EU to contain a USB-C charging port.&amp;quot;&lt;br /&gt;
-- [https://gct.co/news/usb-eu-directive_2022_2380 &amp;quot;EU 2022/2380 directive - Are you (USB Type-C) compliant?&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
== USB-C breakout boards ==&lt;br /&gt;
&lt;br /&gt;
* SparkFun. [https://www.sparkfun.com/products/15100 &amp;quot;USB-C Breakout&amp;quot;]: &amp;quot;breaks out the USB-C connector's VBUS, GND, CC1, CC2, D+, and D- pins intro a 0.1&amp;quot; pitch header&amp;quot;&lt;br /&gt;
* SparkFun. [https://www.sparkfun.com/products/15096 &amp;quot;SparkFun Serial Basic Breakout - CH340C and USB-C&amp;quot;]: &amp;quot;USB-to-Serial adapter ... The pinout of the Serial Basic mimics the common DTR/RXI/TXO/VCC/CTS/GND pinout ...&amp;quot;&lt;br /&gt;
* Adafruit. [https://www.adafruit.com/product/5180 &amp;quot;Simple USB C Socket Breakout&amp;quot;]: &amp;quot;it doesn't break out all the pads - it just gives you the classic 4 USB pins&amp;quot; Vbus, D-, D+, GND.&lt;br /&gt;
* Adafruit. [https://www.adafruit.com/product/4090 &amp;quot;Adafruit USB Type C Breakout Board&amp;quot;] and [https://www.mouser.com/new/adafruit/adafruit-4090-usb-c-breakout-board/ &amp;quot;USB C Breakout Board&amp;quot;].&lt;br /&gt;
* Adafruit. [https://www.adafruit.com/product/4396 &amp;quot;USB Type C Socket - SMT Inline Breakout Board&amp;quot;]. with nearly all of the 24 pins broken out.&lt;br /&gt;
* Pololu. [https://www.pololu.com/product/2585 &amp;quot;USB 2.0 Type-C Connector Breakout Board&amp;quot;]: &amp;quot;The USB-C connector’s 24 tightly-spaced pins make it difficult to use in a hobby project or prototype design. This breakout board helps by providing access to the connector’s pins for power (VBUS and GND), USB 2.0 differential data (D+ and D−), Configuration Channel (CC), and Sideband Use (SBU).&amp;quot;&lt;br /&gt;
* Pololu. [https://www.pololu.com/product/3411 &amp;quot;USB 2.0 Type-C Connector Breakout Board&amp;quot;].&lt;br /&gt;
* PMD Way. [https://pmdway.com/products/usb-3-1-type-c-male-to-female-breakout-test-board &amp;quot;USB 3.1 Type C Male to Female Breakout Test Board&amp;quot;].&lt;br /&gt;
* Tinkersphere. [https://tinkersphere.com/mini-usb/3551-usb-31-type-c-male-breakout-board.html &amp;quot;Male USB C Breakout Board&amp;quot;] and [https://tinkersphere.com/mini-usb/3549-female-usb-c-breakout-board-smt-inline-socket.html &amp;quot;Female USB C Breakout Board&amp;quot;].&lt;br /&gt;
* Newegg. [https://www.newegg.com/p/181-0135-00082 &amp;quot;USB-C Male Plug Connector [Breakout] Board&amp;quot;].&lt;br /&gt;
&lt;br /&gt;
== Reduced pin count USB connectors and cables ==&lt;br /&gt;
&lt;br /&gt;
* Tony P. [https://web.archive.org/web/20220725125722/https://idyl.io/how-to-add-usb-type-c-micro-usb-replacement/ &amp;quot;How to add USB Type C to your USB 2.0 projects&amp;quot;]: &amp;quot;replace the micro-USB / mini-USB ... 24 pin connectors are really unfriendly packages. They are very dense making it incredibly hard to reliably solder. The solution to this is to use a reduced pin count type C. ... &amp;quot;TYPE-C-31-M-12&amp;quot; ... by Korean Hroparts Elec [is a] 12 pin USB Type C connector&amp;quot;&lt;br /&gt;
* Sparkfun. [https://www.sparkfun.com/products/15424 &amp;quot;Reversible USB A to C Cable - 2m&amp;quot;]: &amp;quot;Supporting USB 2.0 speeds and charging up to 2A, ... the flexibility of a thinner cable and the wonderful feel of a '''reversible ... USB-A connection'''. ... This cable has the D+/D- wires along side large-gauge VBUS/GND wires.&amp;quot;&lt;br /&gt;
* SparkFun. [https://learn.sparkfun.com/tutorials/connector-basics/usb-connectors &amp;quot;Connector Basics: USB Connectors&amp;quot;]: &amp;quot;USB-B Connectors ... is bulky, but robust, so in applications where size is not an issue, it's the preferred means for providing a removable connector for USB connectivity.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* Matthew Lai. [https://dubiouscreations.com/2021/04/06/designing-with-usb-c-lessons-learned/ &amp;quot;Designing with USB-C: Lessons Learned&amp;quot;]: &amp;quot;Type-C connectors tend to be much harder to solder ... The standard is also much more complicated, though as we will see shortly, actual implementation is VERY simple if we just want to use it to replace micro-B in USB 2.0 devices (as opposed to hosts). ... USB 2.0-Only SMT ... connectors ... omit all the pins not required for USB 2.0... [such as] the Korean Hroparts TYPE-C-31-M-12 (LCSC part number C165948).&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* Morten Christiansen, Synopsys. [https://www.synopsys.com/designware-ip/technical-bulletin/converting-existing-designs.html &amp;quot;Converting Existing USB Designs to Support Type-C Connections&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
* [https://electronics.stackexchange.com/questions/473773/usb-type-c-alternative-with-fewer-signal-wires &amp;quot;USB Type-C Alternative with fewer signal wires&amp;quot;].&lt;br /&gt;
&lt;br /&gt;
== Magnetic connectors ==&lt;br /&gt;
&lt;br /&gt;
* Adafruit. [https://www.adafruit.com/product/5524 &amp;quot;Magnetic USB Type-C Plug Tip&amp;quot;] and the matching [https://www.adafruit.com/product/5520 &amp;quot;USB A or Type-C to Type-C Cable with Magnetic Tip - 1 meter long&amp;quot;].&lt;br /&gt;
&lt;br /&gt;
* [https://electronics.stackexchange.com/questions/473773/usb-type-c-alternative-with-fewer-signal-wires &amp;quot;USB Type-C Alternative with fewer signal wires&amp;quot;]: some of the answers mention magnetic connectors.&lt;br /&gt;
&lt;br /&gt;
* Adafruit. [https://www.adafruit.com/product/5359 &amp;quot;DIY Magnetic Connector - Right Angle Five Contact Pins&amp;quot;]. A set of 2 halves that magnetically attract.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Further reading ==&lt;br /&gt;
&lt;br /&gt;
*  SFUPTOWNMAKER, SparkFun member #23999 [https://learn.sparkfun.com/tutorials/connector-basics &amp;quot;Connector Basics&amp;quot;].&lt;br /&gt;
&lt;br /&gt;
[[Category:Connectors]][[Category:Components]]&lt;/div&gt;</summary>
		<author><name>Russ hensel</name></author>
		
	</entry>
	<entry>
		<id>http://www.opencircuits.com/index.php?title=Connectors&amp;diff=91730</id>
		<title>Connectors</title>
		<link rel="alternate" type="text/html" href="http://www.opencircuits.com/index.php?title=Connectors&amp;diff=91730"/>
		<updated>2024-09-19T20:54:42Z</updated>

		<summary type="html">&lt;p&gt;Russ hensel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Main-GM862header.jpg|69px|GM862 SMD Connector]]&lt;br /&gt;
[[GM862 SMD Connector]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Main-DB9-PCB-1.jpg||69px|DB9 Connector]]&lt;br /&gt;
[[DB9 Serial Connector]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Main-Barrel-Connector.jpg|69px|Barrel Jack]]&lt;br /&gt;
[[Barrel Power Jack]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Mini-USB.jpg|69px|Mini-USB]]&lt;br /&gt;
[[Mini-USB SMD connector]]&lt;br /&gt;
&lt;br /&gt;
[[Image:sf-microsd.jpg|69px|Mini-USB]]&lt;br /&gt;
[[MicroSD/Transflash Socket]]&lt;br /&gt;
&lt;br /&gt;
UEXT: universal expansion connector. The standard UEXT connector consists of ten pins (two rows of five, with 0.1&amp;quot; spacing) and supports I2C, SPI, and RS-232 serial communication, as well as carrying +3.3V power and common ground. -- [http://en.wikipedia.org/wiki/UEXT Wikipedia: UEXT]&lt;br /&gt;
&lt;br /&gt;
[[JTAG]] connectors?&lt;br /&gt;
&lt;br /&gt;
[[ideas#better data cable ideas]]&lt;br /&gt;
&lt;br /&gt;
Some connector companies in no particular order:&lt;br /&gt;
[[Samtec]], [[Molex]], &lt;br /&gt;
&lt;br /&gt;
Rather than wiring a connector up directly to a CPU, one typically has some [[input protection]] between them.&lt;br /&gt;
&lt;br /&gt;
The [[SFE Footprint Library]] includes a few connectors.&lt;br /&gt;
&lt;br /&gt;
Mark Whitis has a list of &amp;quot;common pitfalls of Micro Development Boards&amp;quot;.&lt;br /&gt;
He describes how the 26 pin connectors on his&lt;br /&gt;
[https://web.archive.org/web/20110929182706/http://www.freelabs.com/~whitis/electronics/9S12DP256/micro_board/ Mark Whitis Microcontroller Development Board]&lt;br /&gt;
avoid those pitfalls and&lt;br /&gt;
have many non-obvious features that make them superior to many other connectors.&lt;br /&gt;
&lt;br /&gt;
[http://techref.massmind.org/techref/pcbixmax.htm Massmind: &amp;quot;Maximum interconnect options from minimum board space&amp;quot;]&lt;br /&gt;
discusses a board pattern that gives you the option of plugging in any one of a variety of different connectors.&lt;br /&gt;
&lt;br /&gt;
Connectors and data cable ideas are further discussed at [[Ideas#better_data_cable_ideas]].&lt;br /&gt;
&lt;br /&gt;
== Power-only USB connectors and cables ==&lt;br /&gt;
&lt;br /&gt;
* Adafruit. [https://www.adafruit.com/product/4907 &amp;quot;USB C SMT / THM Jack Connector - Power Only&amp;quot;].&lt;br /&gt;
&lt;br /&gt;
* Simon Lewis. [https://www.instructables.com/USB-Condom/ &amp;quot;Make a USB Cable 'power Only'&amp;quot;].&lt;br /&gt;
* Charlie Sorrel. [https://www.cultofmac.com/632796/how-and-why-to-make-your-own-power-only-usb-cable/ &amp;quot;How (and why) to make your own power-only USB cable&amp;quot;].&lt;br /&gt;
* [https://arstechnica.com/civis/viewtopic.php?f=11&amp;amp;t=1377799 &amp;quot;I want to make a USB C charge only cable&amp;quot;].&lt;br /&gt;
&lt;br /&gt;
* Jeff Smoot. [https://www.cuidevices.com/blog/an-introduction-to-power-only-usb-type-c-connectors &amp;quot;An Introduction to Power-Only USB Type C Connectors&amp;quot;].&lt;br /&gt;
** Jeff Smoot. [https://www.digikey.com/en/articles/an-overview-of-usb-type-c-in-power-only-designs &amp;quot;An Overview of USB Type-C in Power-Only Designs&amp;quot;].&lt;br /&gt;
** [https://www.reddit.com/r/UsbCHardware/ Reddit &amp;quot;USB Type-C devices &amp;amp; hardware&amp;quot;] :  [https://www.reddit.com/r/UsbCHardware/comments/qo24e6/an_introduction_to_poweronly_usb_type_c_connectors/ comments on &amp;quot;An Introduction to Power-Only USB Type C Connectors&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
* [https://electronics.stackexchange.com/questions/140225/how-can-i-tell-charge-only-usb-cables-from-usb-data-cables &amp;quot;How can I tell charge-only USB cables from USB data cables?&amp;quot;].&lt;br /&gt;
* [https://electronics.stackexchange.com/questions/327791/using-usb-c-as-a-power-source &amp;quot;Using USB-C as a power source&amp;quot;].&lt;br /&gt;
* [https://hardwarerecs.stackexchange.com/questions/16164/what-is-the-max-usb-cable-type-a-male-to-type-c-male-volt-current-wattage-possib &amp;quot;What is the max USB cable type-A male to type-c male Volt/current/Wattage possible?&amp;quot;].&lt;br /&gt;
* [https://superuser.com/questions/961176/usb-type-c-power-delivery-profile-max-length &amp;quot;USB Type C Power Delivery ... max length?&amp;quot;]: &amp;quot;Is there a maximum length for a charging only cable?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* Matthew Lai. [https://dubiouscreations.com/2021/04/06/designing-with-usb-c-lessons-learned/ &amp;quot;Designing with USB-C: Lessons Learned&amp;quot;]: &amp;quot;Type-C connectors tend to be much harder to solder ... Power-Only SMT ... simpler connectors that only have power and the CC pins ... [such as] Korean Hroparts TYPE-C-31-M-17.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* [https://gct.co/news/6_pin_usb_type_c &amp;quot;GCT 6 Pin USB Type-C for Charging&amp;quot;]: [https://gct.co/usb-connector/list?style=Type%20C&amp;amp;version=Charging&amp;amp;interface=C &amp;quot;GCT USB Charging Connectors&amp;quot;]: GCT USB4125, GCT USB4135, GCT USB4515, GCT USB4715 Waterproof IP67 USB Type C Connector, GCT USB4180, GCT USB4130, GCT USB4140, GCT USB4175. All these USB C connectors have 6 contacts: the CC1 and CC2 pins used for USB PD negotiation, the 2 GND pins, and the 2 VBUS pins.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Directive 2022/2380 will require any electronical hand held devices marketed in the EU to contain a USB-C charging port.&amp;quot;&lt;br /&gt;
-- [https://gct.co/news/usb-eu-directive_2022_2380 &amp;quot;EU 2022/2380 directive - Are you (USB Type-C) compliant?&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
== USB-C breakout boards ==&lt;br /&gt;
&lt;br /&gt;
* SparkFun. [https://www.sparkfun.com/products/15100 &amp;quot;USB-C Breakout&amp;quot;]: &amp;quot;breaks out the USB-C connector's VBUS, GND, CC1, CC2, D+, and D- pins intro a 0.1&amp;quot; pitch header&amp;quot;&lt;br /&gt;
* SparkFun. [https://www.sparkfun.com/products/15096 &amp;quot;SparkFun Serial Basic Breakout - CH340C and USB-C&amp;quot;]: &amp;quot;USB-to-Serial adapter ... The pinout of the Serial Basic mimics the common DTR/RXI/TXO/VCC/CTS/GND pinout ...&amp;quot;&lt;br /&gt;
* Adafruit. [https://www.adafruit.com/product/5180 &amp;quot;Simple USB C Socket Breakout&amp;quot;]: &amp;quot;it doesn't break out all the pads - it just gives you the classic 4 USB pins&amp;quot; Vbus, D-, D+, GND.&lt;br /&gt;
* Adafruit. [https://www.adafruit.com/product/4090 &amp;quot;Adafruit USB Type C Breakout Board&amp;quot;] and [https://www.mouser.com/new/adafruit/adafruit-4090-usb-c-breakout-board/ &amp;quot;USB C Breakout Board&amp;quot;].&lt;br /&gt;
* Adafruit. [https://www.adafruit.com/product/4396 &amp;quot;USB Type C Socket - SMT Inline Breakout Board&amp;quot;]. with nearly all of the 24 pins broken out.&lt;br /&gt;
* Pololu. [https://www.pololu.com/product/2585 &amp;quot;USB 2.0 Type-C Connector Breakout Board&amp;quot;]: &amp;quot;The USB-C connector’s 24 tightly-spaced pins make it difficult to use in a hobby project or prototype design. This breakout board helps by providing access to the connector’s pins for power (VBUS and GND), USB 2.0 differential data (D+ and D−), Configuration Channel (CC), and Sideband Use (SBU).&amp;quot;&lt;br /&gt;
* Pololu. [https://www.pololu.com/product/3411 &amp;quot;USB 2.0 Type-C Connector Breakout Board&amp;quot;].&lt;br /&gt;
* PMD Way. [https://pmdway.com/products/usb-3-1-type-c-male-to-female-breakout-test-board &amp;quot;USB 3.1 Type C Male to Female Breakout Test Board&amp;quot;].&lt;br /&gt;
* Tinkersphere. [https://tinkersphere.com/mini-usb/3551-usb-31-type-c-male-breakout-board.html &amp;quot;Male USB C Breakout Board&amp;quot;] and [https://tinkersphere.com/mini-usb/3549-female-usb-c-breakout-board-smt-inline-socket.html &amp;quot;Female USB C Breakout Board&amp;quot;].&lt;br /&gt;
* Newegg. [https://www.newegg.com/p/181-0135-00082 &amp;quot;USB-C Male Plug Connector [Breakout] Board&amp;quot;].&lt;br /&gt;
&lt;br /&gt;
== Reduced pin count USB connectors and cables ==&lt;br /&gt;
&lt;br /&gt;
* Tony P. [https://web.archive.org/web/20220725125722/https://idyl.io/how-to-add-usb-type-c-micro-usb-replacement/ &amp;quot;How to add USB Type C to your USB 2.0 projects&amp;quot;]: &amp;quot;replace the micro-USB / mini-USB ... 24 pin connectors are really unfriendly packages. They are very dense making it incredibly hard to reliably solder. The solution to this is to use a reduced pin count type C. ... &amp;quot;TYPE-C-31-M-12&amp;quot; ... by Korean Hroparts Elec [is a] 12 pin USB Type C connector&amp;quot;&lt;br /&gt;
* Sparkfun. [https://www.sparkfun.com/products/15424 &amp;quot;Reversible USB A to C Cable - 2m&amp;quot;]: &amp;quot;Supporting USB 2.0 speeds and charging up to 2A, ... the flexibility of a thinner cable and the wonderful feel of a '''reversible ... USB-A connection'''. ... This cable has the D+/D- wires along side large-gauge VBUS/GND wires.&amp;quot;&lt;br /&gt;
* SparkFun. [https://learn.sparkfun.com/tutorials/connector-basics/usb-connectors &amp;quot;Connector Basics: USB Connectors&amp;quot;]: &amp;quot;USB-B Connectors ... is bulky, but robust, so in applications where size is not an issue, it's the preferred means for providing a removable connector for USB connectivity.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* Matthew Lai. [https://dubiouscreations.com/2021/04/06/designing-with-usb-c-lessons-learned/ &amp;quot;Designing with USB-C: Lessons Learned&amp;quot;]: &amp;quot;Type-C connectors tend to be much harder to solder ... The standard is also much more complicated, though as we will see shortly, actual implementation is VERY simple if we just want to use it to replace micro-B in USB 2.0 devices (as opposed to hosts). ... USB 2.0-Only SMT ... connectors ... omit all the pins not required for USB 2.0... [such as] the Korean Hroparts TYPE-C-31-M-12 (LCSC part number C165948).&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* Morten Christiansen, Synopsys. [https://www.synopsys.com/designware-ip/technical-bulletin/converting-existing-designs.html &amp;quot;Converting Existing USB Designs to Support Type-C Connections&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
* [https://electronics.stackexchange.com/questions/473773/usb-type-c-alternative-with-fewer-signal-wires &amp;quot;USB Type-C Alternative with fewer signal wires&amp;quot;].&lt;br /&gt;
&lt;br /&gt;
== Magnetic connectors ==&lt;br /&gt;
&lt;br /&gt;
* Adafruit. [https://www.adafruit.com/product/5524 &amp;quot;Magnetic USB Type-C Plug Tip&amp;quot;] and the matching [https://www.adafruit.com/product/5520 &amp;quot;USB A or Type-C to Type-C Cable with Magnetic Tip - 1 meter long&amp;quot;].&lt;br /&gt;
&lt;br /&gt;
* [https://electronics.stackexchange.com/questions/473773/usb-type-c-alternative-with-fewer-signal-wires &amp;quot;USB Type-C Alternative with fewer signal wires&amp;quot;]: some of the answers mention magnetic connectors.&lt;br /&gt;
&lt;br /&gt;
* Adafruit. [https://www.adafruit.com/product/5359 &amp;quot;DIY Magnetic Connector - Right Angle Five Contact Pins&amp;quot;]. A set of 2 halves that magnetically attract.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Further reading ==&lt;br /&gt;
&lt;br /&gt;
*  SFUPTOWNMAKER, SparkFun member #23999 [https://learn.sparkfun.com/tutorials/connector-basics &amp;quot;Connector Basics&amp;quot;].&lt;br /&gt;
&lt;br /&gt;
[[Category:Connectors]][[Category:Components]]&lt;/div&gt;</summary>
		<author><name>Russ hensel</name></author>
		
	</entry>
	<entry>
		<id>http://www.opencircuits.com/index.php?title=Connectors&amp;diff=91720</id>
		<title>Connectors</title>
		<link rel="alternate" type="text/html" href="http://www.opencircuits.com/index.php?title=Connectors&amp;diff=91720"/>
		<updated>2024-09-06T13:04:22Z</updated>

		<summary type="html">&lt;p&gt;Russ hensel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Main-GM862header.jpg|69px|GM862 SMD Connector]]&lt;br /&gt;
[[GM862 SMD Connector]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Main-DB9-PCB-1.jpg||69px|DB9 Connector]]&lt;br /&gt;
[[DB9 Serial Connector]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Main-Barrel-Connector.jpg|69px|Barrel Jack]]&lt;br /&gt;
[[Barrel Power Jack]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Mini-USB.jpg|69px|Mini-USB]]&lt;br /&gt;
[[Mini-USB SMD connector]]&lt;br /&gt;
&lt;br /&gt;
[[Image:sf-microsd.jpg|69px|Mini-USB]]&lt;br /&gt;
[[MicroSD/Transflash Socket]]&lt;br /&gt;
&lt;br /&gt;
UEXT: universal expansion connector. The standard UEXT connector consists of ten pins (two rows of five, with 0.1&amp;quot; spacing) and supports I2C, SPI, and RS-232 serial communication, as well as carrying +3.3V power and common ground. -- [http://en.wikipedia.org/wiki/UEXT Wikipedia: UEXT]&lt;br /&gt;
&lt;br /&gt;
[[JTAG]] connectors?&lt;br /&gt;
&lt;br /&gt;
[[ideas#better data cable ideas]]&lt;br /&gt;
&lt;br /&gt;
Some connector companies in no particular order:&lt;br /&gt;
[[Samtec]], [[Molex]], &lt;br /&gt;
&lt;br /&gt;
Rather than wiring a connector up directly to a CPU, one typically has some [[input protection]] between them.&lt;br /&gt;
&lt;br /&gt;
The [[SFE Footprint Library]] includes a few connectors.&lt;br /&gt;
&lt;br /&gt;
Mark Whitis has a list of &amp;quot;common pitfalls of Micro Development Boards&amp;quot;.&lt;br /&gt;
He describes how the 26 pin connectors on his&lt;br /&gt;
[https://web.archive.org/web/20110929182706/http://www.freelabs.com/~whitis/electronics/9S12DP256/micro_board/ Mark Whitis Microcontroller Development Board]&lt;br /&gt;
avoid those pitfalls and&lt;br /&gt;
have many non-obvious features that make them superior to many other connectors.&lt;br /&gt;
&lt;br /&gt;
[http://techref.massmind.org/techref/pcbixmax.htm Massmind: &amp;quot;Maximum interconnect options from minimum board space&amp;quot;]&lt;br /&gt;
discusses a board pattern that gives you the option of plugging in any one of a variety of different connectors.&lt;br /&gt;
&lt;br /&gt;
Connectors and data cable ideas are further discussed at [[Ideas#better_data_cable_ideas]].&lt;br /&gt;
&lt;br /&gt;
== Power-only USB connectors and cables ==&lt;br /&gt;
&lt;br /&gt;
* Adafruit. [https://www.adafruit.com/product/4907 &amp;quot;USB C SMT / THM Jack Connector - Power Only&amp;quot;].&lt;br /&gt;
&lt;br /&gt;
* Simon Lewis. [https://www.instructables.com/USB-Condom/ &amp;quot;Make a USB Cable 'power Only'&amp;quot;].&lt;br /&gt;
* Charlie Sorrel. [https://www.cultofmac.com/632796/how-and-why-to-make-your-own-power-only-usb-cable/ &amp;quot;How (and why) to make your own power-only USB cable&amp;quot;].&lt;br /&gt;
* [https://arstechnica.com/civis/viewtopic.php?f=11&amp;amp;t=1377799 &amp;quot;I want to make a USB C charge only cable&amp;quot;].&lt;br /&gt;
&lt;br /&gt;
* Jeff Smoot. [https://www.cuidevices.com/blog/an-introduction-to-power-only-usb-type-c-connectors &amp;quot;An Introduction to Power-Only USB Type C Connectors&amp;quot;].&lt;br /&gt;
** Jeff Smoot. [https://www.digikey.com/en/articles/an-overview-of-usb-type-c-in-power-only-designs &amp;quot;An Overview of USB Type-C in Power-Only Designs&amp;quot;].&lt;br /&gt;
** [https://www.reddit.com/r/UsbCHardware/ Reddit &amp;quot;USB Type-C devices &amp;amp; hardware&amp;quot;] :  [https://www.reddit.com/r/UsbCHardware/comments/qo24e6/an_introduction_to_poweronly_usb_type_c_connectors/ comments on &amp;quot;An Introduction to Power-Only USB Type C Connectors&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
* [https://electronics.stackexchange.com/questions/140225/how-can-i-tell-charge-only-usb-cables-from-usb-data-cables &amp;quot;How can I tell charge-only USB cables from USB data cables?&amp;quot;].&lt;br /&gt;
* [https://electronics.stackexchange.com/questions/327791/using-usb-c-as-a-power-source &amp;quot;Using USB-C as a power source&amp;quot;].&lt;br /&gt;
* [https://hardwarerecs.stackexchange.com/questions/16164/what-is-the-max-usb-cable-type-a-male-to-type-c-male-volt-current-wattage-possib &amp;quot;What is the max USB cable type-A male to type-c male Volt/current/Wattage possible?&amp;quot;].&lt;br /&gt;
* [https://superuser.com/questions/961176/usb-type-c-power-delivery-profile-max-length &amp;quot;USB Type C Power Delivery ... max length?&amp;quot;]: &amp;quot;Is there a maximum length for a charging only cable?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* Matthew Lai. [https://dubiouscreations.com/2021/04/06/designing-with-usb-c-lessons-learned/ &amp;quot;Designing with USB-C: Lessons Learned&amp;quot;]: &amp;quot;Type-C connectors tend to be much harder to solder ... Power-Only SMT ... simpler connectors that only have power and the CC pins ... [such as] Korean Hroparts TYPE-C-31-M-17.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* [https://gct.co/news/6_pin_usb_type_c &amp;quot;GCT 6 Pin USB Type-C for Charging&amp;quot;]: [https://gct.co/usb-connector/list?style=Type%20C&amp;amp;version=Charging&amp;amp;interface=C &amp;quot;GCT USB Charging Connectors&amp;quot;]: GCT USB4125, GCT USB4135, GCT USB4515, GCT USB4715 Waterproof IP67 USB Type C Connector, GCT USB4180, GCT USB4130, GCT USB4140, GCT USB4175. All these USB C connectors have 6 contacts: the CC1 and CC2 pins used for USB PD negotiation, the 2 GND pins, and the 2 VBUS pins.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Directive 2022/2380 will require any electronical hand held devices marketed in the EU to contain a USB-C charging port.&amp;quot;&lt;br /&gt;
-- [https://gct.co/news/usb-eu-directive_2022_2380 &amp;quot;EU 2022/2380 directive - Are you (USB Type-C) compliant?&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
== USB-C breakout boards ==&lt;br /&gt;
&lt;br /&gt;
* SparkFun. [https://www.sparkfun.com/products/15100 &amp;quot;USB-C Breakout&amp;quot;]: &amp;quot;breaks out the USB-C connector's VBUS, GND, CC1, CC2, D+, and D- pins intro a 0.1&amp;quot; pitch header&amp;quot;&lt;br /&gt;
* SparkFun. [https://www.sparkfun.com/products/15096 &amp;quot;SparkFun Serial Basic Breakout - CH340C and USB-C&amp;quot;]: &amp;quot;USB-to-Serial adapter ... The pinout of the Serial Basic mimics the common DTR/RXI/TXO/VCC/CTS/GND pinout ...&amp;quot;&lt;br /&gt;
* Adafruit. [https://www.adafruit.com/product/5180 &amp;quot;Simple USB C Socket Breakout&amp;quot;]: &amp;quot;it doesn't break out all the pads - it just gives you the classic 4 USB pins&amp;quot; Vbus, D-, D+, GND.&lt;br /&gt;
* Adafruit. [https://www.adafruit.com/product/4090 &amp;quot;Adafruit USB Type C Breakout Board&amp;quot;] and [https://www.mouser.com/new/adafruit/adafruit-4090-usb-c-breakout-board/ &amp;quot;USB C Breakout Board&amp;quot;].&lt;br /&gt;
* Adafruit. [https://www.adafruit.com/product/4396 &amp;quot;USB Type C Socket - SMT Inline Breakout Board&amp;quot;]. with nearly all of the 24 pins broken out.&lt;br /&gt;
* Pololu. [https://www.pololu.com/product/2585 &amp;quot;USB 2.0 Type-C Connector Breakout Board&amp;quot;]: &amp;quot;The USB-C connector’s 24 tightly-spaced pins make it difficult to use in a hobby project or prototype design. This breakout board helps by providing access to the connector’s pins for power (VBUS and GND), USB 2.0 differential data (D+ and D−), Configuration Channel (CC), and Sideband Use (SBU).&amp;quot;&lt;br /&gt;
* Pololu. [https://www.pololu.com/product/3411 &amp;quot;USB 2.0 Type-C Connector Breakout Board&amp;quot;].&lt;br /&gt;
* PMD Way. [https://pmdway.com/products/usb-3-1-type-c-male-to-female-breakout-test-board &amp;quot;USB 3.1 Type C Male to Female Breakout Test Board&amp;quot;].&lt;br /&gt;
* Tinkersphere. [https://tinkersphere.com/mini-usb/3551-usb-31-type-c-male-breakout-board.html &amp;quot;Male USB C Breakout Board&amp;quot;] and [https://tinkersphere.com/mini-usb/3549-female-usb-c-breakout-board-smt-inline-socket.html &amp;quot;Female USB C Breakout Board&amp;quot;].&lt;br /&gt;
* Newegg. [https://www.newegg.com/p/181-0135-00082 &amp;quot;USB-C Male Plug Connector [Breakout] Board&amp;quot;].&lt;br /&gt;
&lt;br /&gt;
== Reduced pin count USB connectors and cables ==&lt;br /&gt;
&lt;br /&gt;
* Tony P. [https://web.archive.org/web/20220725125722/https://idyl.io/how-to-add-usb-type-c-micro-usb-replacement/ &amp;quot;How to add USB Type C to your USB 2.0 projects&amp;quot;]: &amp;quot;replace the micro-USB / mini-USB ... 24 pin connectors are really unfriendly packages. They are very dense making it incredibly hard to reliably solder. The solution to this is to use a reduced pin count type C. ... &amp;quot;TYPE-C-31-M-12&amp;quot; ... by Korean Hroparts Elec [is a] 12 pin USB Type C connector&amp;quot;&lt;br /&gt;
* Sparkfun. [https://www.sparkfun.com/products/15424 &amp;quot;Reversible USB A to C Cable - 2m&amp;quot;]: &amp;quot;Supporting USB 2.0 speeds and charging up to 2A, ... the flexibility of a thinner cable and the wonderful feel of a '''reversible ... USB-A connection'''. ... This cable has the D+/D- wires along side large-gauge VBUS/GND wires.&amp;quot;&lt;br /&gt;
* SparkFun. [https://learn.sparkfun.com/tutorials/connector-basics/usb-connectors &amp;quot;Connector Basics: USB Connectors&amp;quot;]: &amp;quot;USB-B Connectors ... is bulky, but robust, so in applications where size is not an issue, it's the preferred means for providing a removable connector for USB connectivity.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* Matthew Lai. [https://dubiouscreations.com/2021/04/06/designing-with-usb-c-lessons-learned/ &amp;quot;Designing with USB-C: Lessons Learned&amp;quot;]: &amp;quot;Type-C connectors tend to be much harder to solder ... The standard is also much more complicated, though as we will see shortly, actual implementation is VERY simple if we just want to use it to replace micro-B in USB 2.0 devices (as opposed to hosts). ... USB 2.0-Only SMT ... connectors ... omit all the pins not required for USB 2.0... [such as] the Korean Hroparts TYPE-C-31-M-12 (LCSC part number C165948).&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* Morten Christiansen, Synopsys. [https://www.synopsys.com/designware-ip/technical-bulletin/converting-existing-designs.html &amp;quot;Converting Existing USB Designs to Support Type-C Connections&amp;quot;]&lt;br /&gt;
&lt;br /&gt;
* [https://electronics.stackexchange.com/questions/473773/usb-type-c-alternative-with-fewer-signal-wires &amp;quot;USB Type-C Alternative with fewer signal wires&amp;quot;].&lt;br /&gt;
&lt;br /&gt;
== Magnetic connectors ==&lt;br /&gt;
&lt;br /&gt;
* Adafruit. [https://www.adafruit.com/product/5524 &amp;quot;Magnetic USB Type-C Plug Tip&amp;quot;] and the matching [https://www.adafruit.com/product/5520 &amp;quot;USB A or Type-C to Type-C Cable with Magnetic Tip - 1 meter long&amp;quot;].&lt;br /&gt;
&lt;br /&gt;
* [https://electronics.stackexchange.com/questions/473773/usb-type-c-alternative-with-fewer-signal-wires &amp;quot;USB Type-C Alternative with fewer signal wires&amp;quot;]: some of the answers mention magnetic connectors.&lt;br /&gt;
&lt;br /&gt;
* Adafruit. [https://www.adafruit.com/product/5359 &amp;quot;DIY Magnetic Connector - Right Angle Five Contact Pins&amp;quot;]. A set of 2 halves that magnetically attract.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Further reading ==&lt;br /&gt;
&lt;br /&gt;
*  SFUPTOWNMAKER, SparkFun member #23999 [https://learn.sparkfun.com/tutorials/connector-basics &amp;quot;Connector Basics&amp;quot;].&lt;br /&gt;
&lt;br /&gt;
[[Category:Connectors]][[Category:Components]]&lt;/div&gt;</summary>
		<author><name>Russ hensel</name></author>
		
	</entry>
	<entry>
		<id>http://www.opencircuits.com/index.php?title=Chemical_Etchants&amp;diff=91690</id>
		<title>Chemical Etchants</title>
		<link rel="alternate" type="text/html" href="http://www.opencircuits.com/index.php?title=Chemical_Etchants&amp;diff=91690"/>
		<updated>2024-08-01T11:29:35Z</updated>

		<summary type="html">&lt;p&gt;Russ hensel: Protected &amp;quot;Chemical Etchants&amp;quot;: Excessive vandalism ([Edit=Allow only administrators] (expires 11:29, 1 November 2024 (UTC)) [Move=Allow only administrators] (expires 11:29, 1 November 2024 (UTC)))&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{stub}}&lt;br /&gt;
&lt;br /&gt;
Chemical etching is one step of some popular [[techniques | PCB fabrication techniques]].&lt;br /&gt;
&lt;br /&gt;
In this technique,&lt;br /&gt;
* one starts with a copper-clad board.&lt;br /&gt;
* one puts a mask over all the copper he want to keep. There are a variety of ways to do this -- see [[Toner Transfer]] and [[Photoetching]].&lt;br /&gt;
* one removes the parts he don't want to keep, by chemically etching away the copper.&lt;br /&gt;
* cleanup: wash off the board in the sink; carefully store or dispose of the acid.&lt;br /&gt;
&lt;br /&gt;
There are a lot of different chemical techniques for doing this, each with its own advantages and drawbacks.&lt;br /&gt;
&lt;br /&gt;
None of these chemicals is incredibly dangerous, but they can all be toxic or caustic, and should be treated with care. Eye protection and gloves are a very good idea. Before you start, make sure you know how dangerous each chemical is, and figure out what you will need to do if you spill it or get it on yourself. Washing with plenty of water is usually a good start. For some chemicals you may want to keep a neutralizing agent handy. An MSDS (Materials Safety Data Sheet) for the chemical will give you some basic information.&lt;br /&gt;
&lt;br /&gt;
== vinegar and salt ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.kobakant.at/DIY/?p=2575 How to get what you want: Salt and Vinegar Etching]&lt;br /&gt;
* [http://www.flickr.com/photos/jeanbaptisteparis/4831465916/ smt pcb with Salt and Vinegar]&lt;br /&gt;
* [http://www.instructables.com/id/The-Saltwater-etch-process/ The Saltwater etch process]&lt;br /&gt;
* [http://www.electro-tech-online.com/general-electronics-chat/33876-electro-etching-no-acid.html electro etching a PCB with vinegar, salt, and a 12 V power supply] (the copper etched off the PCB is plated on the anode?) -- however, other people claim that &amp;quot;You should not be using any acids (or basic 'acids') with your [electro] etcher at all. No FeCl no vinegar, etc &amp;quot;.[http://www.bladeforums.com/forums/showthread.php?t=671936]&lt;br /&gt;
&lt;br /&gt;
== Ferric Chloride ==&lt;br /&gt;
This is the most common hobbyist etchant. Ferric chloride, FeCl&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt;, is a brownish substance. It's usually sold in a bottle (dissolved in water, perhaps with a little acid or peroxide) or as a powder (which you have to dissolve in water).&lt;br /&gt;
&lt;br /&gt;
When in solution, ferric chloride is a ferric ion (Fe&amp;lt;sup&amp;gt;3+&amp;lt;/sup&amp;gt;) and a chloride ion (Cl&amp;lt;sup&amp;gt;-&amp;lt;/sup&amp;gt;). The ferric ion reacts with the metallic copper on the circuit board in a redox reaction, producing a ferrous ion (Fe&amp;lt;sup&amp;gt;2+&amp;lt;/sup&amp;gt;) and cuprous or cupric (Cu&amp;lt;sup&amp;gt;1+&amp;lt;/sup&amp;gt; or Cu&amp;lt;sup&amp;gt;2+&amp;lt;/sup&amp;gt;) copper. The chlorine is just along for the ride. The copper ion, unlike the metallic copper, is soluble, so it leaves the circuit board and goes into solution. The reaction products form a black sludge which settles to the bottom of the etching tank. After etching enough copper, all your Fe&amp;lt;sup&amp;gt;3+&amp;lt;/sup&amp;gt; is used up and your solution is full of Cu&amp;lt;sup&amp;gt;1+&amp;lt;/sup&amp;gt;, and you need to get more etchant.&lt;br /&gt;
&lt;br /&gt;
== Ammonium Persulfate ==&lt;br /&gt;
Expensive &amp;amp; hard to control and optimize the process parameters (such as specific gravity &amp;amp; pH value).&lt;br /&gt;
&lt;br /&gt;
== HydroChloric Acid / Hydrogen Peroxide ==&lt;br /&gt;
&lt;br /&gt;
Mixing about 1 part HCl (Which can be found at most hardware stores, also known as Muriatic Acid. Ask for concrete cleaner.) into 2 parts Hydrogen peroxide (normally used for cleaning cuts) you can make a fairly powerful etchant. Use gloves and don't breathe the fumes though. This will etch a 3&amp;quot;x5&amp;quot; board in less than 10 minutes. No need to heat it up. I usually like to drill a small hole through the board on a corner and thread a wire or nylon string through to help agitate / remove the board.&lt;br /&gt;
&lt;br /&gt;
When the board is done etching, the etchant will probably look like green kool-aid, from the copper content in it. This stuff is highly corrosive and will burn skin, which is why you should wear gloves. But it is easy to handle, and fairly easy to dispose of. the etchant is easily deactivated with baking soda. Pour enough baking soda into it slowly (to keep it from boiling and overflowing... remember what happens with baking soda/vinegar? ya...) until it is a solid mass, then leave it in the sun to dry. You should contact your local authorities to find out what you should do with it next. Whatever you do, DO NOT dump the stuff down the drain, it will eat through your pipes just like any of the other etchants.&lt;br /&gt;
&lt;br /&gt;
Alternatively, instead of disposing of the etchant, you can re-use it again and again. In fact, after etching a few boards with this solution, you will have successfully made [[Chemical Etchants#Acid Cupric Chloride|Acid Cupric Chloride]] (see below).&lt;br /&gt;
You can also find a detailed tutorial on etching at [http://robotplatform.com/howto/pcb%20etching/pcb_etching_1.html Muriatic Acid etching tutorial]&lt;br /&gt;
&lt;br /&gt;
== Sodium Persulfate ==&lt;br /&gt;
More environmentally friendly than ferric chloride.  Can monitor the etching as initially clear new etchant solution turns blue from the copper ions.&lt;br /&gt;
&lt;br /&gt;
== Acid Cupric Chloride ==&lt;br /&gt;
Dead simple etchant made from ordinary, store-bought chemicals (hydrochloric acid and hydrogen peroxide). Has the advantage that it can be regenerated by bubbling oxygen/air through it, or by adding more H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;. In addition, it doesn't get used up: the etchant bath simply grows with use (kind of like sourdough starter…)&lt;br /&gt;
The used etchant also makes a great algecide/pH reducer for your pool (and a whole lot cheaper than that stuff they sell at the pool store).&lt;br /&gt;
&lt;br /&gt;
What you need:&lt;br /&gt;
* 38% Hydrochloric Acid, HCl (available at finer hardware stores or pool supply stores as Muriatic Acid)&lt;br /&gt;
* 3% Hydrogen Peroxide, H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; (available from any drug store)&lt;br /&gt;
* Plastic or Glass Pans, Jars, and tongs (no metal)&lt;br /&gt;
Directions:&lt;br /&gt;
&lt;br /&gt;
# Mix your HCl and H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; 1:1 in a non-metalic container, making sure to add the acid slowly to the H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;. DO NOT ADD THE H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; TO THE ACID!!!&lt;br /&gt;
# After you've masked your board, dip it in the solution and constantly agitate. You should notice a dark green cloud start to come from the board almost immedately which quickly dissapears or turns lighter as it gets further from the surface of the board.&lt;br /&gt;
# Etching should take about 10min depending on the temperature and how well you agitated the etchant. When all of the copper is gone, dip in water to wash off any stray etchant and stop the reaction.&lt;br /&gt;
# When done etching, save used etchant in a non-metalic container and mark clearly its contents.&lt;br /&gt;
# If your etchant has become a dark, murky green color, add a little bit of H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; or bubble air/O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; through the solution to regenerate it back to a light, transparent green color.&lt;br /&gt;
See links at bottom for more information on the chemistry and some pictures of the process.&lt;br /&gt;
&lt;br /&gt;
== Disposal procedures ==&lt;br /&gt;
Flushing used etchant down the drain is a bad idea (and usually illegal) because copper ion is toxic. The usual recommended way to dispose of hobbyist amounts of etchant is to convert it to a solid somehow and dispose of the solid in accordance with local laws.&lt;br /&gt;
&lt;br /&gt;
== External Links == &lt;br /&gt;
&lt;br /&gt;
* [http://www.instructables.com/id/Sponge-Ferric-Chloride-Method-Etch-Circuit-Bo/ &amp;quot;Sponge + Ferric Chloride Method -- Etch PCBs in One Minute!&amp;quot;]&lt;br /&gt;
* [http://www.k9spud.com/wiki/PCB:Etchants Ferric Chloride vs. Ammonium Persulfate] and other etching chemicals.&lt;br /&gt;
* [http://members.optusnet.com.au/~eseychell/PCB/etching_CuCl/index.html Etching with Air Regenerated Acid Cupric Chloride] — an excellent in-depth page on acid cupric chloride etching by Adam Seychell.&lt;br /&gt;
* [http://www.esmonde-white.com/home/diversions/etching-a-copper-pcb Etching a Copper PCB with HCl and H2O2]&lt;br /&gt;
* [http://www.mgchemicals.com/ MG Chemicals] A possible source?&lt;br /&gt;
* [http://reprap.org/wiki/MakePCBInstructions RepRap wiki: Make PCB instructions]&lt;br /&gt;
&lt;br /&gt;
== Internal Links ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*[[Toner Transfer]]&lt;br /&gt;
*[[Techniques]]&lt;br /&gt;
*[[Eagle Links]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Techniques]]&lt;/div&gt;</summary>
		<author><name>Russ hensel</name></author>
		
	</entry>
	<entry>
		<id>http://www.opencircuits.com/index.php?title=Chemical_Etchants&amp;diff=91689</id>
		<title>Chemical Etchants</title>
		<link rel="alternate" type="text/html" href="http://www.opencircuits.com/index.php?title=Chemical_Etchants&amp;diff=91689"/>
		<updated>2024-08-01T11:28:58Z</updated>

		<summary type="html">&lt;p&gt;Russ hensel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{stub}}&lt;br /&gt;
&lt;br /&gt;
Chemical etching is one step of some popular [[techniques | PCB fabrication techniques]].&lt;br /&gt;
&lt;br /&gt;
In this technique,&lt;br /&gt;
* one starts with a copper-clad board.&lt;br /&gt;
* one puts a mask over all the copper he want to keep. There are a variety of ways to do this -- see [[Toner Transfer]] and [[Photoetching]].&lt;br /&gt;
* one removes the parts he don't want to keep, by chemically etching away the copper.&lt;br /&gt;
* cleanup: wash off the board in the sink; carefully store or dispose of the acid.&lt;br /&gt;
&lt;br /&gt;
There are a lot of different chemical techniques for doing this, each with its own advantages and drawbacks.&lt;br /&gt;
&lt;br /&gt;
None of these chemicals is incredibly dangerous, but they can all be toxic or caustic, and should be treated with care. Eye protection and gloves are a very good idea. Before you start, make sure you know how dangerous each chemical is, and figure out what you will need to do if you spill it or get it on yourself. Washing with plenty of water is usually a good start. For some chemicals you may want to keep a neutralizing agent handy. An MSDS (Materials Safety Data Sheet) for the chemical will give you some basic information.&lt;br /&gt;
&lt;br /&gt;
== vinegar and salt ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.kobakant.at/DIY/?p=2575 How to get what you want: Salt and Vinegar Etching]&lt;br /&gt;
* [http://www.flickr.com/photos/jeanbaptisteparis/4831465916/ smt pcb with Salt and Vinegar]&lt;br /&gt;
* [http://www.instructables.com/id/The-Saltwater-etch-process/ The Saltwater etch process]&lt;br /&gt;
* [http://www.electro-tech-online.com/general-electronics-chat/33876-electro-etching-no-acid.html electro etching a PCB with vinegar, salt, and a 12 V power supply] (the copper etched off the PCB is plated on the anode?) -- however, other people claim that &amp;quot;You should not be using any acids (or basic 'acids') with your [electro] etcher at all. No FeCl no vinegar, etc &amp;quot;.[http://www.bladeforums.com/forums/showthread.php?t=671936]&lt;br /&gt;
&lt;br /&gt;
== Ferric Chloride ==&lt;br /&gt;
This is the most common hobbyist etchant. Ferric chloride, FeCl&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt;, is a brownish substance. It's usually sold in a bottle (dissolved in water, perhaps with a little acid or peroxide) or as a powder (which you have to dissolve in water).&lt;br /&gt;
&lt;br /&gt;
When in solution, ferric chloride is a ferric ion (Fe&amp;lt;sup&amp;gt;3+&amp;lt;/sup&amp;gt;) and a chloride ion (Cl&amp;lt;sup&amp;gt;-&amp;lt;/sup&amp;gt;). The ferric ion reacts with the metallic copper on the circuit board in a redox reaction, producing a ferrous ion (Fe&amp;lt;sup&amp;gt;2+&amp;lt;/sup&amp;gt;) and cuprous or cupric (Cu&amp;lt;sup&amp;gt;1+&amp;lt;/sup&amp;gt; or Cu&amp;lt;sup&amp;gt;2+&amp;lt;/sup&amp;gt;) copper. The chlorine is just along for the ride. The copper ion, unlike the metallic copper, is soluble, so it leaves the circuit board and goes into solution. The reaction products form a black sludge which settles to the bottom of the etching tank. After etching enough copper, all your Fe&amp;lt;sup&amp;gt;3+&amp;lt;/sup&amp;gt; is used up and your solution is full of Cu&amp;lt;sup&amp;gt;1+&amp;lt;/sup&amp;gt;, and you need to get more etchant.&lt;br /&gt;
&lt;br /&gt;
== Ammonium Persulfate ==&lt;br /&gt;
Expensive &amp;amp; hard to control and optimize the process parameters (such as specific gravity &amp;amp; pH value).&lt;br /&gt;
&lt;br /&gt;
== HydroChloric Acid / Hydrogen Peroxide ==&lt;br /&gt;
&lt;br /&gt;
Mixing about 1 part HCl (Which can be found at most hardware stores, also known as Muriatic Acid. Ask for concrete cleaner.) into 2 parts Hydrogen peroxide (normally used for cleaning cuts) you can make a fairly powerful etchant. Use gloves and don't breathe the fumes though. This will etch a 3&amp;quot;x5&amp;quot; board in less than 10 minutes. No need to heat it up. I usually like to drill a small hole through the board on a corner and thread a wire or nylon string through to help agitate / remove the board.&lt;br /&gt;
&lt;br /&gt;
When the board is done etching, the etchant will probably look like green kool-aid, from the copper content in it. This stuff is highly corrosive and will burn skin, which is why you should wear gloves. But it is easy to handle, and fairly easy to dispose of. the etchant is easily deactivated with baking soda. Pour enough baking soda into it slowly (to keep it from boiling and overflowing... remember what happens with baking soda/vinegar? ya...) until it is a solid mass, then leave it in the sun to dry. You should contact your local authorities to find out what you should do with it next. Whatever you do, DO NOT dump the stuff down the drain, it will eat through your pipes just like any of the other etchants.&lt;br /&gt;
&lt;br /&gt;
Alternatively, instead of disposing of the etchant, you can re-use it again and again. In fact, after etching a few boards with this solution, you will have successfully made [[Chemical Etchants#Acid Cupric Chloride|Acid Cupric Chloride]] (see below).&lt;br /&gt;
You can also find a detailed tutorial on etching at [http://robotplatform.com/howto/pcb%20etching/pcb_etching_1.html Muriatic Acid etching tutorial]&lt;br /&gt;
&lt;br /&gt;
== Sodium Persulfate ==&lt;br /&gt;
More environmentally friendly than ferric chloride.  Can monitor the etching as initially clear new etchant solution turns blue from the copper ions.&lt;br /&gt;
&lt;br /&gt;
== Acid Cupric Chloride ==&lt;br /&gt;
Dead simple etchant made from ordinary, store-bought chemicals (hydrochloric acid and hydrogen peroxide). Has the advantage that it can be regenerated by bubbling oxygen/air through it, or by adding more H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;. In addition, it doesn't get used up: the etchant bath simply grows with use (kind of like sourdough starter…)&lt;br /&gt;
The used etchant also makes a great algecide/pH reducer for your pool (and a whole lot cheaper than that stuff they sell at the pool store).&lt;br /&gt;
&lt;br /&gt;
What you need:&lt;br /&gt;
* 38% Hydrochloric Acid, HCl (available at finer hardware stores or pool supply stores as Muriatic Acid)&lt;br /&gt;
* 3% Hydrogen Peroxide, H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; (available from any drug store)&lt;br /&gt;
* Plastic or Glass Pans, Jars, and tongs (no metal)&lt;br /&gt;
Directions:&lt;br /&gt;
&lt;br /&gt;
# Mix your HCl and H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; 1:1 in a non-metalic container, making sure to add the acid slowly to the H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;. DO NOT ADD THE H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; TO THE ACID!!!&lt;br /&gt;
# After you've masked your board, dip it in the solution and constantly agitate. You should notice a dark green cloud start to come from the board almost immedately which quickly dissapears or turns lighter as it gets further from the surface of the board.&lt;br /&gt;
# Etching should take about 10min depending on the temperature and how well you agitated the etchant. When all of the copper is gone, dip in water to wash off any stray etchant and stop the reaction.&lt;br /&gt;
# When done etching, save used etchant in a non-metalic container and mark clearly its contents.&lt;br /&gt;
# If your etchant has become a dark, murky green color, add a little bit of H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; or bubble air/O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; through the solution to regenerate it back to a light, transparent green color.&lt;br /&gt;
See links at bottom for more information on the chemistry and some pictures of the process.&lt;br /&gt;
&lt;br /&gt;
== Disposal procedures ==&lt;br /&gt;
Flushing used etchant down the drain is a bad idea (and usually illegal) because copper ion is toxic. The usual recommended way to dispose of hobbyist amounts of etchant is to convert it to a solid somehow and dispose of the solid in accordance with local laws.&lt;br /&gt;
&lt;br /&gt;
== External Links == &lt;br /&gt;
&lt;br /&gt;
* [http://www.instructables.com/id/Sponge-Ferric-Chloride-Method-Etch-Circuit-Bo/ &amp;quot;Sponge + Ferric Chloride Method -- Etch PCBs in One Minute!&amp;quot;]&lt;br /&gt;
* [http://www.k9spud.com/wiki/PCB:Etchants Ferric Chloride vs. Ammonium Persulfate] and other etching chemicals.&lt;br /&gt;
* [http://members.optusnet.com.au/~eseychell/PCB/etching_CuCl/index.html Etching with Air Regenerated Acid Cupric Chloride] — an excellent in-depth page on acid cupric chloride etching by Adam Seychell.&lt;br /&gt;
* [http://www.esmonde-white.com/home/diversions/etching-a-copper-pcb Etching a Copper PCB with HCl and H2O2]&lt;br /&gt;
* [http://www.mgchemicals.com/ MG Chemicals] A possible source?&lt;br /&gt;
* [http://reprap.org/wiki/MakePCBInstructions RepRap wiki: Make PCB instructions]&lt;br /&gt;
&lt;br /&gt;
== Internal Links ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*[[Toner Transfer]]&lt;br /&gt;
*[[Techniques]]&lt;br /&gt;
*[[Eagle Links]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Techniques]]&lt;/div&gt;</summary>
		<author><name>Russ hensel</name></author>
		
	</entry>
	<entry>
		<id>http://www.opencircuits.com/index.php?title=Chemical_Etchants&amp;diff=91681</id>
		<title>Chemical Etchants</title>
		<link rel="alternate" type="text/html" href="http://www.opencircuits.com/index.php?title=Chemical_Etchants&amp;diff=91681"/>
		<updated>2024-07-23T15:13:08Z</updated>

		<summary type="html">&lt;p&gt;Russ hensel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{stub}}&lt;br /&gt;
&lt;br /&gt;
Chemical etching is one step of some popular [[techniques | PCB fabrication techniques]].&lt;br /&gt;
&lt;br /&gt;
In this technique,&lt;br /&gt;
* one starts with a copper-clad board.&lt;br /&gt;
* one puts a mask over all the copper he want to keep. There are a variety of ways to do this -- see [[Toner Transfer]] and [[Photoetching]].&lt;br /&gt;
* one removes the parts he don't want to keep, by chemically etching away the copper.&lt;br /&gt;
* cleanup: wash off the board in the sink; carefully store or dispose of the acid.&lt;br /&gt;
&lt;br /&gt;
There are a lot of different chemical techniques for doing this, each with its own advantages and drawbacks.&lt;br /&gt;
&lt;br /&gt;
None of these chemicals is incredibly dangerous, but they can all be toxic or caustic, and should be treated with care. Eye protection and gloves are a very good idea. Before you start, make sure you know how dangerous each chemical is, and figure out what you will need to do if you spill it or get it on yourself. Washing with plenty of water is usually a good start. For some chemicals you may want to keep a neutralizing agent handy. An MSDS (Materials Safety Data Sheet) for the chemical will give you some basic information.&lt;br /&gt;
&lt;br /&gt;
== vinegar and salt ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.kobakant.at/DIY/?p=2575 How to get what you want: Salt and Vinegar Etching]&lt;br /&gt;
* [http://www.flickr.com/photos/jeanbaptisteparis/4831465916/ smt pcb with Salt and Vinegar]&lt;br /&gt;
* [http://www.instructables.com/id/The-Saltwater-etch-process/ The Saltwater etch process]&lt;br /&gt;
* [http://www.electro-tech-online.com/general-electronics-chat/33876-electro-etching-no-acid.html electro etching a PCB with vinegar, salt, and a 12 V power supply] (the copper etched off the PCB is plated on the anode?) -- however, other people claim that &amp;quot;You should not be using any acids (or basic 'acids') with your [electro] etcher at all. No FeCl no vinegar, etc &amp;quot;.[http://www.bladeforums.com/forums/showthread.php?t=671936]&lt;br /&gt;
&lt;br /&gt;
== Ferric Chloride ==&lt;br /&gt;
This is the most common hobbyist etchant. Ferric chloride, FeCl&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt;, is a brownish substance. It's usually sold in a bottle (dissolved in water, perhaps with a little acid or peroxide) or as a powder (which you have to dissolve in water).&lt;br /&gt;
&lt;br /&gt;
When in solution, ferric chloride is a ferric ion (Fe&amp;lt;sup&amp;gt;3+&amp;lt;/sup&amp;gt;) and a chloride ion (Cl&amp;lt;sup&amp;gt;-&amp;lt;/sup&amp;gt;). The ferric ion reacts with the metallic copper on the circuit board in a redox reaction, producing a ferrous ion (Fe&amp;lt;sup&amp;gt;2+&amp;lt;/sup&amp;gt;) and cuprous or cupric (Cu&amp;lt;sup&amp;gt;1+&amp;lt;/sup&amp;gt; or Cu&amp;lt;sup&amp;gt;2+&amp;lt;/sup&amp;gt;) copper. The chlorine is just along for the ride. The copper ion, unlike the metallic copper, is soluble, so it leaves the circuit board and goes into solution. The reaction products form a black sludge which settles to the bottom of the etching tank. After etching enough copper, all your Fe&amp;lt;sup&amp;gt;3+&amp;lt;/sup&amp;gt; is used up and your solution is full of Cu&amp;lt;sup&amp;gt;1+&amp;lt;/sup&amp;gt;, and you need to get more etchant.&lt;br /&gt;
&lt;br /&gt;
== Ammonium Persulfate ==&lt;br /&gt;
Expensive &amp;amp; hard to control and optimize the process parameters (such as specific gravity &amp;amp; pH value).&lt;br /&gt;
&lt;br /&gt;
== HydroChloric Acid / Hydrogen Peroxide ==&lt;br /&gt;
&lt;br /&gt;
Mixing about 1 part HCl (Which can be found at most hardware stores, also known as Muriatic Acid. Ask for concrete cleaner.) into 2 parts Hydrogen peroxide (normally used for cleaning cuts) you can make a fairly powerful etchant. Use gloves and don't breathe the fumes though. This will etch a 3&amp;quot;x5&amp;quot; board in less than 10 minutes. No need to heat it up. I usually like to drill a small hole through the board on a corner and thread a wire or nylon string through to help agitate / remove the board.&lt;br /&gt;
&lt;br /&gt;
When the board is done etching, the etchant will probably look like green kool-aid, from the copper content in it. This stuff is highly corrosive and will burn skin, which is why you should wear gloves. But it is easy to handle, and fairly easy to dispose of. the etchant is easily deactivated with baking soda. Pour enough baking soda into it slowly (to keep it from boiling and overflowing... remember what happens with baking soda/vinegar? ya...) until it is a solid mass, then leave it in the sun to dry. You should contact your local authorities to find out what you should do with it next. Whatever you do, DO NOT dump the stuff down the drain, it will eat through your pipes just like any of the other etchants.&lt;br /&gt;
&lt;br /&gt;
Alternatively, instead of disposing of the etchant, you can re-use it again and again. In fact, after etching a few boards with this solution, you will have successfully made [[Chemical Etchants#Acid Cupric Chloride|Acid Cupric Chloride]] (see below).&lt;br /&gt;
You can also find a detailed tutorial on etching at [http://robotplatform.com/howto/pcb%20etching/pcb_etching_1.html Muriatic Acid etching tutorial]&lt;br /&gt;
&lt;br /&gt;
== Sodium Persulfate ==&lt;br /&gt;
More environmentally friendly than ferric chloride.  Can monitor the etching as initially clear new etchant solution turns blue from the copper ions.&lt;br /&gt;
&lt;br /&gt;
== Acid Cupric Chloride ==&lt;br /&gt;
Dead simple etchant made from ordinary, store-bought chemicals (hydrochloric acid and hydrogen peroxide). Has the advantage that it can be regenerated by bubbling oxygen/air through it, or by adding more H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;. In addition, it doesn't get used up: the etchant bath simply grows with use (kind of like sourdough starter…)&lt;br /&gt;
The used etchant also makes a great algecide/pH reducer for your pool (and a whole lot cheaper than that stuff they sell at the pool store).&lt;br /&gt;
&lt;br /&gt;
What you need:&lt;br /&gt;
* 38% Hydrochloric Acid, HCl (available at finer hardware stores or pool supply stores as Muriatic Acid)&lt;br /&gt;
* 3% Hydrogen Peroxide, H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; (available from any drug store)&lt;br /&gt;
* Plastic or Glass Pans, Jars, and tongs (no metal)&lt;br /&gt;
Directions:&lt;br /&gt;
&lt;br /&gt;
# Mix your HCl and H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; 1:1 in a non-metalic container, making sure to add the acid slowly to the H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;. DO NOT ADD THE H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; TO THE ACID!!!&lt;br /&gt;
# After you've masked your board, dip it in the solution and constantly agitate. You should notice a dark green cloud start to come from the board almost immedately which quickly dissapears or turns lighter as it gets further from the surface of the board.&lt;br /&gt;
# Etching should take about 10min depending on the temperature and how well you agitated the etchant. When all of the copper is gone, dip in water to wash off any stray etchant and stop the reaction.&lt;br /&gt;
# When done etching, save used etchant in a non-metalic container and mark clearly its contents.&lt;br /&gt;
# If your etchant has become a dark, murky green color, add a little bit of H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; or bubble air/O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; through the solution to regenerate it back to a light, transparent green color.&lt;br /&gt;
See links at bottom for more information on the chemistry and some pictures of the process.&lt;br /&gt;
&lt;br /&gt;
== Disposal procedures ==&lt;br /&gt;
Flushing used etchant down the drain is a bad idea (and usually illegal) because copper ion is toxic. The usual recommended way to dispose of hobbyist amounts of etchant is to convert it to a solid somehow and dispose of the solid in accordance with local laws.&lt;br /&gt;
&lt;br /&gt;
== External Links == &lt;br /&gt;
&lt;br /&gt;
* [http://www.instructables.com/id/Sponge-Ferric-Chloride-Method-Etch-Circuit-Bo/ &amp;quot;Sponge + Ferric Chloride Method -- Etch PCBs in One Minute!&amp;quot;]&lt;br /&gt;
* [http://www.k9spud.com/wiki/PCB:Etchants Ferric Chloride vs. Ammonium Persulfate] and other etching chemicals.&lt;br /&gt;
* [http://members.optusnet.com.au/~eseychell/PCB/etching_CuCl/index.html Etching with Air Regenerated Acid Cupric Chloride] — an excellent in-depth page on acid cupric chloride etching by Adam Seychell.&lt;br /&gt;
* [http://www.esmonde-white.com/home/diversions/etching-a-copper-pcb Etching a Copper PCB with HCl and H2O2]&lt;br /&gt;
* [http://www.mgchemicals.com/ MG Chemicals] A possible source?&lt;br /&gt;
* [http://reprap.org/wiki/MakePCBInstructions RepRap wiki: Make PCB instructions]&lt;br /&gt;
&lt;br /&gt;
== Internal Links ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*[[Toner Transfer]]&lt;br /&gt;
*[[Techniques]]&lt;br /&gt;
*[[Eagle Links]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Techniques]]&lt;/div&gt;</summary>
		<author><name>Russ hensel</name></author>
		
	</entry>
	<entry>
		<id>http://www.opencircuits.com/index.php?title=Russ_hensel&amp;diff=90767</id>
		<title>Russ hensel</title>
		<link rel="alternate" type="text/html" href="http://www.opencircuits.com/index.php?title=Russ_hensel&amp;diff=90767"/>
		<updated>2024-02-17T15:17:57Z</updated>

		<summary type="html">&lt;p&gt;Russ hensel: /* Related to Python */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= About Me =&lt;br /&gt;
I am a once upon a time high school teacher and database programmer/software engineer.  My hobbies now are gardening, Python programming, microcontrollers, Physics/Math, my cats and whatnot.  I have a nice wood shop, some metal working tools, and am learning to weld. I have a fairly large collection of scientific antiques, mostly microscopes, surveying instruments, and electronics test equipment.  Online my name is often russ_hensel, gives me a pretty unique id on Google.  I live in Dartmouth Ma.&lt;br /&gt;
&lt;br /&gt;
I am now on Facebook, but do not post much.&lt;br /&gt;
&lt;br /&gt;
I have posted a few Instructables, find me there at:  [http://www.instructables.com/member/russ_hensel/ Instructables member: russ_hensel]&lt;br /&gt;
&lt;br /&gt;
I have done a fair amount in Python.  I am now keeping my files at github:  https://github.com/russ-hensel  For some there may be info here, other not.&lt;br /&gt;
&lt;br /&gt;
You can reach me ( EMAIL ) at: no_spam_please_666 at comcast dot net (REFORMAT FOR A VALID EMAIL ADDRESS).  This address is just for first contact, I will respond with a better address after first contact.&lt;br /&gt;
&lt;br /&gt;
On this site I tend to write about the following topics&lt;br /&gt;
&lt;br /&gt;
* Electronics in general ( still doing it at home, but not writing about it much ).&lt;br /&gt;
* Microcontrollers, PIC in the past now the Arduino&lt;br /&gt;
* Python and my Python Projects&lt;br /&gt;
* Raspberry Pi&lt;br /&gt;
* 3D Printing and FreeCad ( bought first printer in 2017,  second one too )&lt;br /&gt;
* BoostC - now replaced by C++ in context of the Arduino&lt;br /&gt;
* Stepper Motors -- used in several of my projects. Usually in catagories with Arduino&lt;br /&gt;
&lt;br /&gt;
= About My Articles =&lt;br /&gt;
&lt;br /&gt;
I write about items as they interest me.  Too often I start on something and drop either the article or the project for short or long periods befor picking it up again.  Sorry.  I am open to email with questions, this may make me complete or improve some article.  If you are interested please let me know.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You may find that some pages say something like:&lt;br /&gt;
&lt;br /&gt;
This is an article started by Russ Hensel, see &amp;quot;http://www.opencircuits.com/index.php?title=Russ_hensel#About My Articles&amp;quot; '''About My Articles''' for a bit of info.  The page is only partly finished&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== My Editing Links ==&lt;br /&gt;
&lt;br /&gt;
These links are for me to navigate to pages I have done quite a bit of work on or want to look at frequently.  They are not for you, but you can use them if you want.  &lt;br /&gt;
&lt;br /&gt;
*[[Mushroom Resources]]&lt;br /&gt;
*[[Vivek]]&lt;br /&gt;
&lt;br /&gt;
*[[Russ Page Links]]&lt;br /&gt;
&lt;br /&gt;
*[[Russ Editing Links]]  probably dead&lt;br /&gt;
&lt;br /&gt;
= Articles posted here on Open Circuits =&lt;br /&gt;
&lt;br /&gt;
== Serial Communications and Microcontrollers ==&lt;br /&gt;
&lt;br /&gt;
*[[Python Smart Terminal]]  As of Sept 2016 still and active project.&lt;br /&gt;
*[http://www.opencircuits.com/Category:Microcontroller Category:Serial_Communications] Most of these have at least large input from me.  Some are general, some for the Arduino, and some for the PIC microcontroller.&lt;br /&gt;
*[http://www.opencircuits.com/Category:PIC Category:PIC] I have mostly converted to the Arduino, but before that I used the PIC, still think it is a nice micro controller, but building the boards and finding a coding environment.... is more of a pain than I want.&lt;br /&gt;
&lt;br /&gt;
*[http://www.opencircuits.com/Category:Arduino Category:Arduino] After my conversion from PIC.&lt;br /&gt;
&lt;br /&gt;
= Articles posted on Instructables =&lt;br /&gt;
&lt;br /&gt;
== Related to Python ==&lt;br /&gt;
[[Programing Tips]]&lt;br /&gt;
&lt;br /&gt;
*[[Python White Space]]&lt;br /&gt;
*[[Random Python]]&lt;br /&gt;
*[[Russ Suggests an Arduino Setup]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*[[Learning Python]]&lt;br /&gt;
*[[Other Maker Spaces South Coast]]&lt;br /&gt;
 &lt;br /&gt;
    Workshop Template&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*'''[http://www.instructables.com/id/Python-Terminal-for-Cheap-Pi-Arduino-Connection/ Python Terminal for Cheap Pi Arduino Connection - All ]'''&lt;br /&gt;
*'''[http://www.instructables.com/id/Experiments-in-Advanced-Data-Logging-Using-Python-/ Experiments in Advanced Data Logging ( Using Python ) - All ]'''&lt;br /&gt;
*'''[http://www.instructables.com/id/Incredibility-Powerful-Resistance-Calculator/ Incredibility Powerful Resistance Calculator - All ]'''&lt;br /&gt;
*'''[http://www.instructables.com/id/Use-Sage-and-Sell-Your-Calculator-before-it-is-Too/ Use Sage and Sell Your Calculator before it is Too Late - All ]'''&lt;br /&gt;
*'''[http://www.instructables.com/id/Python-Autoexec-for-Your-Raspberry-Pi/ Python Autoexec for Your Raspberry Pi - All ]'''&lt;br /&gt;
*'''[http://www.instructables.com/id/ClipBoard-Communication-PC-Pi-With-Python/ ClipBoard Communication PC ↔ Pi With Python - All ]'''&lt;br /&gt;
*'''[http://www.instructables.com/id/Graph-Your-Solar-Power/ Graph Your Solar Power - All ]'''&lt;br /&gt;
*'''[http://www.instructables.com/id/Graph-Instructable-Views-with-Pypthon-Screen-Scrap/ Graph Instructable Views with Python Screen Scraping - All ]'''&lt;br /&gt;
*'''[http://www.instructables.com/id/Digital-Picture-Management-Eliminate-Weak-Photos-w/ Digital Picture Management - Del Weak Pics with Python - All ]'''&lt;br /&gt;
&lt;br /&gt;
== Related to Arduino ==&lt;br /&gt;
&lt;br /&gt;
[[Pi Setup Nov 2016]]&lt;br /&gt;
&lt;br /&gt;
*'''[http://www.instructables.com/id/Backup-Your-Pi/ Backup Your Pi - All ]'''&lt;br /&gt;
*'''[http://www.instructables.com/id/Python-Autoexec-for-Your-Raspberry-Pi/ Python Autoexec for Your Raspberry Pi - All ]'''&lt;br /&gt;
*'''[http://www.instructables.com/id/ClipBoard-Communication-PC-Pi-With-Python/ ClipBoard Communication PC ↔ Pi With Python - All ]'''&lt;br /&gt;
&lt;br /&gt;
== Related to Electronics ==&lt;br /&gt;
&lt;br /&gt;
[[PiSetup]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*'''[http://www.instructables.com/id/Electronics-Building-Tips-in-21-Plus-Steps-/ Electronics Building Tips ( in 21 Plus Steps ) - All ]'''&lt;br /&gt;
*'''[http://www.instructables.com/id/More-Electronics-Building-Tips-in-21-plus-more-ste/ More Electronics Building Tips ( in 21 plus more steps ) - All ]'''&lt;br /&gt;
*'''[http://www.instructables.com/id/Comprehensive-Guide-to-Electronic-Breadboards-A-Me/ Comprehensive Guide to Electronic Breadboards: A Meta Instructable - All ]'''&lt;br /&gt;
*'''[http://www.instructables.com/id/Three-in-One-IC-Continuity-Tester-Signal-Generator/ Three in One: IC/ Continuity Tester, &amp;amp; Signal Generator - All ]'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
us double brackes for categories&lt;br /&gt;
&lt;br /&gt;
   category:Member Page&lt;br /&gt;
   category:salvage&lt;br /&gt;
   category:Test Instrument&lt;br /&gt;
   category:Serial Communications&lt;br /&gt;
   category:Microcontroller&lt;br /&gt;
   category:PIC&lt;br /&gt;
   category:Test Instrument&lt;br /&gt;
   category:Test Instrument&lt;br /&gt;
   [[category:BoostC]]&lt;/div&gt;</summary>
		<author><name>Russ hensel</name></author>
		
	</entry>
	<entry>
		<id>http://www.opencircuits.com/index.php?title=Russ_hensel&amp;diff=90766</id>
		<title>Russ hensel</title>
		<link rel="alternate" type="text/html" href="http://www.opencircuits.com/index.php?title=Russ_hensel&amp;diff=90766"/>
		<updated>2024-02-17T15:16:24Z</updated>

		<summary type="html">&lt;p&gt;Russ hensel: /* Related to Python */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= About Me =&lt;br /&gt;
I am a once upon a time high school teacher and database programmer/software engineer.  My hobbies now are gardening, Python programming, microcontrollers, Physics/Math, my cats and whatnot.  I have a nice wood shop, some metal working tools, and am learning to weld. I have a fairly large collection of scientific antiques, mostly microscopes, surveying instruments, and electronics test equipment.  Online my name is often russ_hensel, gives me a pretty unique id on Google.  I live in Dartmouth Ma.&lt;br /&gt;
&lt;br /&gt;
I am now on Facebook, but do not post much.&lt;br /&gt;
&lt;br /&gt;
I have posted a few Instructables, find me there at:  [http://www.instructables.com/member/russ_hensel/ Instructables member: russ_hensel]&lt;br /&gt;
&lt;br /&gt;
I have done a fair amount in Python.  I am now keeping my files at github:  https://github.com/russ-hensel  For some there may be info here, other not.&lt;br /&gt;
&lt;br /&gt;
You can reach me ( EMAIL ) at: no_spam_please_666 at comcast dot net (REFORMAT FOR A VALID EMAIL ADDRESS).  This address is just for first contact, I will respond with a better address after first contact.&lt;br /&gt;
&lt;br /&gt;
On this site I tend to write about the following topics&lt;br /&gt;
&lt;br /&gt;
* Electronics in general ( still doing it at home, but not writing about it much ).&lt;br /&gt;
* Microcontrollers, PIC in the past now the Arduino&lt;br /&gt;
* Python and my Python Projects&lt;br /&gt;
* Raspberry Pi&lt;br /&gt;
* 3D Printing and FreeCad ( bought first printer in 2017,  second one too )&lt;br /&gt;
* BoostC - now replaced by C++ in context of the Arduino&lt;br /&gt;
* Stepper Motors -- used in several of my projects. Usually in catagories with Arduino&lt;br /&gt;
&lt;br /&gt;
= About My Articles =&lt;br /&gt;
&lt;br /&gt;
I write about items as they interest me.  Too often I start on something and drop either the article or the project for short or long periods befor picking it up again.  Sorry.  I am open to email with questions, this may make me complete or improve some article.  If you are interested please let me know.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You may find that some pages say something like:&lt;br /&gt;
&lt;br /&gt;
This is an article started by Russ Hensel, see &amp;quot;http://www.opencircuits.com/index.php?title=Russ_hensel#About My Articles&amp;quot; '''About My Articles''' for a bit of info.  The page is only partly finished&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== My Editing Links ==&lt;br /&gt;
&lt;br /&gt;
These links are for me to navigate to pages I have done quite a bit of work on or want to look at frequently.  They are not for you, but you can use them if you want.  &lt;br /&gt;
&lt;br /&gt;
*[[Mushroom Resources]]&lt;br /&gt;
*[[Vivek]]&lt;br /&gt;
&lt;br /&gt;
*[[Russ Page Links]]&lt;br /&gt;
&lt;br /&gt;
*[[Russ Editing Links]]  probably dead&lt;br /&gt;
&lt;br /&gt;
= Articles posted here on Open Circuits =&lt;br /&gt;
&lt;br /&gt;
== Serial Communications and Microcontrollers ==&lt;br /&gt;
&lt;br /&gt;
*[[Python Smart Terminal]]  As of Sept 2016 still and active project.&lt;br /&gt;
*[http://www.opencircuits.com/Category:Microcontroller Category:Serial_Communications] Most of these have at least large input from me.  Some are general, some for the Arduino, and some for the PIC microcontroller.&lt;br /&gt;
*[http://www.opencircuits.com/Category:PIC Category:PIC] I have mostly converted to the Arduino, but before that I used the PIC, still think it is a nice micro controller, but building the boards and finding a coding environment.... is more of a pain than I want.&lt;br /&gt;
&lt;br /&gt;
*[http://www.opencircuits.com/Category:Arduino Category:Arduino] After my conversion from PIC.&lt;br /&gt;
&lt;br /&gt;
= Articles posted on Instructables =&lt;br /&gt;
&lt;br /&gt;
== Related to Python ==&lt;br /&gt;
[[Programing Tips]]&lt;br /&gt;
&lt;br /&gt;
*[[Python White Space]]&lt;br /&gt;
*[[Random Python]]&lt;br /&gt;
*[[Russ Suggests an Arduino Setup]]&lt;br /&gt;
&lt;br /&gt;
*'''[http://www.instructables.com/id/Python-Terminal-for-Cheap-Pi-Arduino-Connection/ Python Terminal for Cheap Pi Arduino Connection - All ]'''&lt;br /&gt;
*'''[http://www.instructables.com/id/Experiments-in-Advanced-Data-Logging-Using-Python-/ Experiments in Advanced Data Logging ( Using Python ) - All ]'''&lt;br /&gt;
*'''[http://www.instructables.com/id/Incredibility-Powerful-Resistance-Calculator/ Incredibility Powerful Resistance Calculator - All ]'''&lt;br /&gt;
*'''[http://www.instructables.com/id/Use-Sage-and-Sell-Your-Calculator-before-it-is-Too/ Use Sage and Sell Your Calculator before it is Too Late - All ]'''&lt;br /&gt;
*'''[http://www.instructables.com/id/Python-Autoexec-for-Your-Raspberry-Pi/ Python Autoexec for Your Raspberry Pi - All ]'''&lt;br /&gt;
*'''[http://www.instructables.com/id/ClipBoard-Communication-PC-Pi-With-Python/ ClipBoard Communication PC ↔ Pi With Python - All ]'''&lt;br /&gt;
*'''[http://www.instructables.com/id/Graph-Your-Solar-Power/ Graph Your Solar Power - All ]'''&lt;br /&gt;
*'''[http://www.instructables.com/id/Graph-Instructable-Views-with-Pypthon-Screen-Scrap/ Graph Instructable Views with Python Screen Scraping - All ]'''&lt;br /&gt;
*'''[http://www.instructables.com/id/Digital-Picture-Management-Eliminate-Weak-Photos-w/ Digital Picture Management - Del Weak Pics with Python - All ]'''&lt;br /&gt;
&lt;br /&gt;
== Related to Arduino ==&lt;br /&gt;
&lt;br /&gt;
[[Pi Setup Nov 2016]]&lt;br /&gt;
&lt;br /&gt;
*'''[http://www.instructables.com/id/Backup-Your-Pi/ Backup Your Pi - All ]'''&lt;br /&gt;
*'''[http://www.instructables.com/id/Python-Autoexec-for-Your-Raspberry-Pi/ Python Autoexec for Your Raspberry Pi - All ]'''&lt;br /&gt;
*'''[http://www.instructables.com/id/ClipBoard-Communication-PC-Pi-With-Python/ ClipBoard Communication PC ↔ Pi With Python - All ]'''&lt;br /&gt;
&lt;br /&gt;
== Related to Electronics ==&lt;br /&gt;
&lt;br /&gt;
[[PiSetup]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*'''[http://www.instructables.com/id/Electronics-Building-Tips-in-21-Plus-Steps-/ Electronics Building Tips ( in 21 Plus Steps ) - All ]'''&lt;br /&gt;
*'''[http://www.instructables.com/id/More-Electronics-Building-Tips-in-21-plus-more-ste/ More Electronics Building Tips ( in 21 plus more steps ) - All ]'''&lt;br /&gt;
*'''[http://www.instructables.com/id/Comprehensive-Guide-to-Electronic-Breadboards-A-Me/ Comprehensive Guide to Electronic Breadboards: A Meta Instructable - All ]'''&lt;br /&gt;
*'''[http://www.instructables.com/id/Three-in-One-IC-Continuity-Tester-Signal-Generator/ Three in One: IC/ Continuity Tester, &amp;amp; Signal Generator - All ]'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
us double brackes for categories&lt;br /&gt;
&lt;br /&gt;
   category:Member Page&lt;br /&gt;
   category:salvage&lt;br /&gt;
   category:Test Instrument&lt;br /&gt;
   category:Serial Communications&lt;br /&gt;
   category:Microcontroller&lt;br /&gt;
   category:PIC&lt;br /&gt;
   category:Test Instrument&lt;br /&gt;
   category:Test Instrument&lt;br /&gt;
   [[category:BoostC]]&lt;/div&gt;</summary>
		<author><name>Russ hensel</name></author>
		
	</entry>
	<entry>
		<id>http://www.opencircuits.com/index.php?title=Russ_hensel&amp;diff=90765</id>
		<title>Russ hensel</title>
		<link rel="alternate" type="text/html" href="http://www.opencircuits.com/index.php?title=Russ_hensel&amp;diff=90765"/>
		<updated>2024-02-17T15:14:59Z</updated>

		<summary type="html">&lt;p&gt;Russ hensel: /* Related to Python */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= About Me =&lt;br /&gt;
I am a once upon a time high school teacher and database programmer/software engineer.  My hobbies now are gardening, Python programming, microcontrollers, Physics/Math, my cats and whatnot.  I have a nice wood shop, some metal working tools, and am learning to weld. I have a fairly large collection of scientific antiques, mostly microscopes, surveying instruments, and electronics test equipment.  Online my name is often russ_hensel, gives me a pretty unique id on Google.  I live in Dartmouth Ma.&lt;br /&gt;
&lt;br /&gt;
I am now on Facebook, but do not post much.&lt;br /&gt;
&lt;br /&gt;
I have posted a few Instructables, find me there at:  [http://www.instructables.com/member/russ_hensel/ Instructables member: russ_hensel]&lt;br /&gt;
&lt;br /&gt;
I have done a fair amount in Python.  I am now keeping my files at github:  https://github.com/russ-hensel  For some there may be info here, other not.&lt;br /&gt;
&lt;br /&gt;
You can reach me ( EMAIL ) at: no_spam_please_666 at comcast dot net (REFORMAT FOR A VALID EMAIL ADDRESS).  This address is just for first contact, I will respond with a better address after first contact.&lt;br /&gt;
&lt;br /&gt;
On this site I tend to write about the following topics&lt;br /&gt;
&lt;br /&gt;
* Electronics in general ( still doing it at home, but not writing about it much ).&lt;br /&gt;
* Microcontrollers, PIC in the past now the Arduino&lt;br /&gt;
* Python and my Python Projects&lt;br /&gt;
* Raspberry Pi&lt;br /&gt;
* 3D Printing and FreeCad ( bought first printer in 2017,  second one too )&lt;br /&gt;
* BoostC - now replaced by C++ in context of the Arduino&lt;br /&gt;
* Stepper Motors -- used in several of my projects. Usually in catagories with Arduino&lt;br /&gt;
&lt;br /&gt;
= About My Articles =&lt;br /&gt;
&lt;br /&gt;
I write about items as they interest me.  Too often I start on something and drop either the article or the project for short or long periods befor picking it up again.  Sorry.  I am open to email with questions, this may make me complete or improve some article.  If you are interested please let me know.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You may find that some pages say something like:&lt;br /&gt;
&lt;br /&gt;
This is an article started by Russ Hensel, see &amp;quot;http://www.opencircuits.com/index.php?title=Russ_hensel#About My Articles&amp;quot; '''About My Articles''' for a bit of info.  The page is only partly finished&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== My Editing Links ==&lt;br /&gt;
&lt;br /&gt;
These links are for me to navigate to pages I have done quite a bit of work on or want to look at frequently.  They are not for you, but you can use them if you want.  &lt;br /&gt;
&lt;br /&gt;
*[[Mushroom Resources]]&lt;br /&gt;
*[[Vivek]]&lt;br /&gt;
&lt;br /&gt;
*[[Russ Page Links]]&lt;br /&gt;
&lt;br /&gt;
*[[Russ Editing Links]]  probably dead&lt;br /&gt;
&lt;br /&gt;
= Articles posted here on Open Circuits =&lt;br /&gt;
&lt;br /&gt;
== Serial Communications and Microcontrollers ==&lt;br /&gt;
&lt;br /&gt;
*[[Python Smart Terminal]]  As of Sept 2016 still and active project.&lt;br /&gt;
*[http://www.opencircuits.com/Category:Microcontroller Category:Serial_Communications] Most of these have at least large input from me.  Some are general, some for the Arduino, and some for the PIC microcontroller.&lt;br /&gt;
*[http://www.opencircuits.com/Category:PIC Category:PIC] I have mostly converted to the Arduino, but before that I used the PIC, still think it is a nice micro controller, but building the boards and finding a coding environment.... is more of a pain than I want.&lt;br /&gt;
&lt;br /&gt;
*[http://www.opencircuits.com/Category:Arduino Category:Arduino] After my conversion from PIC.&lt;br /&gt;
&lt;br /&gt;
= Articles posted on Instructables =&lt;br /&gt;
&lt;br /&gt;
== Related to Python ==&lt;br /&gt;
[[Programing Tips]]&lt;br /&gt;
&lt;br /&gt;
*'''[http://www.instructables.com/id/Python-Terminal-for-Cheap-Pi-Arduino-Connection/ Python Terminal for Cheap Pi Arduino Connection - All ]'''&lt;br /&gt;
*'''[http://www.instructables.com/id/Experiments-in-Advanced-Data-Logging-Using-Python-/ Experiments in Advanced Data Logging ( Using Python ) - All ]'''&lt;br /&gt;
*'''[http://www.instructables.com/id/Incredibility-Powerful-Resistance-Calculator/ Incredibility Powerful Resistance Calculator - All ]'''&lt;br /&gt;
*'''[http://www.instructables.com/id/Use-Sage-and-Sell-Your-Calculator-before-it-is-Too/ Use Sage and Sell Your Calculator before it is Too Late - All ]'''&lt;br /&gt;
*'''[http://www.instructables.com/id/Python-Autoexec-for-Your-Raspberry-Pi/ Python Autoexec for Your Raspberry Pi - All ]'''&lt;br /&gt;
*'''[http://www.instructables.com/id/ClipBoard-Communication-PC-Pi-With-Python/ ClipBoard Communication PC ↔ Pi With Python - All ]'''&lt;br /&gt;
*'''[http://www.instructables.com/id/Graph-Your-Solar-Power/ Graph Your Solar Power - All ]'''&lt;br /&gt;
*'''[http://www.instructables.com/id/Graph-Instructable-Views-with-Pypthon-Screen-Scrap/ Graph Instructable Views with Python Screen Scraping - All ]'''&lt;br /&gt;
*'''[http://www.instructables.com/id/Digital-Picture-Management-Eliminate-Weak-Photos-w/ Digital Picture Management - Del Weak Pics with Python - All ]'''&lt;br /&gt;
&lt;br /&gt;
== Related to Arduino ==&lt;br /&gt;
&lt;br /&gt;
[[Pi Setup Nov 2016]]&lt;br /&gt;
&lt;br /&gt;
*'''[http://www.instructables.com/id/Backup-Your-Pi/ Backup Your Pi - All ]'''&lt;br /&gt;
*'''[http://www.instructables.com/id/Python-Autoexec-for-Your-Raspberry-Pi/ Python Autoexec for Your Raspberry Pi - All ]'''&lt;br /&gt;
*'''[http://www.instructables.com/id/ClipBoard-Communication-PC-Pi-With-Python/ ClipBoard Communication PC ↔ Pi With Python - All ]'''&lt;br /&gt;
&lt;br /&gt;
== Related to Electronics ==&lt;br /&gt;
&lt;br /&gt;
[[PiSetup]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*'''[http://www.instructables.com/id/Electronics-Building-Tips-in-21-Plus-Steps-/ Electronics Building Tips ( in 21 Plus Steps ) - All ]'''&lt;br /&gt;
*'''[http://www.instructables.com/id/More-Electronics-Building-Tips-in-21-plus-more-ste/ More Electronics Building Tips ( in 21 plus more steps ) - All ]'''&lt;br /&gt;
*'''[http://www.instructables.com/id/Comprehensive-Guide-to-Electronic-Breadboards-A-Me/ Comprehensive Guide to Electronic Breadboards: A Meta Instructable - All ]'''&lt;br /&gt;
*'''[http://www.instructables.com/id/Three-in-One-IC-Continuity-Tester-Signal-Generator/ Three in One: IC/ Continuity Tester, &amp;amp; Signal Generator - All ]'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
us double brackes for categories&lt;br /&gt;
&lt;br /&gt;
   category:Member Page&lt;br /&gt;
   category:salvage&lt;br /&gt;
   category:Test Instrument&lt;br /&gt;
   category:Serial Communications&lt;br /&gt;
   category:Microcontroller&lt;br /&gt;
   category:PIC&lt;br /&gt;
   category:Test Instrument&lt;br /&gt;
   category:Test Instrument&lt;br /&gt;
   [[category:BoostC]]&lt;/div&gt;</summary>
		<author><name>Russ hensel</name></author>
		
	</entry>
	<entry>
		<id>http://www.opencircuits.com/index.php?title=Python_Names&amp;diff=90763</id>
		<title>Python Names</title>
		<link rel="alternate" type="text/html" href="http://www.opencircuits.com/index.php?title=Python_Names&amp;diff=90763"/>
		<updated>2024-02-16T22:30:26Z</updated>

		<summary type="html">&lt;p&gt;Russ hensel: /* Avoid Reserved Words */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In programming a constant task is to make up names for things you wish the program to work with.  Numbers, names.... functions, objects... classes all need names.  There are some good practices in making up name and not so good ones.  Python even has an official document PEP 8, I think it is called, that discusses this.  I have not found the document all that useful.  I will give you my version here.&lt;br /&gt;
&lt;br /&gt;
= When to use Good Names =&lt;br /&gt;
The right answer is all the time, but in practice people go to more effort when they expect the program to be around for a longer time.  Also in practice programs tend to be around longer than you expect.  Try to develop good habits, it will pay off.&lt;br /&gt;
= Short vs Long =&lt;br /&gt;
Really short names are rarely good they just have too little meaning.  You should remember that a program is more often read than written ( only once not counting fix up ) so make it easy to read. That said names can get too long.  Over 12 characters?: take a second look.  Abbreviation are fine but should be consistent.  I use hi and lo for high and low, max and min for maximum and minimum.  But n for number? Too short, also may hide an important function n().&lt;br /&gt;
&lt;br /&gt;
Short vs long also applies to how long the variable will exist, or be in scope.  If the scope of a variable is short, it is easier to live with a short, and less clear, name.  I use ix for a index with short scope, if the scope is longer then I might use ix_toy if the index is indexing into a list of toys.&lt;br /&gt;
&lt;br /&gt;
= Singular vs Plural =&lt;br /&gt;
&lt;br /&gt;
Often I use a plural for a list, a list of toys might be toys, an element in it a toy ( or a_toy, or if indexing through the list ix_toy for the numerical index and i_toy for toys[ix_toy].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     for ix_toy, i_toy enumerate( toys ):&lt;br /&gt;
            i_toy.my_index   = ix_toy      # not necessarily a useful example of code &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Generic Variables =&lt;br /&gt;
&lt;br /&gt;
Sometimes it is useful to use generic names rather than specific ones.  One use I often encounter is in constructing tkiner gui's.  Say I want a button, and want to configure it in some specific way:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        a_button = Button( a_frame , width=10, height=2, text = &amp;quot;Edit Parms&amp;quot; )&lt;br /&gt;
        a_button.config( command = self.controller.os_open_parmfile )&lt;br /&gt;
        a_button.pack( side = LEFT )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is fine, but I often copy the code and use it for a different widiget ( many widgets use the same sorts of parameters and setup functions.  Then I may ue a more generic name.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
            # record checkbox&lt;br /&gt;
            cb_record_var    = IntVar()&lt;br /&gt;
            a_widget     = Checkbutton( a_frame, text=&amp;quot;Record&amp;quot;, variable=cb_record_var, width = 10, anchor=&amp;quot;w&amp;quot; )&lt;br /&gt;
            a_widget.config( command = lambda ix = ix__smartplug_adapter: self.controller.cb_device_action( ix, &amp;quot;record&amp;quot; ) )&lt;br /&gt;
            a_widget.config( borderwidth = 5, relief = RAISED,  )&lt;br /&gt;
            a_widget.grid( row = lrow * rowspan, column = lcol, rowspan = 2, sticky=E + W + N + S )&lt;br /&gt;
            i_smartplug_adapter.gui_tk_record_checkbox_var   = cb_record_var&lt;br /&gt;
            lcol +=  1&lt;br /&gt;
&lt;br /&gt;
	    # time combobox &lt;br /&gt;
            times = ( &amp;quot;infinite&amp;quot;, .1, .5, 1,  2, 3, 5, 10, 15, 20, 25, 30, 40, 50, 60  )    &lt;br /&gt;
            a_widget   =  ttk.Combobox( a_frame, values=times, state='readonly',  width = 10, )  &lt;br /&gt;
            a_widget.current( 6 )    # set default value&lt;br /&gt;
            a_widget.grid( row = lrow * rowspan, column = lcol, rowspan = rowspan, sticky=E + W + N + S )&lt;br /&gt;
            i_smartplug_adapter.gui_tk_combo = a_widget&lt;br /&gt;
            lcol +=  1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Local Variables =&lt;br /&gt;
&lt;br /&gt;
Local variables are fast, and may be useful as generic variables ( see above ).  But some times as for the combo box ( above ) you need a reference to be used later ( i_smartplug_adapter.gui_tk_combo = a_widget ).  But it is useful and ( I think faster and easier ) to use a more generic local variable for the set up and initial manipulations, and save the reference at the end ).&lt;br /&gt;
&lt;br /&gt;
= Avoid Reserved Words =&lt;br /&gt;
&lt;br /&gt;
Reserved words are words that are reserved for the language that you are not suppose to use, words like if, else, while, def.  Python will actually throw an syntax error in most cases if you use them.  &lt;br /&gt;
&lt;br /&gt;
There are even more words that you should treat as reserved words, that is do not use them.  These words are ones that other parts of the language may already be using. Suppose that you are doing some math.  Then you might suspect that words like sin, sine, min, max, random might already be in use.  Try to be a bit careful.  In some contexts both n and i are already defined ( i for the imaginary unit, n for a function that forces numerical evaluation ) &lt;br /&gt;
&lt;br /&gt;
For words that are reserved, are already in use, or look as if they might be, I often prefix them with &amp;quot;a_&amp;quot;.  So if I have a reference to a thread I will call it something like &amp;quot;a_thread&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
= Break into Words =&lt;br /&gt;
&lt;br /&gt;
If you use temp for temperature ( and beware some people use it for temporary ) then the high and low temperatures would be hi_temp and low_temp.  Another style is HiTemp and LoTemp.  The second is called camel case.&lt;br /&gt;
&lt;br /&gt;
Most Python is written using underscores for variable name and functions, camel case is used for class names.  Again be consistent.&lt;br /&gt;
&lt;br /&gt;
= Verbs and Nouns =&lt;br /&gt;
&lt;br /&gt;
Most functions ( methods... ) do something.  So make them verbs or verb like.  Classes are typically more like things, so make them noun like.  &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
      self.monitor_state  = 1                # noun&lt;br /&gt;
      plug_adapter        = PlugAdapter()    # noun&lt;br /&gt;
      def display_help():                    # verb like&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Declare at top of Class =&lt;br /&gt;
&lt;br /&gt;
Actually Python does not have declarations but for me this means do an assignment in __init__ or very nearby and comment the variables.  Sometimes this is a natural part of the initialization, other times it is not, perhaps because the value is not know yet.  In this case assign it to None.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     self.live_graph_lines    = None       # lines on the graph, we keep for later updating&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
= Variables =&lt;br /&gt;
&lt;br /&gt;
Most programming languages have variables, and Python users often refer to variables, but actually, sort of, '''Python does not have variables''' it has '''names'''.  Is this a difference that makes a difference?  If I say:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     self.monitor_state  = 1  &lt;br /&gt;
     # then....         &lt;br /&gt;
     self.monitor_state  = 2  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then self.monitor_state has changed or varied, so it must be a variable.  Yes and No.  self.monitor_state is a name and at one time it &amp;quot;pointed to&amp;quot; a value of 1 and later it  &amp;quot;pointed to&amp;quot; a value of 2.  A mutable object is in some ways more like a variable.  I will not say more here, but at some point you might want to investigate this issues because, sometimes, they make a difference.&lt;br /&gt;
You may find this useful: '''[https://www.youtube.com/watch?v=4MCT4WLf7Ac&amp;amp;__s=dibfsizig3wuxjywoekt (26) &amp;quot;Python Oddities Explained&amp;quot; - Trey Hunner (PyCon AU 2019) - YouTube ]''' and '''[https://treyhunner.com/python-oddities/#/3 Python Oddities Explained ]'''&lt;br /&gt;
&lt;br /&gt;
= Class Instance Variables =&lt;br /&gt;
&lt;br /&gt;
I try to name variables that refer to classes with names that reflect the class.  Since the class is in camel case and the instance variable uses underscores this is often simple &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
      self.gui       = Gui()&lt;br /&gt;
      plug_adapter   = PlugAdapter()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Examples =&lt;br /&gt;
&lt;br /&gt;
comming.....&lt;br /&gt;
== Bad ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Good ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Too Good ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Python]] [[Category:Draft]]&lt;/div&gt;</summary>
		<author><name>Russ hensel</name></author>
		
	</entry>
	<entry>
		<id>http://www.opencircuits.com/index.php?title=Chemical_Etchants&amp;diff=90762</id>
		<title>Chemical Etchants</title>
		<link rel="alternate" type="text/html" href="http://www.opencircuits.com/index.php?title=Chemical_Etchants&amp;diff=90762"/>
		<updated>2024-02-16T13:06:53Z</updated>

		<summary type="html">&lt;p&gt;Russ hensel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{stub}}&lt;br /&gt;
&lt;br /&gt;
Chemical etching is one step of some popular [[techniques | PCB fabrication techniques]].&lt;br /&gt;
&lt;br /&gt;
In this technique,&lt;br /&gt;
* one starts with a copper-clad board.&lt;br /&gt;
* one puts a mask over all the copper he want to keep. There are a variety of ways to do this -- see [[Toner Transfer]] and [[Photoetching]].&lt;br /&gt;
* one removes the parts he don't want to keep, by chemically etching away the copper.&lt;br /&gt;
* cleanup: wash off the board in the sink; carefully store or dispose of the acid.&lt;br /&gt;
&lt;br /&gt;
There are a lot of different chemical techniques for doing this, each with its own advantages and drawbacks.&lt;br /&gt;
&lt;br /&gt;
None of these chemicals is incredibly dangerous, but they can all be toxic or caustic, and should be treated with care. Eye protection and gloves are a very good idea. Before you start, make sure you know how dangerous each chemical is, and figure out what you will need to do if you spill it or get it on yourself. Washing with plenty of water is usually a good start. For some chemicals you may want to keep a neutralizing agent handy. An MSDS (Materials Safety Data Sheet) for the chemical will give you some basic information.&lt;br /&gt;
&lt;br /&gt;
== vinegar and salt ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.kobakant.at/DIY/?p=2575 How to get what you want: Salt and Vinegar Etching]&lt;br /&gt;
* [http://www.flickr.com/photos/jeanbaptisteparis/4831465916/ smt pcb with Salt and Vinegar]&lt;br /&gt;
* [http://www.instructables.com/id/The-Saltwater-etch-process/ The Saltwater etch process]&lt;br /&gt;
* [http://www.electro-tech-online.com/general-electronics-chat/33876-electro-etching-no-acid.html electro etching a PCB with vinegar, salt, and a 12 V power supply] (the copper etched off the PCB is plated on the anode?) -- however, other people claim that &amp;quot;You should not be using any acids (or basic 'acids') with your [electro] etcher at all. No FeCl no vinegar, etc &amp;quot;.[http://www.bladeforums.com/forums/showthread.php?t=671936]&lt;br /&gt;
&lt;br /&gt;
== Ferric Chloride ==&lt;br /&gt;
This is the most common hobbyist etchant. Ferric chloride, FeCl&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt;, is a brownish substance. It's usually sold in a bottle (dissolved in water, perhaps with a little acid or peroxide) or as a powder (which you have to dissolve in water).&lt;br /&gt;
&lt;br /&gt;
When in solution, ferric chloride is a ferric ion (Fe&amp;lt;sup&amp;gt;3+&amp;lt;/sup&amp;gt;) and a chloride ion (Cl&amp;lt;sup&amp;gt;-&amp;lt;/sup&amp;gt;). The ferric ion reacts with the metallic copper on the circuit board in a redox reaction, producing a ferrous ion (Fe&amp;lt;sup&amp;gt;2+&amp;lt;/sup&amp;gt;) and cuprous or cupric (Cu&amp;lt;sup&amp;gt;1+&amp;lt;/sup&amp;gt; or Cu&amp;lt;sup&amp;gt;2+&amp;lt;/sup&amp;gt;) copper. The chlorine is just along for the ride. The copper ion, unlike the metallic copper, is soluble, so it leaves the circuit board and goes into solution. The reaction products form a black sludge which settles to the bottom of the etching tank. After etching enough copper, all your Fe&amp;lt;sup&amp;gt;3+&amp;lt;/sup&amp;gt; is used up and your solution is full of Cu&amp;lt;sup&amp;gt;1+&amp;lt;/sup&amp;gt;, and you need to get more etchant.&lt;br /&gt;
&lt;br /&gt;
== Ammonium Persulfate ==&lt;br /&gt;
Expensive &amp;amp; hard to control and optimize the process parameters (such as specific gravity &amp;amp; pH value).&lt;br /&gt;
&lt;br /&gt;
== HydroChloric Acid / Hydrogen Peroxide ==&lt;br /&gt;
&lt;br /&gt;
Mixing about 1 part HCl (Which can be found at most hardware stores, also known as Muriatic Acid. Ask for concrete cleaner.) into 2 parts Hydrogen peroxide (normally used for cleaning cuts) you can make a fairly powerful etchant. Use gloves and don't breathe the fumes though. This will etch a 3&amp;quot;x5&amp;quot; board in less than 10 minutes. No need to heat it up. I usually like to drill a small hole through the board on a corner and thread a wire or nylon string through to help agitate / remove the board.&lt;br /&gt;
&lt;br /&gt;
When the board is done etching, the etchant will probably look like green kool-aid, from the copper content in it. This stuff is highly corrosive and will burn skin, which is why you should wear gloves. But it is easy to handle, and fairly easy to dispose of. the etchant is easily deactivated with baking soda. Pour enough baking soda into it slowly (to keep it from boiling and overflowing... remember what happens with baking soda/vinegar? ya...) until it is a solid mass, then leave it in the sun to dry. You should contact your local authorities to find out what you should do with it next. Whatever you do, DO NOT dump the stuff down the drain, it will eat through your pipes just like any of the other etchants.&lt;br /&gt;
&lt;br /&gt;
Alternatively, instead of disposing of the etchant, you can re-use it again and again. In fact, after etching a few boards with this solution, you will have successfully made [[Chemical Etchants#Acid Cupric Chloride|Acid Cupric Chloride]] (see below).&lt;br /&gt;
You can also find a detailed tutorial on etching at [http://robotplatform.com/howto/pcb%20etching/pcb_etching_1.html Muriatic Acid etching tutorial]&lt;br /&gt;
&lt;br /&gt;
== Sodium Persulfate ==&lt;br /&gt;
More environmentally friendly than ferric chloride.  Can monitor the etching as initially clear new etchant solution turns blue from the copper ions.&lt;br /&gt;
&lt;br /&gt;
== Acid Cupric Chloride ==&lt;br /&gt;
Dead simple etchant made from ordinary, store-bought chemicals (hydrochloric acid and hydrogen peroxide). Has the advantage that it can be regenerated by bubbling oxygen/air through it, or by adding more H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;. In addition, it doesn't get used up: the etchant bath simply grows with use (kind of like sourdough starter…)&lt;br /&gt;
The used etchant also makes a great algecide/pH reducer for your pool (and a whole lot cheaper than that stuff they sell at the pool store).&lt;br /&gt;
&lt;br /&gt;
What you need:&lt;br /&gt;
* 38% Hydrochloric Acid, HCl (available at finer hardware stores or pool supply stores as Muriatic Acid)&lt;br /&gt;
* 3% Hydrogen Peroxide, H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; (available from any drug store)&lt;br /&gt;
* Plastic or Glass Pans, Jars, and tongs (no metal)&lt;br /&gt;
Directions:&lt;br /&gt;
&lt;br /&gt;
# Mix your HCl and H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; 1:1 in a non-metalic container, making sure to add the acid slowly to the H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;. DO NOT ADD THE H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; TO THE ACID!!!&lt;br /&gt;
# After you've masked your board, dip it in the solution and constantly agitate. You should notice a dark green cloud start to come from the board almost immedately which quickly dissapears or turns lighter as it gets further from the surface of the board.&lt;br /&gt;
# Etching should take about 10min depending on the temperature and how well you agitated the etchant. When all of the copper is gone, dip in water to wash off any stray etchant and stop the reaction.&lt;br /&gt;
# When done etching, save used etchant in a non-metalic container and mark clearly its contents.&lt;br /&gt;
# If your etchant has become a dark, murky green color, add a little bit of H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; or bubble air/O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; through the solution to regenerate it back to a light, transparent green color.&lt;br /&gt;
See links at bottom for more information on the chemistry and some pictures of the process.&lt;br /&gt;
&lt;br /&gt;
== Disposal procedures ==&lt;br /&gt;
Flushing used etchant down the drain is a bad idea (and usually illegal) because copper ion is toxic. The usual recommended way to dispose of hobbyist amounts of etchant is to convert it to a solid somehow and dispose of the solid in accordance with local laws.&lt;br /&gt;
&lt;br /&gt;
== External Links == &lt;br /&gt;
&lt;br /&gt;
* [http://www.instructables.com/id/Sponge-Ferric-Chloride-Method-Etch-Circuit-Bo/ &amp;quot;Sponge + Ferric Chloride Method -- Etch PCBs in One Minute!&amp;quot;]&lt;br /&gt;
* [http://www.k9spud.com/wiki/PCB:Etchants Ferric Chloride vs. Ammonium Persulfate] and other etching chemicals.&lt;br /&gt;
* [http://members.optusnet.com.au/~eseychell/PCB/etching_CuCl/index.html Etching with Air Regenerated Acid Cupric Chloride] — an excellent in-depth page on acid cupric chloride etching by Adam Seychell.&lt;br /&gt;
* [http://www.esmonde-white.com/home/diversions/etching-a-copper-pcb Etching a Copper PCB with HCl and H2O2]&lt;br /&gt;
* [http://www.mgchemicals.com/ MG Chemicals] A possible source?&lt;br /&gt;
* [http://reprap.org/wiki/MakePCBInstructions RepRap wiki: Make PCB instructions]&lt;br /&gt;
&lt;br /&gt;
== Internal Links ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*[[Toner Transfer]]&lt;br /&gt;
*[[Techniques]]&lt;br /&gt;
*[[Eagle Links]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Techniques]]&lt;/div&gt;</summary>
		<author><name>Russ hensel</name></author>
		
	</entry>
	<entry>
		<id>http://www.opencircuits.com/index.php?title=Python_Code_Example_Files&amp;diff=88694</id>
		<title>Python Code Example Files</title>
		<link rel="alternate" type="text/html" href="http://www.opencircuits.com/index.php?title=Python_Code_Example_Files&amp;diff=88694"/>
		<updated>2023-02-04T14:00:20Z</updated>

		<summary type="html">&lt;p&gt;Russ hensel: /* What/Why */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= What/Why =&lt;br /&gt;
&lt;br /&gt;
When I learn a new thing in Python I often keep an example file. I can then use it for reference and/or copy code out of it for other uses. I have a few &amp;quot;tricks&amp;quot; that I will describe here.&lt;br /&gt;
I like to have many examples in one file to make them easy to review, and find the right example.  Comments can be used to turn on/off some of the code.  I use a technique to make it easy to control&lt;br /&gt;
examples by commenting a single line: put each example in a function and then comment in/out the function call.&lt;br /&gt;
&lt;br /&gt;
= Moved =&lt;br /&gt;
&lt;br /&gt;
I am beginning to move the actual code to: &lt;br /&gt;
&lt;br /&gt;
*'''[https://github.com/russ-hensel/python_example_code russ-hensel/python_example_code: python_example_code ]'''&lt;br /&gt;
&lt;br /&gt;
an there is a better wiki for this topic there.&lt;br /&gt;
&lt;br /&gt;
= How =&lt;br /&gt;
&lt;br /&gt;
I think this is best seen with a commented example file.  The example is very simple, the central point is the technique of using subroutines.  You should be able to copy the code into your IDE of choice and run it.&lt;br /&gt;
I am pretty far out of compliancee with PEP 8, but it is my file so I format it the way I want.  Run it through Black if you want.  Formatting is not the point here.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# -*- coding: utf-8 -*-&lt;br /&gt;
&lt;br /&gt;
&amp;quot;&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
this is a template/example file for booleans&lt;br /&gt;
( it is commented also as a guide to the subroutine technique for example files )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    In python pretty much everything has a truthiness which is &amp;quot;boolean like&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Try searching on:&lt;br /&gt;
    True&lt;br /&gt;
    truthy&lt;br /&gt;
    ....&lt;br /&gt;
&lt;br /&gt;
Author: Russ Hensel  You can reach me ( EMAIL ) at:&lt;br /&gt;
    no_spam_please_666 at comcast dot net (REFORMAT FOR A VALID EMAIL ADDRESS).&lt;br /&gt;
    This address is just for first contact, I will respond with a better&lt;br /&gt;
    address after first contact.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# a helper function is not an example but will be used by an example&lt;br /&gt;
&lt;br /&gt;
# ------------ helper function ------------------&lt;br /&gt;
def is_truthy( a_value ):&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
    what is says: is a_value truthy or not?&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
    if a_value:&lt;br /&gt;
        return &amp;quot;truthy&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    else:&lt;br /&gt;
        return &amp;quot;Not truthy&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# ------------ helper function ------------------&lt;br /&gt;
def eval_me(  exp ):&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
    print and evalueate exp&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
    # print( msg )&lt;br /&gt;
    print( f&amp;quot;eval of {exp} is {eval(exp)}&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# all example functions start with ex_ and right after the function definition&lt;br /&gt;
# is a function call.&lt;br /&gt;
# try to make name discriptive&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# ----------------------------------------&lt;br /&gt;
def ex_is_truthy():&lt;br /&gt;
&lt;br /&gt;
    # I alsays print something so I know which example is running&lt;br /&gt;
    print( &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
    ================ ex_is_truthy(): ===============&lt;br /&gt;
    test to see what simple expressions have what truthyness&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot; )&lt;br /&gt;
&lt;br /&gt;
    exp  = &amp;quot;is_truthy( 0 )&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    test_me   = [ &amp;quot;True&amp;quot;, &amp;quot;False&amp;quot;, &amp;quot;0&amp;quot;, &amp;quot;1&amp;quot;, '&amp;quot;TRUE&amp;quot;', '&amp;quot;FALSE&amp;quot;', &amp;quot;1 &amp;lt; 2&amp;quot; ]&lt;br /&gt;
&lt;br /&gt;
    for i_test in test_me:&lt;br /&gt;
&lt;br /&gt;
        exp    = f&amp;quot;is_truthy( {i_test} )&amp;quot;&lt;br /&gt;
        eval_me(  exp)&lt;br /&gt;
&lt;br /&gt;
# call to function, comment out to eliminate the entire example&lt;br /&gt;
&lt;br /&gt;
ex_is_truthy()&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# ----------------------------------------&lt;br /&gt;
def ex_case_statement_using_if():&lt;br /&gt;
    print( &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
    ================ ex_two(): ===============&lt;br /&gt;
    just show another example&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot; )&lt;br /&gt;
&lt;br /&gt;
    x  = 3&lt;br /&gt;
&lt;br /&gt;
    if   x == 1:&lt;br /&gt;
        print( &amp;quot;x is one&amp;quot; )&lt;br /&gt;
    elif x == 2:&lt;br /&gt;
        print( &amp;quot;x is two&amp;quot; )&lt;br /&gt;
    elif x == 3:&lt;br /&gt;
        print( &amp;quot;x is three&amp;quot; )&lt;br /&gt;
    elif x == 4:&lt;br /&gt;
        print( &amp;quot;x is four&amp;quot; )&lt;br /&gt;
    else:&lt;br /&gt;
        print( &amp;quot;what else could x be?&amp;quot;    )&lt;br /&gt;
&lt;br /&gt;
#ex_case_statement_using_if()&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
typically I would have many more examples in the file....&lt;br /&gt;
&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Russ hensel</name></author>
		
	</entry>
	<entry>
		<id>http://www.opencircuits.com/index.php?title=Russ_Python_Tips_and_Techniques&amp;diff=88693</id>
		<title>Russ Python Tips and Techniques</title>
		<link rel="alternate" type="text/html" href="http://www.opencircuits.com/index.php?title=Russ_Python_Tips_and_Techniques&amp;diff=88693"/>
		<updated>2023-02-04T13:57:50Z</updated>

		<summary type="html">&lt;p&gt;Russ hensel: /* Polling withing Tkinker */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= What =&lt;br /&gt;
These are Tips and Techniques I have found useful in my Python programming [[User:Russ_hensel]].  I would be interested in your feedback.  Let me know if you think the tip is useful/wrong/something everyone knows.  A good set of this material relates to applications with a GUI.  They are often not beginner techniques, but neither are they all advanced ones.&lt;br /&gt;
Just starting Feb 2017 check history tab above to see if progress is being made.  If you find a tip not finished or working feel free to contact me.&lt;br /&gt;
&lt;br /&gt;
== Ones Still To Be Written ==&lt;br /&gt;
&lt;br /&gt;
* when division by 0 is useful&lt;br /&gt;
* code is multiple files - scratch file&lt;br /&gt;
* moving to 3.6 use fstrings&lt;br /&gt;
* example files with functions  [[Python Example Code]]&lt;br /&gt;
* when you need a reference and when not&lt;br /&gt;
* dict based case statements&lt;br /&gt;
* choose names for cut and paste&lt;br /&gt;
* mark your code with unusual string  * zzz in your code &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Move these to a good place in the outline ===&lt;br /&gt;
&lt;br /&gt;
==== Python Installation ====&lt;br /&gt;
&lt;br /&gt;
I have a separate page [[Category:Python Installation]] about installation an maintenance, the first part is of general interest, the second on particular issues I have encountered.  It may be useful to get some of my projects running [[Category:Python Projects]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== FStrings ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
FStrings are incredibly nice. New in 3.6, use it ( or 3.7.... ) They also are reputed to be really fast.  Use them.  At a later time I may have a bunch of examples, but for now just the basic statement:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    joe  = &amp;quot;Joe Smith Jones Norton&amp;quot;&lt;br /&gt;
    msg  = f&amp;quot;Joe's name is actually {joe}&amp;quot;&lt;br /&gt;
    print( msg 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Comments for Navigation ====&lt;br /&gt;
&lt;br /&gt;
Spyder has a nice feature for code navigation: the &amp;quot;Outline Tab&amp;quot;.  This tab outlines the code nesting classes, methods.... and expands and contracts the tree much like the code folding show in the editor.  The outline tab works both to help you navigate to a place in the code, or to show you where in the code the cursor currently lies.  What is less obvious is that comments can also mark a section.  I have not found documentation for this but here is what I have found.   A comment like &amp;quot;# ------ frame building methods  --&amp;quot; will create an outline section whose indentation in the outline depends on indentation of the comment.  The space and the &amp;quot;-&amp;quot; characters are important.  Start by using exactly what is shown here, and experiment to see how much you can change it before it disappears from the outline.  I often use this to group a large number of similar methods that can then be folded out of view.&lt;br /&gt;
&lt;br /&gt;
==== msg ====&lt;br /&gt;
&lt;br /&gt;
A name I use over and over again for messages, often like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
msg  = &amp;quot;this is a message&amp;quot;&lt;br /&gt;
print( msg )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Why two lines instead of one?  Because I often change it to include logging or sending to the GUI.  It might then become:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
msg  = &amp;quot;this is a message&amp;quot;&lt;br /&gt;
print( msg )&lt;br /&gt;
AppGlobal.logger.debug( msg )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I find this a nice way to manage code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== #rint ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you use print for debugging you may want to scan your code of &amp;quot;print&amp;quot; to remove unwanted statements.  I do not delete them because sometimes I want them again for more debugging.  I change &amp;quot;print&amp;quot; to &amp;quot;#rint&amp;quot;&lt;br /&gt;
to comment out the print but to stop it form showing up on searches.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Make Code Searchable ====&lt;br /&gt;
&lt;br /&gt;
I like generic names to enable cut and paste but this runs against the idea of searchable code.  The idea is that unusual names are easy to search for.  It also helps if names are descriptive.  Why searchable? So you can find the code you want to work on.  One way to be both searchable and generic is to take instance references and make local ( or the reverse )  For example consider this tkinter code:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        a_list     = list(self.sort_order_dict.keys())&lt;br /&gt;
        a_widget   =  ttk.Combobox( a_frame, values = a_list,  state='readonly')&lt;br /&gt;
        a_widget.grid( row = lrow + 1, column = lcol, rowspan = 1, columnspan = 3,  sticky = E + W + N + S )&lt;br /&gt;
        a_widget.set( a_list[0] )&lt;br /&gt;
        self.sort_order_widget = a_widget&lt;br /&gt;
        lcol   += 3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The name a_widget is generic, but to see what it &amp;quot;really&amp;quot; is you have the none generic name &amp;quot;self.sort_order_widget&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you do not see an easy way to do this with names use a comment.  Using zzzz.... is a short term way of doing this.&lt;br /&gt;
&lt;br /&gt;
==== Dict Based Case Statements ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Python does not have a case statement, but it does have if....elif which can be used and is only a little more verbose.  However if you have more than a few cases it can be cumbersome.  Using a dict gives a very compact and fast case statement.  Suppose you want to have a case statement based on strings:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    # set up, ideally only done onece, perhaps at module or class level&lt;br /&gt;
    dispatch_dict   = { &amp;quot;one&amp;quot;:    print_one,&lt;br /&gt;
                        &amp;quot;two&amp;quot;:    print_two,&lt;br /&gt;
                        &amp;quot;three&amp;quot;:  print_three,&lt;br /&gt;
                        }&lt;br /&gt;
&lt;br /&gt;
    # set a case for an example call:&lt;br /&gt;
    key = &amp;quot;two&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # the slightly verbose case statement&lt;br /&gt;
    function      = dispatch_dict[ key ]&lt;br /&gt;
    function()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Parameters for Applications =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are various ways of storing start up parameters for applications.  In the old days almost all windows programs had a &amp;quot;ini&amp;quot; file.  Linux had/has &amp;quot;config&amp;quot; files.  In both cases these are text files that are easily edited with a simple text editor.  More recently xml files ( which i tend to hate ) have come into vogue.  Finally some applications give you a gui for editing configuration values and then save them any way they want, perhaps in the &amp;quot;registry&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Using a gui is the easiest way for the user in particular the naive user.  They are also a lot of work to implement and maintain.  So I favor a flat, non-xml file.  But what file?  For Python my answere is a python.py file that has pretty much one class, Parameters, that is implemented as a singleton ( in what ever way you want to implement singletons ).  These are easy to implement, easy to maintain, and very flexible.  They can also do clever things like detecting what operating system they are running on and make automatic adjustments.  There are no issues of converting type into strings for the file.  Comments are easily included. Loading can print the progress of initialization.&lt;br /&gt;
&lt;br /&gt;
I will put a brief sample here soon so you can see what a file looks like.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
code comming here&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Logging =&lt;br /&gt;
&lt;br /&gt;
I use the logging class that is part of standard python.  I provide a button to view and edit the file.  Why invent your own method.  Here is some code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
code comming&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Restart =&lt;br /&gt;
When an application ( here I am thinking about GUI applications ) starts there can be a considerable delay as all the modules are imported.  Typically a restart is done after an exception or when parameters are changed.  So I include a restart button on the GUI to quickly restart the application.  In my case applications are usually started by constructing some application class.  So what I do is break up the __init__ method into 2 parts, only the second needs to be run to restart the application.  Here is some sample code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    def __init__(self ):&lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
        create the application, its GUI is called self.gui which is &lt;br /&gt;
        created in restart &lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
        ...... more code ......&lt;br /&gt;
&lt;br /&gt;
        self.restart( )    # continue in restart&lt;br /&gt;
&lt;br /&gt;
    # --------------------------------------------------------&lt;br /&gt;
    def restart(self ):&lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
        use to restart the app without ending it&lt;br /&gt;
        parameters will be reloaded and the gui rebuilt&lt;br /&gt;
        call from a button on the GUI &lt;br /&gt;
        args: zip&lt;br /&gt;
        ret:  zip ... all sided effects&lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
        &lt;br /&gt;
        self.no_restarts    += 1 # if we want to keep track &lt;br /&gt;
        if not( self.gui is None ):  # determines if a restart or the start&lt;br /&gt;
            # !!  # need to shut down other thread&lt;br /&gt;
            self.gui.root.destroy()&lt;br /&gt;
            reload( parameters )&lt;br /&gt;
&lt;br /&gt;
        self.logger         = None&lt;br /&gt;
&lt;br /&gt;
        .... and so on ......&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Names =&lt;br /&gt;
&lt;br /&gt;
I have heard it said that proper naming is the hardest problem in programming.  Not sure if true, but it is not easy.  So here is my take:&lt;br /&gt;
&lt;br /&gt;
* Of course be consistent.  It may help to make a vocabulary list of the terms you prefer.  I have found that the values often come in pairs:&lt;br /&gt;
&lt;br /&gt;
   start_date / stop_date  or low_temp / high_temp ( or hi_temp ) or start_date / end_date &lt;br /&gt;
   then some style are:&lt;br /&gt;
   date_start / date_stop&lt;br /&gt;
&lt;br /&gt;
Note that the stop_date and end_date is an easy place for confusion.  So decide on your style and stick to it.&lt;br /&gt;
&lt;br /&gt;
* Do not be afraid of long names but consistent abbreviations are fine ( keep a list ).&lt;br /&gt;
* I generally think that methods should be named with verb like names: os_open_file.&lt;br /&gt;
* I find that people use the name '''file''' for both the '''file name''' ( often string like ) and for the '''file handle''' ( the thing you get when you open a file ), so my variables for file names are like:&lt;br /&gt;
&lt;br /&gt;
   input_file_name ( sometimes input_fn )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Lists and other iteratables often get a name to indicate that: so a list of names might be called something like student_names&lt;br /&gt;
&lt;br /&gt;
* Sometimes generic names are preferable especially if there scope is just a few lines.  I am willing to iterate over a list of numbers with i, but I prefer ix and even then I fell lazy.  If I have a list of names as above I might itterate with the singular, but usually i prefix it with i_ so:&lt;br /&gt;
&lt;br /&gt;
     for i_name in student_names&lt;br /&gt;
         print( i_name )&lt;br /&gt;
&lt;br /&gt;
= Comments =&lt;br /&gt;
Extreme programming trys to make the code so obvious that it is easy to tell what the code is doing without comments.  If not taken too far I think this is a great idea.  It requires really good names.  But most of my comments do not tell what the code is doing, they tell either why the code is doing something or what the purpose is of doing what ever.  But that is not all:&lt;br /&gt;
* Comments are left to indicate where the code might be made better:&lt;br /&gt;
** More careful error management.&lt;br /&gt;
** Where I am thinking about refactoring&lt;br /&gt;
** To make up for deliberately generic names -- ?? I need more explanation here&lt;br /&gt;
** To provide a search string so I can find a place in the code&lt;br /&gt;
** Where a little trap may lurk in the code:&lt;br /&gt;
   For example most methods return at the end, but sometimes you discover in your processing that you are done&lt;br /&gt;
   early.  You could put some sort of if then structure in, but now you indent one level more making the&lt;br /&gt;
   code somewhat more difficult.  So just return.  In these cases I may put a comment at the beginning of the method:&lt;br /&gt;
&lt;br /&gt;
   # beware of early return&lt;br /&gt;
&lt;br /&gt;
   I try to indicate that there may be an early return, but refactoring may remove it and leave the comment in place&lt;br /&gt;
** Of course no comment should be considered 100% reliable&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Copy and Paste =&lt;br /&gt;
some content may move to [[Copy and Paste Is Good]] or not &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are lots of arguments against copy and paste, but used carefully I think that it is extremely useful.  But used carefully.&lt;br /&gt;
&lt;br /&gt;
One of the biggest arguments against it is that you may be using code that you do not really understand.  This can be true, but the&lt;br /&gt;
same is true when you use someone else's module.&lt;br /&gt;
&lt;br /&gt;
So I have a procedure depending on where I copy from:&lt;br /&gt;
&lt;br /&gt;
* My own code:&lt;br /&gt;
** I only take working code.&lt;br /&gt;
** I reread it and make appropriate changes.&lt;br /&gt;
** I own the results, if it does not work properly I am to blame&lt;br /&gt;
** I write code in a generic way to make it easy to copy and paste.&lt;br /&gt;
&lt;br /&gt;
* Refactoring:&lt;br /&gt;
** Of course when I refactor I use copy and paste, because basically your are just rearranging code you already have that works.&lt;br /&gt;
** Many people use git to make sure they do not loose stuff in translation.  I just use file copies, I have my own methods&lt;br /&gt;
** Sleep that is zzzzzzz: I put zzzz or similar around the place where I am making changes.  It throws a quick syntax method if I foolishly try to run the code and is easy to find as zzzz is not anything I would normally use in code.  Sometimes I copy a lot of junk in between a pair of zzz so I have all the names I need in easy view.  Then I do the new code, remove the junk and finally the pair of zzzz'a.&lt;br /&gt;
&lt;br /&gt;
* Other peoples code:&lt;br /&gt;
** I put there code in an example file.&lt;br /&gt;
** I change the code to my style and comment it, often keeping a url to the source.&lt;br /&gt;
** I run it to make sure it does what I want.&lt;br /&gt;
** I may make it generic in a way to make copying easier.&lt;br /&gt;
** I save the example.&lt;br /&gt;
**&lt;br /&gt;
&lt;br /&gt;
= Python Code Example Files =&lt;br /&gt;
When I learn a new thing in Python I often keep an example file.  I can then use it for reference and/or copy code out of it for other uses.  I have a few &amp;quot;tricks&amp;quot;.  See: '''[[Python Code Example Files]]'''&lt;br /&gt;
&lt;br /&gt;
= Tkinker =&lt;br /&gt;
== Complex Tkinker Windows ==&lt;br /&gt;
I found it really easy to get confused in coding Tkinter because it is not done in a visual interface.&lt;br /&gt;
One of my goal in coding is to make the code create the gui from top to bottom and from left to right.  That way the layout of code and the layout of the gui are easier to match up in my mind.  This has a benefit of making it relatively easy to:&lt;br /&gt;
&lt;br /&gt;
* Cut and paste code to rearrange placement in the gui.&lt;br /&gt;
* Cut/paste/modify code to build new widgets.&lt;br /&gt;
&lt;br /&gt;
So here are some tips:&lt;br /&gt;
&lt;br /&gt;
* I do a sketch of what I want on paper.&lt;br /&gt;
* The GUI is built in a class.&lt;br /&gt;
* I break the sketch into Tkinter frames each of which will layout into the window in some fairly simple scheme, often the pack layout will work.  When this is not enough I use grid.&lt;br /&gt;
* When using grids I always have variables for the row and column positions.  These are typically managed with statements like   lrow  += 1.  Coding this way make movement of the code much easier.  Placement methods may also be used to manage the row and column variables.&lt;br /&gt;
* Each individual frame is built in its own method, it takes the parent frame as an argument and returns the frame that it builds. The returned frame is then placed in its parent.&lt;br /&gt;
* References to the widgets are often not needed once the GUI is built, so local variable are often used.  Using a local variable makes it easier to copy/paste.  I try to always use the name a_widget, thus code that places or otherwise manipulates the widget in a generic way ( like placement ) works well in a copy paste.  If I need a reference, I typically will do that on the last line of the code for the widget.  For widgets that need references you can use an instance variable of the class, or in some cases it it useful to store them in a dictionary.&lt;br /&gt;
* Building helper classes for either building the widgets, or placing them or both is often useful.&lt;br /&gt;
* You can see these techniques in GUI class of my various application documented on this wiki.&lt;br /&gt;
* See: '''[[Python Buttons Switch Case]]''' for some tricks on building Tkinter frames with lots of buttons linked to functions.&lt;br /&gt;
&lt;br /&gt;
== Threading with Tkinker ==&lt;br /&gt;
&lt;br /&gt;
Tkinker wants to own the processing of the application.  If you make a button start a long running operation then the GUI blocks and becomes unresponsive.  So you need some sort of threading.  Here are some tips.&lt;br /&gt;
&lt;br /&gt;
== Row and Column IX  == &lt;br /&gt;
&lt;br /&gt;
I mostly use the grid layout.  In this you will see &amp;quot;column = 3, row = 5&amp;quot; and the like, in the next use often one of the indices is incremented.  So a way to do this with less typing ( assuming copy and paste ) is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        ix_row     = 0&lt;br /&gt;
        ix_col     = 0&lt;br /&gt;
        rowspan    = 1&lt;br /&gt;
        widget_var   = IntVar()&lt;br /&gt;
        a_widget     = Checkbutton( a_frame, text=&amp;quot;Live Graph&amp;quot;, variable = widget_var, width = 10, anchor=&amp;quot;w&amp;quot; )&lt;br /&gt;
        a_widget.config( command = self.controller.cb_graph_live  )&lt;br /&gt;
        a_widget.config( borderwidth = 5, relief = RAISED,  )&lt;br /&gt;
        a_widget.grid( row = ix_row, column = ix_col, rowspan = rowspan, sticky = E + W + N + S )&lt;br /&gt;
        self.graph_live_var   = widget_var&lt;br /&gt;
&lt;br /&gt;
        # button to save graph data to csv file  &lt;br /&gt;
        ix_col +=  1&lt;br /&gt;
        a_widget = Button( a_frame , width = 10, height = 1, text = &amp;quot;Save CSV&amp;quot; )&lt;br /&gt;
        a_widget.config( command = self.controller.cb_csv )&lt;br /&gt;
        a_widget.grid( row = ix_row, column = ix_col, rowspan = rowspan, sticky = E + W + N + S )&lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
        ix_col   +=  1&lt;br /&gt;
        ......&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Polling withing Tkinker  === &lt;br /&gt;
You can poll in the Tkinter event loop and call any function ( no arguments I think ) using a Tkinter function.  Use this to run something short.  You can only run it once this way.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        self.gui.root.after( self.parameters.gt_delta_t, self.polling )  # self.gui.root = Tkinter root, .1 = .1 sec, self.polling = name of the function&lt;br /&gt;
                                                                         # ( note no () which is a function call &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To overcome the fact that it only runs once, ask for it again at the end of the function.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    def polling( self, ):&lt;br /&gt;
        ..... do something quick &lt;br /&gt;
&lt;br /&gt;
        self.gui.root.after( .1, self.polling ) &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you function throws an exception it will stop running.  Try Except works for me:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    def polling( self, ):&lt;br /&gt;
&lt;br /&gt;
        try:&lt;br /&gt;
            ..... do something quick &lt;br /&gt;
        except Exception, ex_arg:&lt;br /&gt;
            .... I log the error &lt;br /&gt;
        finally:&lt;br /&gt;
            self.gui.root.after( .1, self.polling )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Use Threading  === &lt;br /&gt;
&lt;br /&gt;
Use real threading.  I inherit from threading.Thread and implement a override of the run method.  Use threading mechanisms to &amp;quot;message&amp;quot; back and fourth to the gui, Tkinter, thread.  &lt;br /&gt;
Seems to work fine.&lt;br /&gt;
&lt;br /&gt;
== Calling across Threads ==&lt;br /&gt;
&lt;br /&gt;
If you have objects in 2 different threads calling across the threads can be very dangerous.  I have worked out a method that I find useful/safe/easy.  It does make some assumptions.&lt;br /&gt;
&lt;br /&gt;
*Both objects/threads have something resembling polling where checks can be made at a convient time to see if the other thread wants attention.&lt;br /&gt;
&lt;br /&gt;
=== Step 1, Set Up Queues === &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        self.queue_to_helper      = Queue.Queue( 20 )  # send from tkinker mainloop to helper here&lt;br /&gt;
        self.queue_fr_helper      = Queue.Queue( 20 )  # send back from helper thread to tkinker mainloop here&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So how does this help making calls across the threads?  What I am doing in SmartTerminal ( could change, see the code ) is to always pass a tuple of 3 parts:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
( a_string, a_function, another_tuple_of_arguments_to_a_function )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
if a_string is &amp;quot;call&amp;quot; then the queue item is for a function call ( other cases not discussed here ).  Then the function ( remember functions are first class objects math.sin( x ) call to a function, math sin a function ) is combined with the arguments to make the call:  a_function( arguments_to_a_function ).  Almost, it will not work because argument_to_a_function is itself a tuple.  And even if the tuple has five elements you are only passing one argument, the tuple, to the function.  You need to unpack the arguments.  How do you do that:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
     a_function( *another_tuple_of_arguments_to_a_function  )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is the code with a little more context ( for more see SmartTerminal smart_terminal_helper.HelperThread.polling ) but not actual production code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
      .........&lt;br /&gt;
      ( action, function, function_args ) = self.rec_from_queue()&lt;br /&gt;
      if action == &amp;quot;call&amp;quot;:&lt;br /&gt;
         function( *function_args )&lt;br /&gt;
         .........           &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
more coming......&lt;br /&gt;
&lt;br /&gt;
== Starting a Tkinter App ==&lt;br /&gt;
These applications start fine but often remain in the background with their window behind other windows.  It would be good to bring it to the top of your windows.  This code, may not be the best, seems to work at least on the Windows.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     root.attributes(&amp;quot;-topmost&amp;quot;, True)  &lt;br /&gt;
     root.attributes(&amp;quot;-topmost&amp;quot;, False)  # if left to True window always on top&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You need to get this to run once after the mainloop is started.  You can do this with  '''root.after()'''  Some details left to you.&lt;br /&gt;
&lt;br /&gt;
= Simple Techniques =&lt;br /&gt;
These are techniques I use that I have not often seen documented.&lt;br /&gt;
&lt;br /&gt;
== Create a Local Reference ==&lt;br /&gt;
&lt;br /&gt;
We often use &amp;quot;dotted&amp;quot; notation to reference non-local variables.  If the variable is used several times we may want to create a local reference:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     graph_live_time_zero   = self.parameters.graph_live_time_zero&lt;br /&gt;
     if    graph_live_time_zero   = 1:&lt;br /&gt;
          .....&lt;br /&gt;
     elif  graph_live_time_zero   = 2:&lt;br /&gt;
          .....&lt;br /&gt;
     else:&lt;br /&gt;
          ......&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
instead of:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
      &lt;br /&gt;
     if    self.parameters.graph_live_time_zero = 1:&lt;br /&gt;
          .....&lt;br /&gt;
     elif  self.parameters.graph_live_time_zero = 2:&lt;br /&gt;
          .....&lt;br /&gt;
     else:&lt;br /&gt;
          ......&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Why: &lt;br /&gt;
&lt;br /&gt;
*Well Python searches for local references first, they are faster so your code is faster.&lt;br /&gt;
*If something about the non-local reference changes, then changing the code is easier/less error prone.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Python]]&lt;/div&gt;</summary>
		<author><name>Russ hensel</name></author>
		
	</entry>
	<entry>
		<id>http://www.opencircuits.com/index.php?title=Russ_Python_Tips_and_Techniques&amp;diff=88692</id>
		<title>Russ Python Tips and Techniques</title>
		<link rel="alternate" type="text/html" href="http://www.opencircuits.com/index.php?title=Russ_Python_Tips_and_Techniques&amp;diff=88692"/>
		<updated>2023-02-04T13:47:14Z</updated>

		<summary type="html">&lt;p&gt;Russ hensel: /* Starting a Tkinter App */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= What =&lt;br /&gt;
These are Tips and Techniques I have found useful in my Python programming [[User:Russ_hensel]].  I would be interested in your feedback.  Let me know if you think the tip is useful/wrong/something everyone knows.  A good set of this material relates to applications with a GUI.  They are often not beginner techniques, but neither are they all advanced ones.&lt;br /&gt;
Just starting Feb 2017 check history tab above to see if progress is being made.  If you find a tip not finished or working feel free to contact me.&lt;br /&gt;
&lt;br /&gt;
== Ones Still To Be Written ==&lt;br /&gt;
&lt;br /&gt;
* when division by 0 is useful&lt;br /&gt;
* code is multiple files - scratch file&lt;br /&gt;
* moving to 3.6 use fstrings&lt;br /&gt;
* example files with functions  [[Python Example Code]]&lt;br /&gt;
* when you need a reference and when not&lt;br /&gt;
* dict based case statements&lt;br /&gt;
* choose names for cut and paste&lt;br /&gt;
* mark your code with unusual string  * zzz in your code &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Move these to a good place in the outline ===&lt;br /&gt;
&lt;br /&gt;
==== Python Installation ====&lt;br /&gt;
&lt;br /&gt;
I have a separate page [[Category:Python Installation]] about installation an maintenance, the first part is of general interest, the second on particular issues I have encountered.  It may be useful to get some of my projects running [[Category:Python Projects]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== FStrings ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
FStrings are incredibly nice. New in 3.6, use it ( or 3.7.... ) They also are reputed to be really fast.  Use them.  At a later time I may have a bunch of examples, but for now just the basic statement:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    joe  = &amp;quot;Joe Smith Jones Norton&amp;quot;&lt;br /&gt;
    msg  = f&amp;quot;Joe's name is actually {joe}&amp;quot;&lt;br /&gt;
    print( msg 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Comments for Navigation ====&lt;br /&gt;
&lt;br /&gt;
Spyder has a nice feature for code navigation: the &amp;quot;Outline Tab&amp;quot;.  This tab outlines the code nesting classes, methods.... and expands and contracts the tree much like the code folding show in the editor.  The outline tab works both to help you navigate to a place in the code, or to show you where in the code the cursor currently lies.  What is less obvious is that comments can also mark a section.  I have not found documentation for this but here is what I have found.   A comment like &amp;quot;# ------ frame building methods  --&amp;quot; will create an outline section whose indentation in the outline depends on indentation of the comment.  The space and the &amp;quot;-&amp;quot; characters are important.  Start by using exactly what is shown here, and experiment to see how much you can change it before it disappears from the outline.  I often use this to group a large number of similar methods that can then be folded out of view.&lt;br /&gt;
&lt;br /&gt;
==== msg ====&lt;br /&gt;
&lt;br /&gt;
A name I use over and over again for messages, often like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
msg  = &amp;quot;this is a message&amp;quot;&lt;br /&gt;
print( msg )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Why two lines instead of one?  Because I often change it to include logging or sending to the GUI.  It might then become:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
msg  = &amp;quot;this is a message&amp;quot;&lt;br /&gt;
print( msg )&lt;br /&gt;
AppGlobal.logger.debug( msg )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I find this a nice way to manage code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== #rint ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you use print for debugging you may want to scan your code of &amp;quot;print&amp;quot; to remove unwanted statements.  I do not delete them because sometimes I want them again for more debugging.  I change &amp;quot;print&amp;quot; to &amp;quot;#rint&amp;quot;&lt;br /&gt;
to comment out the print but to stop it form showing up on searches.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Make Code Searchable ====&lt;br /&gt;
&lt;br /&gt;
I like generic names to enable cut and paste but this runs against the idea of searchable code.  The idea is that unusual names are easy to search for.  It also helps if names are descriptive.  Why searchable? So you can find the code you want to work on.  One way to be both searchable and generic is to take instance references and make local ( or the reverse )  For example consider this tkinter code:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        a_list     = list(self.sort_order_dict.keys())&lt;br /&gt;
        a_widget   =  ttk.Combobox( a_frame, values = a_list,  state='readonly')&lt;br /&gt;
        a_widget.grid( row = lrow + 1, column = lcol, rowspan = 1, columnspan = 3,  sticky = E + W + N + S )&lt;br /&gt;
        a_widget.set( a_list[0] )&lt;br /&gt;
        self.sort_order_widget = a_widget&lt;br /&gt;
        lcol   += 3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The name a_widget is generic, but to see what it &amp;quot;really&amp;quot; is you have the none generic name &amp;quot;self.sort_order_widget&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you do not see an easy way to do this with names use a comment.  Using zzzz.... is a short term way of doing this.&lt;br /&gt;
&lt;br /&gt;
==== Dict Based Case Statements ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Python does not have a case statement, but it does have if....elif which can be used and is only a little more verbose.  However if you have more than a few cases it can be cumbersome.  Using a dict gives a very compact and fast case statement.  Suppose you want to have a case statement based on strings:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    # set up, ideally only done onece, perhaps at module or class level&lt;br /&gt;
    dispatch_dict   = { &amp;quot;one&amp;quot;:    print_one,&lt;br /&gt;
                        &amp;quot;two&amp;quot;:    print_two,&lt;br /&gt;
                        &amp;quot;three&amp;quot;:  print_three,&lt;br /&gt;
                        }&lt;br /&gt;
&lt;br /&gt;
    # set a case for an example call:&lt;br /&gt;
    key = &amp;quot;two&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # the slightly verbose case statement&lt;br /&gt;
    function      = dispatch_dict[ key ]&lt;br /&gt;
    function()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Parameters for Applications =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are various ways of storing start up parameters for applications.  In the old days almost all windows programs had a &amp;quot;ini&amp;quot; file.  Linux had/has &amp;quot;config&amp;quot; files.  In both cases these are text files that are easily edited with a simple text editor.  More recently xml files ( which i tend to hate ) have come into vogue.  Finally some applications give you a gui for editing configuration values and then save them any way they want, perhaps in the &amp;quot;registry&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Using a gui is the easiest way for the user in particular the naive user.  They are also a lot of work to implement and maintain.  So I favor a flat, non-xml file.  But what file?  For Python my answere is a python.py file that has pretty much one class, Parameters, that is implemented as a singleton ( in what ever way you want to implement singletons ).  These are easy to implement, easy to maintain, and very flexible.  They can also do clever things like detecting what operating system they are running on and make automatic adjustments.  There are no issues of converting type into strings for the file.  Comments are easily included. Loading can print the progress of initialization.&lt;br /&gt;
&lt;br /&gt;
I will put a brief sample here soon so you can see what a file looks like.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
code comming here&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Logging =&lt;br /&gt;
&lt;br /&gt;
I use the logging class that is part of standard python.  I provide a button to view and edit the file.  Why invent your own method.  Here is some code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
code comming&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Restart =&lt;br /&gt;
When an application ( here I am thinking about GUI applications ) starts there can be a considerable delay as all the modules are imported.  Typically a restart is done after an exception or when parameters are changed.  So I include a restart button on the GUI to quickly restart the application.  In my case applications are usually started by constructing some application class.  So what I do is break up the __init__ method into 2 parts, only the second needs to be run to restart the application.  Here is some sample code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    def __init__(self ):&lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
        create the application, its GUI is called self.gui which is &lt;br /&gt;
        created in restart &lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
        ...... more code ......&lt;br /&gt;
&lt;br /&gt;
        self.restart( )    # continue in restart&lt;br /&gt;
&lt;br /&gt;
    # --------------------------------------------------------&lt;br /&gt;
    def restart(self ):&lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
        use to restart the app without ending it&lt;br /&gt;
        parameters will be reloaded and the gui rebuilt&lt;br /&gt;
        call from a button on the GUI &lt;br /&gt;
        args: zip&lt;br /&gt;
        ret:  zip ... all sided effects&lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
        &lt;br /&gt;
        self.no_restarts    += 1 # if we want to keep track &lt;br /&gt;
        if not( self.gui is None ):  # determines if a restart or the start&lt;br /&gt;
            # !!  # need to shut down other thread&lt;br /&gt;
            self.gui.root.destroy()&lt;br /&gt;
            reload( parameters )&lt;br /&gt;
&lt;br /&gt;
        self.logger         = None&lt;br /&gt;
&lt;br /&gt;
        .... and so on ......&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Names =&lt;br /&gt;
&lt;br /&gt;
I have heard it said that proper naming is the hardest problem in programming.  Not sure if true, but it is not easy.  So here is my take:&lt;br /&gt;
&lt;br /&gt;
* Of course be consistent.  It may help to make a vocabulary list of the terms you prefer.  I have found that the values often come in pairs:&lt;br /&gt;
&lt;br /&gt;
   start_date / stop_date  or low_temp / high_temp ( or hi_temp ) or start_date / end_date &lt;br /&gt;
   then some style are:&lt;br /&gt;
   date_start / date_stop&lt;br /&gt;
&lt;br /&gt;
Note that the stop_date and end_date is an easy place for confusion.  So decide on your style and stick to it.&lt;br /&gt;
&lt;br /&gt;
* Do not be afraid of long names but consistent abbreviations are fine ( keep a list ).&lt;br /&gt;
* I generally think that methods should be named with verb like names: os_open_file.&lt;br /&gt;
* I find that people use the name '''file''' for both the '''file name''' ( often string like ) and for the '''file handle''' ( the thing you get when you open a file ), so my variables for file names are like:&lt;br /&gt;
&lt;br /&gt;
   input_file_name ( sometimes input_fn )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Lists and other iteratables often get a name to indicate that: so a list of names might be called something like student_names&lt;br /&gt;
&lt;br /&gt;
* Sometimes generic names are preferable especially if there scope is just a few lines.  I am willing to iterate over a list of numbers with i, but I prefer ix and even then I fell lazy.  If I have a list of names as above I might itterate with the singular, but usually i prefix it with i_ so:&lt;br /&gt;
&lt;br /&gt;
     for i_name in student_names&lt;br /&gt;
         print( i_name )&lt;br /&gt;
&lt;br /&gt;
= Comments =&lt;br /&gt;
Extreme programming trys to make the code so obvious that it is easy to tell what the code is doing without comments.  If not taken too far I think this is a great idea.  It requires really good names.  But most of my comments do not tell what the code is doing, they tell either why the code is doing something or what the purpose is of doing what ever.  But that is not all:&lt;br /&gt;
* Comments are left to indicate where the code might be made better:&lt;br /&gt;
** More careful error management.&lt;br /&gt;
** Where I am thinking about refactoring&lt;br /&gt;
** To make up for deliberately generic names -- ?? I need more explanation here&lt;br /&gt;
** To provide a search string so I can find a place in the code&lt;br /&gt;
** Where a little trap may lurk in the code:&lt;br /&gt;
   For example most methods return at the end, but sometimes you discover in your processing that you are done&lt;br /&gt;
   early.  You could put some sort of if then structure in, but now you indent one level more making the&lt;br /&gt;
   code somewhat more difficult.  So just return.  In these cases I may put a comment at the beginning of the method:&lt;br /&gt;
&lt;br /&gt;
   # beware of early return&lt;br /&gt;
&lt;br /&gt;
   I try to indicate that there may be an early return, but refactoring may remove it and leave the comment in place&lt;br /&gt;
** Of course no comment should be considered 100% reliable&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Copy and Paste =&lt;br /&gt;
some content may move to [[Copy and Paste Is Good]] or not &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are lots of arguments against copy and paste, but used carefully I think that it is extremely useful.  But used carefully.&lt;br /&gt;
&lt;br /&gt;
One of the biggest arguments against it is that you may be using code that you do not really understand.  This can be true, but the&lt;br /&gt;
same is true when you use someone else's module.&lt;br /&gt;
&lt;br /&gt;
So I have a procedure depending on where I copy from:&lt;br /&gt;
&lt;br /&gt;
* My own code:&lt;br /&gt;
** I only take working code.&lt;br /&gt;
** I reread it and make appropriate changes.&lt;br /&gt;
** I own the results, if it does not work properly I am to blame&lt;br /&gt;
** I write code in a generic way to make it easy to copy and paste.&lt;br /&gt;
&lt;br /&gt;
* Refactoring:&lt;br /&gt;
** Of course when I refactor I use copy and paste, because basically your are just rearranging code you already have that works.&lt;br /&gt;
** Many people use git to make sure they do not loose stuff in translation.  I just use file copies, I have my own methods&lt;br /&gt;
** Sleep that is zzzzzzz: I put zzzz or similar around the place where I am making changes.  It throws a quick syntax method if I foolishly try to run the code and is easy to find as zzzz is not anything I would normally use in code.  Sometimes I copy a lot of junk in between a pair of zzz so I have all the names I need in easy view.  Then I do the new code, remove the junk and finally the pair of zzzz'a.&lt;br /&gt;
&lt;br /&gt;
* Other peoples code:&lt;br /&gt;
** I put there code in an example file.&lt;br /&gt;
** I change the code to my style and comment it, often keeping a url to the source.&lt;br /&gt;
** I run it to make sure it does what I want.&lt;br /&gt;
** I may make it generic in a way to make copying easier.&lt;br /&gt;
** I save the example.&lt;br /&gt;
**&lt;br /&gt;
&lt;br /&gt;
= Python Code Example Files =&lt;br /&gt;
When I learn a new thing in Python I often keep an example file.  I can then use it for reference and/or copy code out of it for other uses.  I have a few &amp;quot;tricks&amp;quot;.  See: '''[[Python Code Example Files]]'''&lt;br /&gt;
&lt;br /&gt;
= Tkinker =&lt;br /&gt;
== Complex Tkinker Windows ==&lt;br /&gt;
I found it really easy to get confused in coding Tkinter because it is not done in a visual interface.&lt;br /&gt;
One of my goal in coding is to make the code create the gui from top to bottom and from left to right.  That way the layout of code and the layout of the gui are easier to match up in my mind.  This has a benefit of making it relatively easy to:&lt;br /&gt;
&lt;br /&gt;
* Cut and paste code to rearrange placement in the gui.&lt;br /&gt;
* Cut/paste/modify code to build new widgets.&lt;br /&gt;
&lt;br /&gt;
So here are some tips:&lt;br /&gt;
&lt;br /&gt;
* I do a sketch of what I want on paper.&lt;br /&gt;
* The GUI is built in a class.&lt;br /&gt;
* I break the sketch into Tkinter frames each of which will layout into the window in some fairly simple scheme, often the pack layout will work.  When this is not enough I use grid.&lt;br /&gt;
* When using grids I always have variables for the row and column positions.  These are typically managed with statements like   lrow  += 1.  Coding this way make movement of the code much easier.  Placement methods may also be used to manage the row and column variables.&lt;br /&gt;
* Each individual frame is built in its own method, it takes the parent frame as an argument and returns the frame that it builds. The returned frame is then placed in its parent.&lt;br /&gt;
* References to the widgets are often not needed once the GUI is built, so local variable are often used.  Using a local variable makes it easier to copy/paste.  I try to always use the name a_widget, thus code that places or otherwise manipulates the widget in a generic way ( like placement ) works well in a copy paste.  If I need a reference, I typically will do that on the last line of the code for the widget.  For widgets that need references you can use an instance variable of the class, or in some cases it it useful to store them in a dictionary.&lt;br /&gt;
* Building helper classes for either building the widgets, or placing them or both is often useful.&lt;br /&gt;
* You can see these techniques in GUI class of my various application documented on this wiki.&lt;br /&gt;
* See: '''[[Python Buttons Switch Case]]''' for some tricks on building Tkinter frames with lots of buttons linked to functions.&lt;br /&gt;
&lt;br /&gt;
== Threading with Tkinker ==&lt;br /&gt;
&lt;br /&gt;
Tkinker wants to own the processing of the application.  If you make a button start a long running operation then the GUI blocks and becomes unresponsive.  So you need some sort of threading.  Here are some tips.&lt;br /&gt;
&lt;br /&gt;
=== Polling withing Tkinker  === &lt;br /&gt;
&lt;br /&gt;
You can poll in the Tkinter event loop and call any function ( no arguments I think ) using a Tkinter function.  Use this to run something short.  You can only run it once this way.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        self.gui.root.after( self.parameters.gt_delta_t, self.polling )  # self.gui.root = Tkinter root, .1 = .1 sec, self.polling = name of the function&lt;br /&gt;
                                                                         # ( note no () which is a function call &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To overcome the fact that it only runs once, ask for it again at the end of the function.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    def polling( self, ):&lt;br /&gt;
        ..... do something quick &lt;br /&gt;
&lt;br /&gt;
        self.gui.root.after( .1, self.polling ) &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you function throws an exception it will stop running.  Try Except works for me:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    def polling( self, ):&lt;br /&gt;
&lt;br /&gt;
        try:&lt;br /&gt;
            ..... do something quick &lt;br /&gt;
        except Exception, ex_arg:&lt;br /&gt;
            .... I log the error &lt;br /&gt;
        finally:&lt;br /&gt;
            self.gui.root.after( .1, self.polling )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Use Threading  === &lt;br /&gt;
&lt;br /&gt;
Use real threading.  I inherit from threading.Thread and implement a override of the run method.  Use threading mechanisms to &amp;quot;message&amp;quot; back and fourth to the gui, Tkinter, thread.  &lt;br /&gt;
Seems to work fine.&lt;br /&gt;
&lt;br /&gt;
== Calling across Threads ==&lt;br /&gt;
&lt;br /&gt;
If you have objects in 2 different threads calling across the threads can be very dangerous.  I have worked out a method that I find useful/safe/easy.  It does make some assumptions.&lt;br /&gt;
&lt;br /&gt;
*Both objects/threads have something resembling polling where checks can be made at a convient time to see if the other thread wants attention.&lt;br /&gt;
&lt;br /&gt;
=== Step 1, Set Up Queues === &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        self.queue_to_helper      = Queue.Queue( 20 )  # send from tkinker mainloop to helper here&lt;br /&gt;
        self.queue_fr_helper      = Queue.Queue( 20 )  # send back from helper thread to tkinker mainloop here&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So how does this help making calls across the threads?  What I am doing in SmartTerminal ( could change, see the code ) is to always pass a tuple of 3 parts:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
( a_string, a_function, another_tuple_of_arguments_to_a_function )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
if a_string is &amp;quot;call&amp;quot; then the queue item is for a function call ( other cases not discussed here ).  Then the function ( remember functions are first class objects math.sin( x ) call to a function, math sin a function ) is combined with the arguments to make the call:  a_function( arguments_to_a_function ).  Almost, it will not work because argument_to_a_function is itself a tuple.  And even if the tuple has five elements you are only passing one argument, the tuple, to the function.  You need to unpack the arguments.  How do you do that:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
     a_function( *another_tuple_of_arguments_to_a_function  )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is the code with a little more context ( for more see SmartTerminal smart_terminal_helper.HelperThread.polling ) but not actual production code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
      .........&lt;br /&gt;
      ( action, function, function_args ) = self.rec_from_queue()&lt;br /&gt;
      if action == &amp;quot;call&amp;quot;:&lt;br /&gt;
         function( *function_args )&lt;br /&gt;
         .........           &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
more coming......&lt;br /&gt;
&lt;br /&gt;
== Starting a Tkinter App ==&lt;br /&gt;
These applications start fine but often remain in the background with their window behind other windows.  It would be good to bring it to the top of your windows.  This code, may not be the best, seems to work at least on the Windows.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     root.attributes(&amp;quot;-topmost&amp;quot;, True)  &lt;br /&gt;
     root.attributes(&amp;quot;-topmost&amp;quot;, False)  # if left to True window always on top&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You need to get this to run once after the mainloop is started.  You can do this with  '''root.after()'''  Some details left to you.&lt;br /&gt;
&lt;br /&gt;
= Simple Techniques =&lt;br /&gt;
These are techniques I use that I have not often seen documented.&lt;br /&gt;
&lt;br /&gt;
== Create a Local Reference ==&lt;br /&gt;
&lt;br /&gt;
We often use &amp;quot;dotted&amp;quot; notation to reference non-local variables.  If the variable is used several times we may want to create a local reference:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     graph_live_time_zero   = self.parameters.graph_live_time_zero&lt;br /&gt;
     if    graph_live_time_zero   = 1:&lt;br /&gt;
          .....&lt;br /&gt;
     elif  graph_live_time_zero   = 2:&lt;br /&gt;
          .....&lt;br /&gt;
     else:&lt;br /&gt;
          ......&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
instead of:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
      &lt;br /&gt;
     if    self.parameters.graph_live_time_zero = 1:&lt;br /&gt;
          .....&lt;br /&gt;
     elif  self.parameters.graph_live_time_zero = 2:&lt;br /&gt;
          .....&lt;br /&gt;
     else:&lt;br /&gt;
          ......&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Why: &lt;br /&gt;
&lt;br /&gt;
*Well Python searches for local references first, they are faster so your code is faster.&lt;br /&gt;
*If something about the non-local reference changes, then changing the code is easier/less error prone.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Python]]&lt;/div&gt;</summary>
		<author><name>Russ hensel</name></author>
		
	</entry>
	<entry>
		<id>http://www.opencircuits.com/index.php?title=Russ_Python_Tips_and_Techniques&amp;diff=88691</id>
		<title>Russ Python Tips and Techniques</title>
		<link rel="alternate" type="text/html" href="http://www.opencircuits.com/index.php?title=Russ_Python_Tips_and_Techniques&amp;diff=88691"/>
		<updated>2023-02-04T13:46:42Z</updated>

		<summary type="html">&lt;p&gt;Russ hensel: /* Calling across Threads */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= What =&lt;br /&gt;
These are Tips and Techniques I have found useful in my Python programming [[User:Russ_hensel]].  I would be interested in your feedback.  Let me know if you think the tip is useful/wrong/something everyone knows.  A good set of this material relates to applications with a GUI.  They are often not beginner techniques, but neither are they all advanced ones.&lt;br /&gt;
Just starting Feb 2017 check history tab above to see if progress is being made.  If you find a tip not finished or working feel free to contact me.&lt;br /&gt;
&lt;br /&gt;
== Ones Still To Be Written ==&lt;br /&gt;
&lt;br /&gt;
* when division by 0 is useful&lt;br /&gt;
* code is multiple files - scratch file&lt;br /&gt;
* moving to 3.6 use fstrings&lt;br /&gt;
* example files with functions  [[Python Example Code]]&lt;br /&gt;
* when you need a reference and when not&lt;br /&gt;
* dict based case statements&lt;br /&gt;
* choose names for cut and paste&lt;br /&gt;
* mark your code with unusual string  * zzz in your code &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Move these to a good place in the outline ===&lt;br /&gt;
&lt;br /&gt;
==== Python Installation ====&lt;br /&gt;
&lt;br /&gt;
I have a separate page [[Category:Python Installation]] about installation an maintenance, the first part is of general interest, the second on particular issues I have encountered.  It may be useful to get some of my projects running [[Category:Python Projects]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== FStrings ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
FStrings are incredibly nice. New in 3.6, use it ( or 3.7.... ) They also are reputed to be really fast.  Use them.  At a later time I may have a bunch of examples, but for now just the basic statement:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    joe  = &amp;quot;Joe Smith Jones Norton&amp;quot;&lt;br /&gt;
    msg  = f&amp;quot;Joe's name is actually {joe}&amp;quot;&lt;br /&gt;
    print( msg 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Comments for Navigation ====&lt;br /&gt;
&lt;br /&gt;
Spyder has a nice feature for code navigation: the &amp;quot;Outline Tab&amp;quot;.  This tab outlines the code nesting classes, methods.... and expands and contracts the tree much like the code folding show in the editor.  The outline tab works both to help you navigate to a place in the code, or to show you where in the code the cursor currently lies.  What is less obvious is that comments can also mark a section.  I have not found documentation for this but here is what I have found.   A comment like &amp;quot;# ------ frame building methods  --&amp;quot; will create an outline section whose indentation in the outline depends on indentation of the comment.  The space and the &amp;quot;-&amp;quot; characters are important.  Start by using exactly what is shown here, and experiment to see how much you can change it before it disappears from the outline.  I often use this to group a large number of similar methods that can then be folded out of view.&lt;br /&gt;
&lt;br /&gt;
==== msg ====&lt;br /&gt;
&lt;br /&gt;
A name I use over and over again for messages, often like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
msg  = &amp;quot;this is a message&amp;quot;&lt;br /&gt;
print( msg )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Why two lines instead of one?  Because I often change it to include logging or sending to the GUI.  It might then become:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
msg  = &amp;quot;this is a message&amp;quot;&lt;br /&gt;
print( msg )&lt;br /&gt;
AppGlobal.logger.debug( msg )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I find this a nice way to manage code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== #rint ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you use print for debugging you may want to scan your code of &amp;quot;print&amp;quot; to remove unwanted statements.  I do not delete them because sometimes I want them again for more debugging.  I change &amp;quot;print&amp;quot; to &amp;quot;#rint&amp;quot;&lt;br /&gt;
to comment out the print but to stop it form showing up on searches.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Make Code Searchable ====&lt;br /&gt;
&lt;br /&gt;
I like generic names to enable cut and paste but this runs against the idea of searchable code.  The idea is that unusual names are easy to search for.  It also helps if names are descriptive.  Why searchable? So you can find the code you want to work on.  One way to be both searchable and generic is to take instance references and make local ( or the reverse )  For example consider this tkinter code:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        a_list     = list(self.sort_order_dict.keys())&lt;br /&gt;
        a_widget   =  ttk.Combobox( a_frame, values = a_list,  state='readonly')&lt;br /&gt;
        a_widget.grid( row = lrow + 1, column = lcol, rowspan = 1, columnspan = 3,  sticky = E + W + N + S )&lt;br /&gt;
        a_widget.set( a_list[0] )&lt;br /&gt;
        self.sort_order_widget = a_widget&lt;br /&gt;
        lcol   += 3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The name a_widget is generic, but to see what it &amp;quot;really&amp;quot; is you have the none generic name &amp;quot;self.sort_order_widget&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you do not see an easy way to do this with names use a comment.  Using zzzz.... is a short term way of doing this.&lt;br /&gt;
&lt;br /&gt;
==== Dict Based Case Statements ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Python does not have a case statement, but it does have if....elif which can be used and is only a little more verbose.  However if you have more than a few cases it can be cumbersome.  Using a dict gives a very compact and fast case statement.  Suppose you want to have a case statement based on strings:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    # set up, ideally only done onece, perhaps at module or class level&lt;br /&gt;
    dispatch_dict   = { &amp;quot;one&amp;quot;:    print_one,&lt;br /&gt;
                        &amp;quot;two&amp;quot;:    print_two,&lt;br /&gt;
                        &amp;quot;three&amp;quot;:  print_three,&lt;br /&gt;
                        }&lt;br /&gt;
&lt;br /&gt;
    # set a case for an example call:&lt;br /&gt;
    key = &amp;quot;two&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # the slightly verbose case statement&lt;br /&gt;
    function      = dispatch_dict[ key ]&lt;br /&gt;
    function()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Parameters for Applications =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are various ways of storing start up parameters for applications.  In the old days almost all windows programs had a &amp;quot;ini&amp;quot; file.  Linux had/has &amp;quot;config&amp;quot; files.  In both cases these are text files that are easily edited with a simple text editor.  More recently xml files ( which i tend to hate ) have come into vogue.  Finally some applications give you a gui for editing configuration values and then save them any way they want, perhaps in the &amp;quot;registry&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Using a gui is the easiest way for the user in particular the naive user.  They are also a lot of work to implement and maintain.  So I favor a flat, non-xml file.  But what file?  For Python my answere is a python.py file that has pretty much one class, Parameters, that is implemented as a singleton ( in what ever way you want to implement singletons ).  These are easy to implement, easy to maintain, and very flexible.  They can also do clever things like detecting what operating system they are running on and make automatic adjustments.  There are no issues of converting type into strings for the file.  Comments are easily included. Loading can print the progress of initialization.&lt;br /&gt;
&lt;br /&gt;
I will put a brief sample here soon so you can see what a file looks like.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
code comming here&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Logging =&lt;br /&gt;
&lt;br /&gt;
I use the logging class that is part of standard python.  I provide a button to view and edit the file.  Why invent your own method.  Here is some code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
code comming&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Restart =&lt;br /&gt;
When an application ( here I am thinking about GUI applications ) starts there can be a considerable delay as all the modules are imported.  Typically a restart is done after an exception or when parameters are changed.  So I include a restart button on the GUI to quickly restart the application.  In my case applications are usually started by constructing some application class.  So what I do is break up the __init__ method into 2 parts, only the second needs to be run to restart the application.  Here is some sample code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    def __init__(self ):&lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
        create the application, its GUI is called self.gui which is &lt;br /&gt;
        created in restart &lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
        ...... more code ......&lt;br /&gt;
&lt;br /&gt;
        self.restart( )    # continue in restart&lt;br /&gt;
&lt;br /&gt;
    # --------------------------------------------------------&lt;br /&gt;
    def restart(self ):&lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
        use to restart the app without ending it&lt;br /&gt;
        parameters will be reloaded and the gui rebuilt&lt;br /&gt;
        call from a button on the GUI &lt;br /&gt;
        args: zip&lt;br /&gt;
        ret:  zip ... all sided effects&lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
        &lt;br /&gt;
        self.no_restarts    += 1 # if we want to keep track &lt;br /&gt;
        if not( self.gui is None ):  # determines if a restart or the start&lt;br /&gt;
            # !!  # need to shut down other thread&lt;br /&gt;
            self.gui.root.destroy()&lt;br /&gt;
            reload( parameters )&lt;br /&gt;
&lt;br /&gt;
        self.logger         = None&lt;br /&gt;
&lt;br /&gt;
        .... and so on ......&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Names =&lt;br /&gt;
&lt;br /&gt;
I have heard it said that proper naming is the hardest problem in programming.  Not sure if true, but it is not easy.  So here is my take:&lt;br /&gt;
&lt;br /&gt;
* Of course be consistent.  It may help to make a vocabulary list of the terms you prefer.  I have found that the values often come in pairs:&lt;br /&gt;
&lt;br /&gt;
   start_date / stop_date  or low_temp / high_temp ( or hi_temp ) or start_date / end_date &lt;br /&gt;
   then some style are:&lt;br /&gt;
   date_start / date_stop&lt;br /&gt;
&lt;br /&gt;
Note that the stop_date and end_date is an easy place for confusion.  So decide on your style and stick to it.&lt;br /&gt;
&lt;br /&gt;
* Do not be afraid of long names but consistent abbreviations are fine ( keep a list ).&lt;br /&gt;
* I generally think that methods should be named with verb like names: os_open_file.&lt;br /&gt;
* I find that people use the name '''file''' for both the '''file name''' ( often string like ) and for the '''file handle''' ( the thing you get when you open a file ), so my variables for file names are like:&lt;br /&gt;
&lt;br /&gt;
   input_file_name ( sometimes input_fn )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Lists and other iteratables often get a name to indicate that: so a list of names might be called something like student_names&lt;br /&gt;
&lt;br /&gt;
* Sometimes generic names are preferable especially if there scope is just a few lines.  I am willing to iterate over a list of numbers with i, but I prefer ix and even then I fell lazy.  If I have a list of names as above I might itterate with the singular, but usually i prefix it with i_ so:&lt;br /&gt;
&lt;br /&gt;
     for i_name in student_names&lt;br /&gt;
         print( i_name )&lt;br /&gt;
&lt;br /&gt;
= Comments =&lt;br /&gt;
Extreme programming trys to make the code so obvious that it is easy to tell what the code is doing without comments.  If not taken too far I think this is a great idea.  It requires really good names.  But most of my comments do not tell what the code is doing, they tell either why the code is doing something or what the purpose is of doing what ever.  But that is not all:&lt;br /&gt;
* Comments are left to indicate where the code might be made better:&lt;br /&gt;
** More careful error management.&lt;br /&gt;
** Where I am thinking about refactoring&lt;br /&gt;
** To make up for deliberately generic names -- ?? I need more explanation here&lt;br /&gt;
** To provide a search string so I can find a place in the code&lt;br /&gt;
** Where a little trap may lurk in the code:&lt;br /&gt;
   For example most methods return at the end, but sometimes you discover in your processing that you are done&lt;br /&gt;
   early.  You could put some sort of if then structure in, but now you indent one level more making the&lt;br /&gt;
   code somewhat more difficult.  So just return.  In these cases I may put a comment at the beginning of the method:&lt;br /&gt;
&lt;br /&gt;
   # beware of early return&lt;br /&gt;
&lt;br /&gt;
   I try to indicate that there may be an early return, but refactoring may remove it and leave the comment in place&lt;br /&gt;
** Of course no comment should be considered 100% reliable&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Copy and Paste =&lt;br /&gt;
some content may move to [[Copy and Paste Is Good]] or not &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are lots of arguments against copy and paste, but used carefully I think that it is extremely useful.  But used carefully.&lt;br /&gt;
&lt;br /&gt;
One of the biggest arguments against it is that you may be using code that you do not really understand.  This can be true, but the&lt;br /&gt;
same is true when you use someone else's module.&lt;br /&gt;
&lt;br /&gt;
So I have a procedure depending on where I copy from:&lt;br /&gt;
&lt;br /&gt;
* My own code:&lt;br /&gt;
** I only take working code.&lt;br /&gt;
** I reread it and make appropriate changes.&lt;br /&gt;
** I own the results, if it does not work properly I am to blame&lt;br /&gt;
** I write code in a generic way to make it easy to copy and paste.&lt;br /&gt;
&lt;br /&gt;
* Refactoring:&lt;br /&gt;
** Of course when I refactor I use copy and paste, because basically your are just rearranging code you already have that works.&lt;br /&gt;
** Many people use git to make sure they do not loose stuff in translation.  I just use file copies, I have my own methods&lt;br /&gt;
** Sleep that is zzzzzzz: I put zzzz or similar around the place where I am making changes.  It throws a quick syntax method if I foolishly try to run the code and is easy to find as zzzz is not anything I would normally use in code.  Sometimes I copy a lot of junk in between a pair of zzz so I have all the names I need in easy view.  Then I do the new code, remove the junk and finally the pair of zzzz'a.&lt;br /&gt;
&lt;br /&gt;
* Other peoples code:&lt;br /&gt;
** I put there code in an example file.&lt;br /&gt;
** I change the code to my style and comment it, often keeping a url to the source.&lt;br /&gt;
** I run it to make sure it does what I want.&lt;br /&gt;
** I may make it generic in a way to make copying easier.&lt;br /&gt;
** I save the example.&lt;br /&gt;
**&lt;br /&gt;
&lt;br /&gt;
= Python Code Example Files =&lt;br /&gt;
When I learn a new thing in Python I often keep an example file.  I can then use it for reference and/or copy code out of it for other uses.  I have a few &amp;quot;tricks&amp;quot;.  See: '''[[Python Code Example Files]]'''&lt;br /&gt;
&lt;br /&gt;
= Tkinker =&lt;br /&gt;
== Complex Tkinker Windows ==&lt;br /&gt;
I found it really easy to get confused in coding Tkinter because it is not done in a visual interface.&lt;br /&gt;
One of my goal in coding is to make the code create the gui from top to bottom and from left to right.  That way the layout of code and the layout of the gui are easier to match up in my mind.  This has a benefit of making it relatively easy to:&lt;br /&gt;
&lt;br /&gt;
* Cut and paste code to rearrange placement in the gui.&lt;br /&gt;
* Cut/paste/modify code to build new widgets.&lt;br /&gt;
&lt;br /&gt;
So here are some tips:&lt;br /&gt;
&lt;br /&gt;
* I do a sketch of what I want on paper.&lt;br /&gt;
* The GUI is built in a class.&lt;br /&gt;
* I break the sketch into Tkinter frames each of which will layout into the window in some fairly simple scheme, often the pack layout will work.  When this is not enough I use grid.&lt;br /&gt;
* When using grids I always have variables for the row and column positions.  These are typically managed with statements like   lrow  += 1.  Coding this way make movement of the code much easier.  Placement methods may also be used to manage the row and column variables.&lt;br /&gt;
* Each individual frame is built in its own method, it takes the parent frame as an argument and returns the frame that it builds. The returned frame is then placed in its parent.&lt;br /&gt;
* References to the widgets are often not needed once the GUI is built, so local variable are often used.  Using a local variable makes it easier to copy/paste.  I try to always use the name a_widget, thus code that places or otherwise manipulates the widget in a generic way ( like placement ) works well in a copy paste.  If I need a reference, I typically will do that on the last line of the code for the widget.  For widgets that need references you can use an instance variable of the class, or in some cases it it useful to store them in a dictionary.&lt;br /&gt;
* Building helper classes for either building the widgets, or placing them or both is often useful.&lt;br /&gt;
* You can see these techniques in GUI class of my various application documented on this wiki.&lt;br /&gt;
* See: '''[[Python Buttons Switch Case]]''' for some tricks on building Tkinter frames with lots of buttons linked to functions.&lt;br /&gt;
&lt;br /&gt;
== Threading with Tkinker ==&lt;br /&gt;
&lt;br /&gt;
Tkinker wants to own the processing of the application.  If you make a button start a long running operation then the GUI blocks and becomes unresponsive.  So you need some sort of threading.  Here are some tips.&lt;br /&gt;
&lt;br /&gt;
=== Polling withing Tkinker  === &lt;br /&gt;
&lt;br /&gt;
You can poll in the Tkinter event loop and call any function ( no arguments I think ) using a Tkinter function.  Use this to run something short.  You can only run it once this way.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        self.gui.root.after( self.parameters.gt_delta_t, self.polling )  # self.gui.root = Tkinter root, .1 = .1 sec, self.polling = name of the function&lt;br /&gt;
                                                                         # ( note no () which is a function call &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To overcome the fact that it only runs once, ask for it again at the end of the function.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    def polling( self, ):&lt;br /&gt;
        ..... do something quick &lt;br /&gt;
&lt;br /&gt;
        self.gui.root.after( .1, self.polling ) &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you function throws an exception it will stop running.  Try Except works for me:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    def polling( self, ):&lt;br /&gt;
&lt;br /&gt;
        try:&lt;br /&gt;
            ..... do something quick &lt;br /&gt;
        except Exception, ex_arg:&lt;br /&gt;
            .... I log the error &lt;br /&gt;
        finally:&lt;br /&gt;
            self.gui.root.after( .1, self.polling )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Use Threading  === &lt;br /&gt;
&lt;br /&gt;
Use real threading.  I inherit from threading.Thread and implement a override of the run method.  Use threading mechanisms to &amp;quot;message&amp;quot; back and fourth to the gui, Tkinter, thread.  &lt;br /&gt;
Seems to work fine.&lt;br /&gt;
&lt;br /&gt;
== Calling across Threads ==&lt;br /&gt;
&lt;br /&gt;
If you have objects in 2 different threads calling across the threads can be very dangerous.  I have worked out a method that I find useful/safe/easy.  It does make some assumptions.&lt;br /&gt;
&lt;br /&gt;
*Both objects/threads have something resembling polling where checks can be made at a convient time to see if the other thread wants attention.&lt;br /&gt;
&lt;br /&gt;
=== Step 1, Set Up Queues === &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        self.queue_to_helper      = Queue.Queue( 20 )  # send from tkinker mainloop to helper here&lt;br /&gt;
        self.queue_fr_helper      = Queue.Queue( 20 )  # send back from helper thread to tkinker mainloop here&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So how does this help making calls across the threads?  What I am doing in SmartTerminal ( could change, see the code ) is to always pass a tuple of 3 parts:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
( a_string, a_function, another_tuple_of_arguments_to_a_function )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
if a_string is &amp;quot;call&amp;quot; then the queue item is for a function call ( other cases not discussed here ).  Then the function ( remember functions are first class objects math.sin( x ) call to a function, math sin a function ) is combined with the arguments to make the call:  a_function( arguments_to_a_function ).  Almost, it will not work because argument_to_a_function is itself a tuple.  And even if the tuple has five elements you are only passing one argument, the tuple, to the function.  You need to unpack the arguments.  How do you do that:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
     a_function( *another_tuple_of_arguments_to_a_function  )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is the code with a little more context ( for more see SmartTerminal smart_terminal_helper.HelperThread.polling ) but not actual production code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
      .........&lt;br /&gt;
      ( action, function, function_args ) = self.rec_from_queue()&lt;br /&gt;
      if action == &amp;quot;call&amp;quot;:&lt;br /&gt;
         function( *function_args )&lt;br /&gt;
         .........           &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
more coming......&lt;br /&gt;
&lt;br /&gt;
= Starting a Tkinter App =&lt;br /&gt;
These applications start fine but often remain in the background with their window behind other windows.  It would be good to bring it to the top of your windows.  This code, may not be the best, seems to work at least on the Windows.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     root.attributes(&amp;quot;-topmost&amp;quot;, True)  &lt;br /&gt;
     root.attributes(&amp;quot;-topmost&amp;quot;, False)  # if left to True window always on top&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You need to get this to run once after the mainloop is started.  You can do this with  '''root.after()'''  Some details left to you.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Simple Techniques =&lt;br /&gt;
These are techniques I use that I have not often seen documented.&lt;br /&gt;
&lt;br /&gt;
== Create a Local Reference ==&lt;br /&gt;
&lt;br /&gt;
We often use &amp;quot;dotted&amp;quot; notation to reference non-local variables.  If the variable is used several times we may want to create a local reference:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     graph_live_time_zero   = self.parameters.graph_live_time_zero&lt;br /&gt;
     if    graph_live_time_zero   = 1:&lt;br /&gt;
          .....&lt;br /&gt;
     elif  graph_live_time_zero   = 2:&lt;br /&gt;
          .....&lt;br /&gt;
     else:&lt;br /&gt;
          ......&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
instead of:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
      &lt;br /&gt;
     if    self.parameters.graph_live_time_zero = 1:&lt;br /&gt;
          .....&lt;br /&gt;
     elif  self.parameters.graph_live_time_zero = 2:&lt;br /&gt;
          .....&lt;br /&gt;
     else:&lt;br /&gt;
          ......&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Why: &lt;br /&gt;
&lt;br /&gt;
*Well Python searches for local references first, they are faster so your code is faster.&lt;br /&gt;
*If something about the non-local reference changes, then changing the code is easier/less error prone.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Python]]&lt;/div&gt;</summary>
		<author><name>Russ hensel</name></author>
		
	</entry>
	<entry>
		<id>http://www.opencircuits.com/index.php?title=Russ_Python_Tips_and_Techniques&amp;diff=88689</id>
		<title>Russ Python Tips and Techniques</title>
		<link rel="alternate" type="text/html" href="http://www.opencircuits.com/index.php?title=Russ_Python_Tips_and_Techniques&amp;diff=88689"/>
		<updated>2023-02-04T13:44:20Z</updated>

		<summary type="html">&lt;p&gt;Russ hensel: /* Complex Tkinker Windows */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= What =&lt;br /&gt;
These are Tips and Techniques I have found useful in my Python programming [[User:Russ_hensel]].  I would be interested in your feedback.  Let me know if you think the tip is useful/wrong/something everyone knows.  A good set of this material relates to applications with a GUI.  They are often not beginner techniques, but neither are they all advanced ones.&lt;br /&gt;
Just starting Feb 2017 check history tab above to see if progress is being made.  If you find a tip not finished or working feel free to contact me.&lt;br /&gt;
&lt;br /&gt;
== Ones Still To Be Written ==&lt;br /&gt;
&lt;br /&gt;
* when division by 0 is useful&lt;br /&gt;
* code is multiple files - scratch file&lt;br /&gt;
* moving to 3.6 use fstrings&lt;br /&gt;
* example files with functions  [[Python Example Code]]&lt;br /&gt;
* when you need a reference and when not&lt;br /&gt;
* dict based case statements&lt;br /&gt;
* choose names for cut and paste&lt;br /&gt;
* mark your code with unusual string  * zzz in your code &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Move these to a good place in the outline ===&lt;br /&gt;
&lt;br /&gt;
==== Python Installation ====&lt;br /&gt;
&lt;br /&gt;
I have a separate page [[Category:Python Installation]] about installation an maintenance, the first part is of general interest, the second on particular issues I have encountered.  It may be useful to get some of my projects running [[Category:Python Projects]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== FStrings ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
FStrings are incredibly nice. New in 3.6, use it ( or 3.7.... ) They also are reputed to be really fast.  Use them.  At a later time I may have a bunch of examples, but for now just the basic statement:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    joe  = &amp;quot;Joe Smith Jones Norton&amp;quot;&lt;br /&gt;
    msg  = f&amp;quot;Joe's name is actually {joe}&amp;quot;&lt;br /&gt;
    print( msg 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Comments for Navigation ====&lt;br /&gt;
&lt;br /&gt;
Spyder has a nice feature for code navigation: the &amp;quot;Outline Tab&amp;quot;.  This tab outlines the code nesting classes, methods.... and expands and contracts the tree much like the code folding show in the editor.  The outline tab works both to help you navigate to a place in the code, or to show you where in the code the cursor currently lies.  What is less obvious is that comments can also mark a section.  I have not found documentation for this but here is what I have found.   A comment like &amp;quot;# ------ frame building methods  --&amp;quot; will create an outline section whose indentation in the outline depends on indentation of the comment.  The space and the &amp;quot;-&amp;quot; characters are important.  Start by using exactly what is shown here, and experiment to see how much you can change it before it disappears from the outline.  I often use this to group a large number of similar methods that can then be folded out of view.&lt;br /&gt;
&lt;br /&gt;
==== msg ====&lt;br /&gt;
&lt;br /&gt;
A name I use over and over again for messages, often like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
msg  = &amp;quot;this is a message&amp;quot;&lt;br /&gt;
print( msg )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Why two lines instead of one?  Because I often change it to include logging or sending to the GUI.  It might then become:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
msg  = &amp;quot;this is a message&amp;quot;&lt;br /&gt;
print( msg )&lt;br /&gt;
AppGlobal.logger.debug( msg )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I find this a nice way to manage code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== #rint ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you use print for debugging you may want to scan your code of &amp;quot;print&amp;quot; to remove unwanted statements.  I do not delete them because sometimes I want them again for more debugging.  I change &amp;quot;print&amp;quot; to &amp;quot;#rint&amp;quot;&lt;br /&gt;
to comment out the print but to stop it form showing up on searches.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Make Code Searchable ====&lt;br /&gt;
&lt;br /&gt;
I like generic names to enable cut and paste but this runs against the idea of searchable code.  The idea is that unusual names are easy to search for.  It also helps if names are descriptive.  Why searchable? So you can find the code you want to work on.  One way to be both searchable and generic is to take instance references and make local ( or the reverse )  For example consider this tkinter code:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        a_list     = list(self.sort_order_dict.keys())&lt;br /&gt;
        a_widget   =  ttk.Combobox( a_frame, values = a_list,  state='readonly')&lt;br /&gt;
        a_widget.grid( row = lrow + 1, column = lcol, rowspan = 1, columnspan = 3,  sticky = E + W + N + S )&lt;br /&gt;
        a_widget.set( a_list[0] )&lt;br /&gt;
        self.sort_order_widget = a_widget&lt;br /&gt;
        lcol   += 3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The name a_widget is generic, but to see what it &amp;quot;really&amp;quot; is you have the none generic name &amp;quot;self.sort_order_widget&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you do not see an easy way to do this with names use a comment.  Using zzzz.... is a short term way of doing this.&lt;br /&gt;
&lt;br /&gt;
==== Dict Based Case Statements ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Python does not have a case statement, but it does have if....elif which can be used and is only a little more verbose.  However if you have more than a few cases it can be cumbersome.  Using a dict gives a very compact and fast case statement.  Suppose you want to have a case statement based on strings:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    # set up, ideally only done onece, perhaps at module or class level&lt;br /&gt;
    dispatch_dict   = { &amp;quot;one&amp;quot;:    print_one,&lt;br /&gt;
                        &amp;quot;two&amp;quot;:    print_two,&lt;br /&gt;
                        &amp;quot;three&amp;quot;:  print_three,&lt;br /&gt;
                        }&lt;br /&gt;
&lt;br /&gt;
    # set a case for an example call:&lt;br /&gt;
    key = &amp;quot;two&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    # the slightly verbose case statement&lt;br /&gt;
    function      = dispatch_dict[ key ]&lt;br /&gt;
    function()&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Parameters for Applications =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are various ways of storing start up parameters for applications.  In the old days almost all windows programs had a &amp;quot;ini&amp;quot; file.  Linux had/has &amp;quot;config&amp;quot; files.  In both cases these are text files that are easily edited with a simple text editor.  More recently xml files ( which i tend to hate ) have come into vogue.  Finally some applications give you a gui for editing configuration values and then save them any way they want, perhaps in the &amp;quot;registry&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Using a gui is the easiest way for the user in particular the naive user.  They are also a lot of work to implement and maintain.  So I favor a flat, non-xml file.  But what file?  For Python my answere is a python.py file that has pretty much one class, Parameters, that is implemented as a singleton ( in what ever way you want to implement singletons ).  These are easy to implement, easy to maintain, and very flexible.  They can also do clever things like detecting what operating system they are running on and make automatic adjustments.  There are no issues of converting type into strings for the file.  Comments are easily included. Loading can print the progress of initialization.&lt;br /&gt;
&lt;br /&gt;
I will put a brief sample here soon so you can see what a file looks like.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
code comming here&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Logging =&lt;br /&gt;
&lt;br /&gt;
I use the logging class that is part of standard python.  I provide a button to view and edit the file.  Why invent your own method.  Here is some code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
code comming&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Restart =&lt;br /&gt;
When an application ( here I am thinking about GUI applications ) starts there can be a considerable delay as all the modules are imported.  Typically a restart is done after an exception or when parameters are changed.  So I include a restart button on the GUI to quickly restart the application.  In my case applications are usually started by constructing some application class.  So what I do is break up the __init__ method into 2 parts, only the second needs to be run to restart the application.  Here is some sample code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    def __init__(self ):&lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
        create the application, its GUI is called self.gui which is &lt;br /&gt;
        created in restart &lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
        ...... more code ......&lt;br /&gt;
&lt;br /&gt;
        self.restart( )    # continue in restart&lt;br /&gt;
&lt;br /&gt;
    # --------------------------------------------------------&lt;br /&gt;
    def restart(self ):&lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
        use to restart the app without ending it&lt;br /&gt;
        parameters will be reloaded and the gui rebuilt&lt;br /&gt;
        call from a button on the GUI &lt;br /&gt;
        args: zip&lt;br /&gt;
        ret:  zip ... all sided effects&lt;br /&gt;
        &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
        &lt;br /&gt;
        self.no_restarts    += 1 # if we want to keep track &lt;br /&gt;
        if not( self.gui is None ):  # determines if a restart or the start&lt;br /&gt;
            # !!  # need to shut down other thread&lt;br /&gt;
            self.gui.root.destroy()&lt;br /&gt;
            reload( parameters )&lt;br /&gt;
&lt;br /&gt;
        self.logger         = None&lt;br /&gt;
&lt;br /&gt;
        .... and so on ......&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Names =&lt;br /&gt;
&lt;br /&gt;
I have heard it said that proper naming is the hardest problem in programming.  Not sure if true, but it is not easy.  So here is my take:&lt;br /&gt;
&lt;br /&gt;
* Of course be consistent.  It may help to make a vocabulary list of the terms you prefer.  I have found that the values often come in pairs:&lt;br /&gt;
&lt;br /&gt;
   start_date / stop_date  or low_temp / high_temp ( or hi_temp ) or start_date / end_date &lt;br /&gt;
   then some style are:&lt;br /&gt;
   date_start / date_stop&lt;br /&gt;
&lt;br /&gt;
Note that the stop_date and end_date is an easy place for confusion.  So decide on your style and stick to it.&lt;br /&gt;
&lt;br /&gt;
* Do not be afraid of long names but consistent abbreviations are fine ( keep a list ).&lt;br /&gt;
* I generally think that methods should be named with verb like names: os_open_file.&lt;br /&gt;
* I find that people use the name '''file''' for both the '''file name''' ( often string like ) and for the '''file handle''' ( the thing you get when you open a file ), so my variables for file names are like:&lt;br /&gt;
&lt;br /&gt;
   input_file_name ( sometimes input_fn )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Lists and other iteratables often get a name to indicate that: so a list of names might be called something like student_names&lt;br /&gt;
&lt;br /&gt;
* Sometimes generic names are preferable especially if there scope is just a few lines.  I am willing to iterate over a list of numbers with i, but I prefer ix and even then I fell lazy.  If I have a list of names as above I might itterate with the singular, but usually i prefix it with i_ so:&lt;br /&gt;
&lt;br /&gt;
     for i_name in student_names&lt;br /&gt;
         print( i_name )&lt;br /&gt;
&lt;br /&gt;
= Comments =&lt;br /&gt;
Extreme programming trys to make the code so obvious that it is easy to tell what the code is doing without comments.  If not taken too far I think this is a great idea.  It requires really good names.  But most of my comments do not tell what the code is doing, they tell either why the code is doing something or what the purpose is of doing what ever.  But that is not all:&lt;br /&gt;
* Comments are left to indicate where the code might be made better:&lt;br /&gt;
** More careful error management.&lt;br /&gt;
** Where I am thinking about refactoring&lt;br /&gt;
** To make up for deliberately generic names -- ?? I need more explanation here&lt;br /&gt;
** To provide a search string so I can find a place in the code&lt;br /&gt;
** Where a little trap may lurk in the code:&lt;br /&gt;
   For example most methods return at the end, but sometimes you discover in your processing that you are done&lt;br /&gt;
   early.  You could put some sort of if then structure in, but now you indent one level more making the&lt;br /&gt;
   code somewhat more difficult.  So just return.  In these cases I may put a comment at the beginning of the method:&lt;br /&gt;
&lt;br /&gt;
   # beware of early return&lt;br /&gt;
&lt;br /&gt;
   I try to indicate that there may be an early return, but refactoring may remove it and leave the comment in place&lt;br /&gt;
** Of course no comment should be considered 100% reliable&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Copy and Paste =&lt;br /&gt;
some content may move to [[Copy and Paste Is Good]] or not &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are lots of arguments against copy and paste, but used carefully I think that it is extremely useful.  But used carefully.&lt;br /&gt;
&lt;br /&gt;
One of the biggest arguments against it is that you may be using code that you do not really understand.  This can be true, but the&lt;br /&gt;
same is true when you use someone else's module.&lt;br /&gt;
&lt;br /&gt;
So I have a procedure depending on where I copy from:&lt;br /&gt;
&lt;br /&gt;
* My own code:&lt;br /&gt;
** I only take working code.&lt;br /&gt;
** I reread it and make appropriate changes.&lt;br /&gt;
** I own the results, if it does not work properly I am to blame&lt;br /&gt;
** I write code in a generic way to make it easy to copy and paste.&lt;br /&gt;
&lt;br /&gt;
* Refactoring:&lt;br /&gt;
** Of course when I refactor I use copy and paste, because basically your are just rearranging code you already have that works.&lt;br /&gt;
** Many people use git to make sure they do not loose stuff in translation.  I just use file copies, I have my own methods&lt;br /&gt;
** Sleep that is zzzzzzz: I put zzzz or similar around the place where I am making changes.  It throws a quick syntax method if I foolishly try to run the code and is easy to find as zzzz is not anything I would normally use in code.  Sometimes I copy a lot of junk in between a pair of zzz so I have all the names I need in easy view.  Then I do the new code, remove the junk and finally the pair of zzzz'a.&lt;br /&gt;
&lt;br /&gt;
* Other peoples code:&lt;br /&gt;
** I put there code in an example file.&lt;br /&gt;
** I change the code to my style and comment it, often keeping a url to the source.&lt;br /&gt;
** I run it to make sure it does what I want.&lt;br /&gt;
** I may make it generic in a way to make copying easier.&lt;br /&gt;
** I save the example.&lt;br /&gt;
**&lt;br /&gt;
&lt;br /&gt;
= Python Code Example Files =&lt;br /&gt;
When I learn a new thing in Python I often keep an example file.  I can then use it for reference and/or copy code out of it for other uses.  I have a few &amp;quot;tricks&amp;quot;.  See: '''[[Python Code Example Files]]'''&lt;br /&gt;
&lt;br /&gt;
= Tkinker =&lt;br /&gt;
== Complex Tkinker Windows ==&lt;br /&gt;
I found it really easy to get confused in coding Tkinter because it is not done in a visual interface.&lt;br /&gt;
One of my goal in coding is to make the code create the gui from top to bottom and from left to right.  That way the layout of code and the layout of the gui are easier to match up in my mind.  This has a benefit of making it relatively easy to:&lt;br /&gt;
&lt;br /&gt;
* Cut and paste code to rearrange placement in the gui.&lt;br /&gt;
* Cut/paste/modify code to build new widgets.&lt;br /&gt;
&lt;br /&gt;
So here are some tips:&lt;br /&gt;
&lt;br /&gt;
* I do a sketch of what I want on paper.&lt;br /&gt;
* The GUI is built in a class.&lt;br /&gt;
* I break the sketch into Tkinter frames each of which will layout into the window in some fairly simple scheme, often the pack layout will work.  When this is not enough I use grid.&lt;br /&gt;
* When using grids I always have variables for the row and column positions.  These are typically managed with statements like   lrow  += 1.  Coding this way make movement of the code much easier.  Placement methods may also be used to manage the row and column variables.&lt;br /&gt;
* Each individual frame is built in its own method, it takes the parent frame as an argument and returns the frame that it builds. The returned frame is then placed in its parent.&lt;br /&gt;
* References to the widgets are often not needed once the GUI is built, so local variable are often used.  Using a local variable makes it easier to copy/paste.  I try to always use the name a_widget, thus code that places or otherwise manipulates the widget in a generic way ( like placement ) works well in a copy paste.  If I need a reference, I typically will do that on the last line of the code for the widget.  For widgets that need references you can use an instance variable of the class, or in some cases it it useful to store them in a dictionary.&lt;br /&gt;
* Building helper classes for either building the widgets, or placing them or both is often useful.&lt;br /&gt;
* You can see these techniques in GUI class of my various application documented on this wiki.&lt;br /&gt;
* See: '''[[Python Buttons Switch Case]]''' for some tricks on building Tkinter frames with lots of buttons linked to functions.&lt;br /&gt;
&lt;br /&gt;
= Threading with Tkinker =&lt;br /&gt;
&lt;br /&gt;
Tkinker wants to own the processing of the application.  If you make a button start a long running operation then the GUI blocks and becomes unresponsive.  So you need some sort of threading.  Here are some tips.&lt;br /&gt;
&lt;br /&gt;
== Polling withing Tkinker  ==&lt;br /&gt;
&lt;br /&gt;
You can poll in the Tkinter event loop and call any function ( no arguments I think ) using a Tkinter function.  Use this to run something short.  You can only run it once this way.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        self.gui.root.after( self.parameters.gt_delta_t, self.polling )  # self.gui.root = Tkinter root, .1 = .1 sec, self.polling = name of the function&lt;br /&gt;
                                                                         # ( note no () which is a function call &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To overcome the fact that it only runs once, ask for it again at the end of the function.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    def polling( self, ):&lt;br /&gt;
        ..... do something quick &lt;br /&gt;
&lt;br /&gt;
        self.gui.root.after( .1, self.polling ) &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you function throws an exception it will stop running.  Try Except works for me:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    def polling( self, ):&lt;br /&gt;
&lt;br /&gt;
        try:&lt;br /&gt;
            ..... do something quick &lt;br /&gt;
        except Exception, ex_arg:&lt;br /&gt;
            .... I log the error &lt;br /&gt;
        finally:&lt;br /&gt;
            self.gui.root.after( .1, self.polling )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Use Threading  ==&lt;br /&gt;
&lt;br /&gt;
Use real threading.  I inherit from threading.Thread and implement a override of the run method.  Use threading mechanisms to &amp;quot;message&amp;quot; back and fourth to the gui, Tkinter, thread.  &lt;br /&gt;
Seems to work fine.&lt;br /&gt;
&lt;br /&gt;
= Calling across Threads =&lt;br /&gt;
&lt;br /&gt;
If you have objects in 2 different threads calling across the threads can be very dangerous.  I have worked out a method that I find useful/safe/easy.  It does make some assumptions.&lt;br /&gt;
&lt;br /&gt;
*Both objects/threads have something resembling polling where checks can be made at a convient time to see if the other thread wants attention.&lt;br /&gt;
&lt;br /&gt;
== Step 1, Set Up Queues ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        self.queue_to_helper      = Queue.Queue( 20 )  # send from tkinker mainloop to helper here&lt;br /&gt;
        self.queue_fr_helper      = Queue.Queue( 20 )  # send back from helper thread to tkinker mainloop here&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So how does this help making calls across the threads?  What I am doing in SmartTerminal ( could change, see the code ) is to always pass a tuple of 3 parts:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
( a_string, a_function, another_tuple_of_arguments_to_a_function )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
if a_string is &amp;quot;call&amp;quot; then the queue item is for a function call ( other cases not discussed here ).  Then the function ( remember functions are first class objects math.sin( x ) call to a function, math sin a function ) is combined with the arguments to make the call:  a_function( arguments_to_a_function ).  Almost, it will not work because argument_to_a_function is itself a tuple.  And even if the tuple has five elements you are only passing one argument, the tuple, to the function.  You need to unpack the arguments.  How do you do that:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
     a_function( *another_tuple_of_arguments_to_a_function  )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is the code with a little more context ( for more see SmartTerminal smart_terminal_helper.HelperThread.polling ) but not actual production code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
      .........&lt;br /&gt;
      ( action, function, function_args ) = self.rec_from_queue()&lt;br /&gt;
      if action == &amp;quot;call&amp;quot;:&lt;br /&gt;
         function( *function_args )&lt;br /&gt;
         .........           &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
more coming......&lt;br /&gt;
&lt;br /&gt;
= Starting a Tkinter App =&lt;br /&gt;
These applications start fine but often remain in the background with their window behind other windows.  It would be good to bring it to the top of your windows.  This code, may not be the best, seems to work at least on the Windows.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     root.attributes(&amp;quot;-topmost&amp;quot;, True)  &lt;br /&gt;
     root.attributes(&amp;quot;-topmost&amp;quot;, False)  # if left to True window always on top&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You need to get this to run once after the mainloop is started.  You can do this with  '''root.after()'''  Some details left to you.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Simple Techniques =&lt;br /&gt;
These are techniques I use that I have not often seen documented.&lt;br /&gt;
&lt;br /&gt;
== Create a Local Reference ==&lt;br /&gt;
&lt;br /&gt;
We often use &amp;quot;dotted&amp;quot; notation to reference non-local variables.  If the variable is used several times we may want to create a local reference:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     graph_live_time_zero   = self.parameters.graph_live_time_zero&lt;br /&gt;
     if    graph_live_time_zero   = 1:&lt;br /&gt;
          .....&lt;br /&gt;
     elif  graph_live_time_zero   = 2:&lt;br /&gt;
          .....&lt;br /&gt;
     else:&lt;br /&gt;
          ......&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
instead of:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
      &lt;br /&gt;
     if    self.parameters.graph_live_time_zero = 1:&lt;br /&gt;
          .....&lt;br /&gt;
     elif  self.parameters.graph_live_time_zero = 2:&lt;br /&gt;
          .....&lt;br /&gt;
     else:&lt;br /&gt;
          ......&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Why: &lt;br /&gt;
&lt;br /&gt;
*Well Python searches for local references first, they are faster so your code is faster.&lt;br /&gt;
*If something about the non-local reference changes, then changing the code is easier/less error prone.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Python]]&lt;/div&gt;</summary>
		<author><name>Russ hensel</name></author>
		
	</entry>
	<entry>
		<id>http://www.opencircuits.com/index.php?title=Mushroom_Resources&amp;diff=88295</id>
		<title>Mushroom Resources</title>
		<link rel="alternate" type="text/html" href="http://www.opencircuits.com/index.php?title=Mushroom_Resources&amp;diff=88295"/>
		<updated>2022-10-12T17:26:16Z</updated>

		<summary type="html">&lt;p&gt;Russ hensel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== BoostC Wiki ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;	&lt;br /&gt;
|What&lt;br /&gt;
|Where&lt;br /&gt;
|Comment&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|Champignouf: An Identification Web Sete&lt;br /&gt;
|[[https://champignouf.com/]]&lt;br /&gt;
|Picture or pictures followed by a few questions  -- then gives multiple suggestions as to what the mushroom is.  So far I like this.&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|Mushroom Identificator: Phone App&lt;br /&gt;
|Android Phone and ?other phones&lt;br /&gt;
|This is the Champignouf web site as an app.&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|Google Lens: Web Site and Phone App&lt;br /&gt;
|Does not seem to do useful id's for mushrooms.&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|Plant dot Net: Phone App&lt;br /&gt;
|Android Phone and ?other phones&lt;br /&gt;
|Some mushroom id's but not very useful imho.&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|*'''[https://eol.org/ Encyclopedia of Life ]'''&lt;br /&gt;
|*'''[https://eol.org/ Encyclopedia of Life ]'''&lt;br /&gt;
|Links to almost all the information known about a mushroom once you have an id or tentative id.  Can be quite technical.  Some learning curve on how to navigate the site.&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|*'''[https://picturemushroom.com/ Picture Mushroom - Online mushroom encyclopedia and mushroom identifier ]'''&lt;br /&gt;
|*'''[https://picturemushroom.com/ Picture Mushroom - Online mushroom encyclopedia and mushroom identifier ]'''&lt;br /&gt;
|This is a website for the phone app, but is good for looking up characteristics of mushrooms once you know the name&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|Picture Mushroom:  Phone App&lt;br /&gt;
|222&lt;br /&gt;
|3333&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|*'''[https://mushroomobserver.org/info/how_to_use Mushroom Observer: How to Use Mushroom Observer ]'''&lt;br /&gt;
|*'''[https://mushroomobserver.org/info/how_to_use Mushroom Observer: How to Use Mushroom Observer ]'''&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|*'''[https://play.google.com/store/apps/details?id=org.plantnet PlantNet Plant Identification - Apps on Google Play ]'''&lt;br /&gt;
|222&lt;br /&gt;
|3333&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|*'''[https://fungusid.com/ FungusID | AI-powered Wild Mushroom Identifier ]'''&lt;br /&gt;
|222&lt;br /&gt;
|3333&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-------------------------------- &lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|*'''[https://fungai.org/ fungai.org ]'''&lt;br /&gt;
|222&lt;br /&gt;
|3333&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|How to pronounce websites&lt;br /&gt;
|*'''[https://www.howtopronounce.com/amanita-muscaria How to pronounce Amanita muscaria | HowToPronounce.com ]'''&lt;br /&gt;
*'''[https://forvo.com/word/amanita_muscaria/ Amanita muscaria pronunciation: How to pronounce Amanita muscaria in Latin, Spanish, French, English ]'''&lt;br /&gt;
*'''[https://www.pronouncekiwi.com/Amanita%20Muscaria How To Pronounce Amanita Muscaria: Amanita Muscaria pronunciation ]'''&lt;br /&gt;
|Learn the right way to pronounce the botanical ( Latin ) name.&lt;br /&gt;
&amp;lt;!-------------------------------- &lt;br /&gt;
&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|3333&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-------------------------------- &lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| &lt;br /&gt;
|222&lt;br /&gt;
|3333&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-------------------------------- &lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| &lt;br /&gt;
|222&lt;br /&gt;
|3333&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-------------------------------- &lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| &lt;br /&gt;
|222&lt;br /&gt;
|3333&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-----------end of table---------------------&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Mushroom]]&lt;/div&gt;</summary>
		<author><name>Russ hensel</name></author>
		
	</entry>
	<entry>
		<id>http://www.opencircuits.com/index.php?title=Mushroom_Resources&amp;diff=88294</id>
		<title>Mushroom Resources</title>
		<link rel="alternate" type="text/html" href="http://www.opencircuits.com/index.php?title=Mushroom_Resources&amp;diff=88294"/>
		<updated>2022-10-12T17:17:49Z</updated>

		<summary type="html">&lt;p&gt;Russ hensel: /* BoostC Wiki */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== BoostC Wiki ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;	&lt;br /&gt;
|What&lt;br /&gt;
|Where&lt;br /&gt;
|Comment&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|Champignouf: An Identification Web Sete&lt;br /&gt;
|[[https://champignouf.com/]]&lt;br /&gt;
|Picture or pictures followed by a few questions  -- then gives multiple suggestions as to what the mushroom is.  So far I like this.&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|Mushroom Identificator: Phone App&lt;br /&gt;
|Android Phone and ?other phones&lt;br /&gt;
|This is the Champignouf web site as an app.&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|Google Lens: Web Site and Phone App&lt;br /&gt;
|Does not seem to do useful id's for mushrooms.&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|Plant dot Net: Phone App&lt;br /&gt;
|Android Phone and ?other phones&lt;br /&gt;
|Some mushroom id's but not very useful imho.&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|*'''[https://eol.org/ Encyclopedia of Life ]'''&lt;br /&gt;
|*'''[https://eol.org/ Encyclopedia of Life ]'''&lt;br /&gt;
|Links to almost all the information known about a mushroom once you have an id or tentative id.  Can be quite technical.  Some learning curve on how to navigate the site.&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|*'''[https://picturemushroom.com/ Picture Mushroom - Online mushroom encyclopedia and mushroom identifier ]'''&lt;br /&gt;
|*'''[https://picturemushroom.com/ Picture Mushroom - Online mushroom encyclopedia and mushroom identifier ]'''&lt;br /&gt;
|This is a website for the phone app, but is good for looking up characteristics of mushrooms once you know the name&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|Picture Mushroom:  Phone App&lt;br /&gt;
|222&lt;br /&gt;
|3333&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|*'''[https://mushroomobserver.org/info/how_to_use Mushroom Observer: How to Use Mushroom Observer ]'''&lt;br /&gt;
|*'''[https://mushroomobserver.org/info/how_to_use Mushroom Observer: How to Use Mushroom Observer ]'''&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|*'''[https://play.google.com/store/apps/details?id=org.plantnet PlantNet Plant Identification - Apps on Google Play ]'''&lt;br /&gt;
|222&lt;br /&gt;
|3333&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|*'''[https://fungusid.com/ FungusID | AI-powered Wild Mushroom Identifier ]'''&lt;br /&gt;
|222&lt;br /&gt;
|3333&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-------------------------------- &lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|*'''[https://fungai.org/ fungai.org ]'''&lt;br /&gt;
|222&lt;br /&gt;
|3333&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|555&lt;br /&gt;
|222&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
&amp;lt;!-----------end of table---------------------&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Mushroom]]&lt;/div&gt;</summary>
		<author><name>Russ hensel</name></author>
		
	</entry>
	<entry>
		<id>http://www.opencircuits.com/index.php?title=Mushroom_Resources&amp;diff=88293</id>
		<title>Mushroom Resources</title>
		<link rel="alternate" type="text/html" href="http://www.opencircuits.com/index.php?title=Mushroom_Resources&amp;diff=88293"/>
		<updated>2022-10-12T17:13:51Z</updated>

		<summary type="html">&lt;p&gt;Russ hensel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== BoostC Wiki ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;	&lt;br /&gt;
|What&lt;br /&gt;
|Where&lt;br /&gt;
|Comment&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|Champignouf: An Identification Web Sete&lt;br /&gt;
|[[https://champignouf.com/]]&lt;br /&gt;
|Picture or pictures followed by a few questions  -- then gives multiple suggestions as to what the mushroom is.  So far I like this.&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|Mushroom Identificator: Phone App&lt;br /&gt;
|Android Phone and ?other phones&lt;br /&gt;
|This is the Champignouf web site as an app.&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|Google Lens: Web Site and Phone App&lt;br /&gt;
|Does not seem to do useful id's for mushrooms.&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|Plant dot Net: Phone App&lt;br /&gt;
|Android Phone and ?other phones&lt;br /&gt;
|Some mushroom id's but not very useful imho.&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|*'''[https://eol.org/ Encyclopedia of Life ]'''&lt;br /&gt;
|*'''[https://eol.org/ Encyclopedia of Life ]'''&lt;br /&gt;
|Links to almost all the information known about a mushroom once you have an id or tentative id.  Can be quite technical.  Some learning curve on how to navigate the site.&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|*'''[https://picturemushroom.com/ Picture Mushroom - Online mushroom encyclopedia and mushroom identifier ]'''&lt;br /&gt;
|*'''[https://picturemushroom.com/ Picture Mushroom - Online mushroom encyclopedia and mushroom identifier ]'''&lt;br /&gt;
|This is a website for the phone app, but is good for looking up characteristics of mushrooms once you know the name&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|Picture Mushroom:  Phone App&lt;br /&gt;
|222&lt;br /&gt;
|3333&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|*'''[https://mushroomobserver.org/info/how_to_use Mushroom Observer: How to Use Mushroom Observer ]'''&lt;br /&gt;
|*'''[https://mushroomobserver.org/info/how_to_use Mushroom Observer: How to Use Mushroom Observer ]'''&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|*'''[https://play.google.com/store/apps/details?id=org.plantnet PlantNet Plant Identification - Apps on Google Play ]'''&lt;br /&gt;
|222&lt;br /&gt;
|3333&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| &lt;br /&gt;
|222&lt;br /&gt;
|3333&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-------------------------------- &lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|666&lt;br /&gt;
|222&lt;br /&gt;
|3333&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|555&lt;br /&gt;
|222&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
&amp;lt;!-----------end of table---------------------&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Mushroom]]&lt;/div&gt;</summary>
		<author><name>Russ hensel</name></author>
		
	</entry>
	<entry>
		<id>http://www.opencircuits.com/index.php?title=Mushroom_Resources&amp;diff=88292</id>
		<title>Mushroom Resources</title>
		<link rel="alternate" type="text/html" href="http://www.opencircuits.com/index.php?title=Mushroom_Resources&amp;diff=88292"/>
		<updated>2022-10-12T17:07:06Z</updated>

		<summary type="html">&lt;p&gt;Russ hensel: /* BoostC Wiki */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== BoostC Wiki ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;	&lt;br /&gt;
|What&lt;br /&gt;
|Where&lt;br /&gt;
|Comment&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|Champignouf: An Identification Web Sete&lt;br /&gt;
|[[https://champignouf.com/]]&lt;br /&gt;
|Picture or pictures followed by a few questions  -- then gives multiple suggestions as to what the mushroom is.  So far I like this.&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|Mushroom Identificator: Phone App&lt;br /&gt;
|Android Phone and ?other phones&lt;br /&gt;
|This is the Champignouf web site as an app.&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|Google Lens: Web Site and Phone App&lt;br /&gt;
|-&lt;br /&gt;
|Does not seem to do useful id's for mushrooms.&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|Plant dot Net: Phone App&lt;br /&gt;
|Android Phone and ?other phones&lt;br /&gt;
|Some mushroom id's but not very useful imho.&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|*'''[https://eol.org/ Encyclopedia of Life ]'''&lt;br /&gt;
|*'''[https://eol.org/ Encyclopedia of Life ]'''&lt;br /&gt;
|Links to almost all the information known about a mushroom once you have an id or tentative id.  Can be quite technical.  Some learning curve on how to navigate the site.&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|*'''[https://picturemushroom.com/ Picture Mushroom - Online mushroom encyclopedia and mushroom identifier ]'''&lt;br /&gt;
|*'''[https://picturemushroom.com/ Picture Mushroom - Online mushroom encyclopedia and mushroom identifier ]'''&lt;br /&gt;
|This is a website for the phone app, but is good for looking up characteristics of mushrooms once you know the name&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|Picture Mushroom:  Phone App&lt;br /&gt;
|222&lt;br /&gt;
|3333&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|*'''[https://mushroomobserver.org/info/how_to_use Mushroom Observer: How to Use Mushroom Observer ]'''&lt;br /&gt;
|*'''[https://mushroomobserver.org/info/how_to_use Mushroom Observer: How to Use Mushroom Observer ]'''&lt;br /&gt;
|3333&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|111&lt;br /&gt;
|222&lt;br /&gt;
|3333&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|111&lt;br /&gt;
|222&lt;br /&gt;
|3333&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|111&lt;br /&gt;
|222&lt;br /&gt;
|3333&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|111&lt;br /&gt;
|222&lt;br /&gt;
|3333&lt;br /&gt;
&lt;br /&gt;
  *'''[https://mushroomobserver.org/info/how_to_use Mushroom Observer: How to Use Mushroom Observer ]'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-----------end of table---------------------&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Mushroom]]&lt;/div&gt;</summary>
		<author><name>Russ hensel</name></author>
		
	</entry>
	<entry>
		<id>http://www.opencircuits.com/index.php?title=Mushroom_Resources&amp;diff=88291</id>
		<title>Mushroom Resources</title>
		<link rel="alternate" type="text/html" href="http://www.opencircuits.com/index.php?title=Mushroom_Resources&amp;diff=88291"/>
		<updated>2022-10-12T17:05:03Z</updated>

		<summary type="html">&lt;p&gt;Russ hensel: /* BoostC Wiki */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== BoostC Wiki ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;	&lt;br /&gt;
|What&lt;br /&gt;
|Where&lt;br /&gt;
|Comment&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|Champignouf: An Identification Web Sete&lt;br /&gt;
|[[https://champignouf.com/]]&lt;br /&gt;
|Picture or pictures followed by a few questions  -- then gives multiple suggestions as to what the mushroom is.  So far I like this.&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|Mushroom Identificator: Phone App&lt;br /&gt;
|Android Phone and ?other phones&lt;br /&gt;
|This is the Champignouf web site as an app.&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|Google Lens: Web Site and Phone App&lt;br /&gt;
|-&lt;br /&gt;
|Does not seem to do useful id's for mushrooms.&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|Plant dot Net: Phone App&lt;br /&gt;
|Android Phone and ?other phones&lt;br /&gt;
|Some mushroom id's but not very useful imho.&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|*'''[https://eol.org/ Encyclopedia of Life ]'''&lt;br /&gt;
|*'''[https://eol.org/ Encyclopedia of Life ]'''&lt;br /&gt;
|Links to almost all the information known about a mushroom once you have an id or tentative id.  Can be quite technical.  Some learning curve on how to navigate the site.&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|*'''[https://picturemushroom.com/ Picture Mushroom - Online mushroom encyclopedia and mushroom identifier ]'''&lt;br /&gt;
|*'''[https://picturemushroom.com/ Picture Mushroom - Online mushroom encyclopedia and mushroom identifier ]'''&lt;br /&gt;
|This is a website for the phone app, but is good for looking up characteristics of mushrooms once you know the name&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|Picture Mushroom:  Phone App&lt;br /&gt;
|222&lt;br /&gt;
|3333&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-----------end of table---------------------&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Mushroom]]&lt;/div&gt;</summary>
		<author><name>Russ hensel</name></author>
		
	</entry>
	<entry>
		<id>http://www.opencircuits.com/index.php?title=Mushroom_Resources&amp;diff=88290</id>
		<title>Mushroom Resources</title>
		<link rel="alternate" type="text/html" href="http://www.opencircuits.com/index.php?title=Mushroom_Resources&amp;diff=88290"/>
		<updated>2022-10-12T17:02:28Z</updated>

		<summary type="html">&lt;p&gt;Russ hensel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== BoostC Wiki ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;	&lt;br /&gt;
|What&lt;br /&gt;
|Where&lt;br /&gt;
|Comment&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|Champignouf: An Identification Web Sete&lt;br /&gt;
|[[https://champignouf.com/]]&lt;br /&gt;
|Picture or pictures followed by a few questions  -- then gives multiple suggestions as to what the mushroom is.  So far I like this.&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|Mushroom Identificator: Phone App&lt;br /&gt;
|Android Phone and ?other phones&lt;br /&gt;
|This is the Champignouf web site as an app.&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|Google Lens: Web Site and Phone App&lt;br /&gt;
|-&lt;br /&gt;
|Does not seem to do useful id's for mushrooms.&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|Plant dot Net: Phone App&lt;br /&gt;
|Android Phone and ?other phones&lt;br /&gt;
|Some mushroom id's but not very useful imho.&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|*'''[https://eol.org/ Encyclopedia of Life ]'''&lt;br /&gt;
|*'''[https://eol.org/ Encyclopedia of Life ]'''&lt;br /&gt;
|Links to almost all the information known about a mushroom once you have an id or tentative id.  Can be quite technical.  Some learning curve on how to navigate the site.&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|111&lt;br /&gt;
|222&lt;br /&gt;
|3333&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|111&lt;br /&gt;
|222&lt;br /&gt;
|3333&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-----------end of table---------------------&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Mushroom]]&lt;/div&gt;</summary>
		<author><name>Russ hensel</name></author>
		
	</entry>
	<entry>
		<id>http://www.opencircuits.com/index.php?title=Mushroom_Resources&amp;diff=88287</id>
		<title>Mushroom Resources</title>
		<link rel="alternate" type="text/html" href="http://www.opencircuits.com/index.php?title=Mushroom_Resources&amp;diff=88287"/>
		<updated>2022-10-12T16:47:06Z</updated>

		<summary type="html">&lt;p&gt;Russ hensel: Created page with &amp;quot; == BoostC Wiki ==  {| class=&amp;quot;wikitable&amp;quot; |-valign=&amp;quot;top&amp;quot;	 |What |Where |Comment &amp;lt;!--------------------------------&amp;gt; |-valign=&amp;quot;Use C for PIC Programming!top&amp;quot; |BoostC tiny...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== BoostC Wiki ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;	&lt;br /&gt;
|What&lt;br /&gt;
|Where&lt;br /&gt;
|Comment&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;[[Use C for PIC Programming!]]top&amp;quot;&lt;br /&gt;
|[[BoostC tiny Wiki]]&lt;br /&gt;
|An experiment as a possible wiki for BoostC, If it gets big it should find its own home somewhere else.&lt;br /&gt;
|[[Special:Export/BoostC tiny Wiki]]&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[111]]&lt;br /&gt;
|2222&lt;br /&gt;
|33333&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|111&lt;br /&gt;
|222&lt;br /&gt;
|3333&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[BoostC Forum Extracts 2007]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/BoostC Forum Extracts 2007]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[A C Program Header Example]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/---]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[BoostC Optimizations]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/---]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[BoostC Floating Point]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/BoostC Optimizations]]&lt;br /&gt;
&amp;lt;!--------------------------------&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/---]]&lt;br /&gt;
&amp;lt;!--------------------------------&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/---]]&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[BoostC Inline C Functions]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/---]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[BoostC Explaining BoostC.h]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/---]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[BoostC Wiki Help Needed]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/---]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--------------------------------&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[BoostC Explaining BoostC.h]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/---]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--------------------------------&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[BoostC Explaining BoostC.h]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/---]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-----------end of table---------------------&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Mushroom]]&lt;/div&gt;</summary>
		<author><name>Russ hensel</name></author>
		
	</entry>
	<entry>
		<id>http://www.opencircuits.com/index.php?title=Mushrrom_Documentation&amp;diff=88286</id>
		<title>Mushrrom Documentation</title>
		<link rel="alternate" type="text/html" href="http://www.opencircuits.com/index.php?title=Mushrrom_Documentation&amp;diff=88286"/>
		<updated>2022-10-12T16:44:09Z</updated>

		<summary type="html">&lt;p&gt;Russ hensel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Some ideas for mushroom sample documentation, mostly photos.&lt;br /&gt;
&lt;br /&gt;
*Use numbers to distinguish photos taken closely together in time.&lt;br /&gt;
*Photo from above&lt;br /&gt;
*Photo from below&lt;br /&gt;
*Photo of cap underside&lt;br /&gt;
*Photo of scratch and dent&lt;br /&gt;
*Photo of cap cross section&lt;br /&gt;
*Photo of stem cross section&lt;br /&gt;
*Photo of spore print&lt;br /&gt;
*Microphoto of spores&lt;br /&gt;
&lt;br /&gt;
*Narrative&lt;br /&gt;
&lt;br /&gt;
*Cap&lt;br /&gt;
*Cap below&lt;br /&gt;
*Stem (Style)&lt;br /&gt;
*&lt;br /&gt;
[[Category:Mushroom]]&lt;/div&gt;</summary>
		<author><name>Russ hensel</name></author>
		
	</entry>
	<entry>
		<id>http://www.opencircuits.com/index.php?title=Russ_hensel&amp;diff=88285</id>
		<title>Russ hensel</title>
		<link rel="alternate" type="text/html" href="http://www.opencircuits.com/index.php?title=Russ_hensel&amp;diff=88285"/>
		<updated>2022-10-12T16:42:55Z</updated>

		<summary type="html">&lt;p&gt;Russ hensel: /* My Editing Links */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= About Me =&lt;br /&gt;
I am a once upon a time high school teacher and database programmer/software engineer.  My hobbies now are gardening, Python programming, microcontrollers, Physics/Math, my cats and whatnot.  I have a nice wood shop, some metal working tools, and am learning to weld. I have a fairly large collection of scientific antiques, mostly microscopes, surveying instruments, and electronics test equipment.  Online my name is often russ_hensel, gives me a pretty unique id on Google.  I live in Dartmouth Ma.&lt;br /&gt;
&lt;br /&gt;
I am now on Facebook, but do not post much.&lt;br /&gt;
&lt;br /&gt;
I have posted a few Instructables, find me there at:  [http://www.instructables.com/member/russ_hensel/ Instructables member: russ_hensel]&lt;br /&gt;
&lt;br /&gt;
I have done a fair amount in Python.  I am now keeping my files at github:  https://github.com/russ-hensel  For some there may be info here, other not.&lt;br /&gt;
&lt;br /&gt;
You can reach me ( EMAIL ) at: no_spam_please_666 at comcast dot net (REFORMAT FOR A VALID EMAIL ADDRESS).  This address is just for first contact, I will respond with a better address after first contact.&lt;br /&gt;
&lt;br /&gt;
On this site I tend to write about the following topics&lt;br /&gt;
&lt;br /&gt;
* Electronics in general ( still doing it at home, but not writing about it much ).&lt;br /&gt;
* Microcontrollers, PIC in the past now the Arduino&lt;br /&gt;
* Python and my Python Projects&lt;br /&gt;
* Raspberry Pi&lt;br /&gt;
* 3D Printing and FreeCad ( bought first printer in 2017,  second one too )&lt;br /&gt;
* BoostC - now replaced by C++ in context of the Arduino&lt;br /&gt;
* Stepper Motors -- used in several of my projects. Usually in catagories with Arduino&lt;br /&gt;
&lt;br /&gt;
= About My Articles =&lt;br /&gt;
&lt;br /&gt;
I write about items as they interest me.  Too often I start on something and drop either the article or the project for short or long periods befor picking it up again.  Sorry.  I am open to email with questions, this may make me complete or improve some article.  If you are interested please let me know.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You may find that some pages say something like:&lt;br /&gt;
&lt;br /&gt;
This is an article started by Russ Hensel, see &amp;quot;http://www.opencircuits.com/index.php?title=Russ_hensel#About My Articles&amp;quot; '''About My Articles''' for a bit of info.  The page is only partly finished&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== My Editing Links ==&lt;br /&gt;
&lt;br /&gt;
These links are for me to navigate to pages I have done quite a bit of work on or want to look at frequently.  They are not for you, but you can use them if you want.  &lt;br /&gt;
&lt;br /&gt;
*[[Mushroom Resources]]&lt;br /&gt;
*[[Vivek]]&lt;br /&gt;
&lt;br /&gt;
*[[Russ Page Links]]&lt;br /&gt;
&lt;br /&gt;
*[[Russ Editing Links]]  probably dead&lt;br /&gt;
&lt;br /&gt;
= Articles posted here on Open Circuits =&lt;br /&gt;
&lt;br /&gt;
== Serial Communications and Microcontrollers ==&lt;br /&gt;
&lt;br /&gt;
*[[Python Smart Terminal]]  As of Sept 2016 still and active project.&lt;br /&gt;
*[http://www.opencircuits.com/Category:Microcontroller Category:Serial_Communications] Most of these have at least large input from me.  Some are general, some for the Arduino, and some for the PIC microcontroller.&lt;br /&gt;
*[http://www.opencircuits.com/Category:PIC Category:PIC] I have mostly converted to the Arduino, but before that I used the PIC, still think it is a nice micro controller, but building the boards and finding a coding environment.... is more of a pain than I want.&lt;br /&gt;
&lt;br /&gt;
*[http://www.opencircuits.com/Category:Arduino Category:Arduino] After my conversion from PIC.&lt;br /&gt;
&lt;br /&gt;
= Articles posted on Instructables =&lt;br /&gt;
&lt;br /&gt;
== Related to Python ==&lt;br /&gt;
&lt;br /&gt;
*'''[http://www.instructables.com/id/Python-Terminal-for-Cheap-Pi-Arduino-Connection/ Python Terminal for Cheap Pi Arduino Connection - All ]'''&lt;br /&gt;
*'''[http://www.instructables.com/id/Experiments-in-Advanced-Data-Logging-Using-Python-/ Experiments in Advanced Data Logging ( Using Python ) - All ]'''&lt;br /&gt;
*'''[http://www.instructables.com/id/Incredibility-Powerful-Resistance-Calculator/ Incredibility Powerful Resistance Calculator - All ]'''&lt;br /&gt;
*'''[http://www.instructables.com/id/Use-Sage-and-Sell-Your-Calculator-before-it-is-Too/ Use Sage and Sell Your Calculator before it is Too Late - All ]'''&lt;br /&gt;
*'''[http://www.instructables.com/id/Python-Autoexec-for-Your-Raspberry-Pi/ Python Autoexec for Your Raspberry Pi - All ]'''&lt;br /&gt;
*'''[http://www.instructables.com/id/ClipBoard-Communication-PC-Pi-With-Python/ ClipBoard Communication PC ↔ Pi With Python - All ]'''&lt;br /&gt;
*'''[http://www.instructables.com/id/Graph-Your-Solar-Power/ Graph Your Solar Power - All ]'''&lt;br /&gt;
*'''[http://www.instructables.com/id/Graph-Instructable-Views-with-Pypthon-Screen-Scrap/ Graph Instructable Views with Python Screen Scraping - All ]'''&lt;br /&gt;
*'''[http://www.instructables.com/id/Digital-Picture-Management-Eliminate-Weak-Photos-w/ Digital Picture Management - Del Weak Pics with Python - All ]'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Related to Arduino ==&lt;br /&gt;
&lt;br /&gt;
[[Pi Setup Nov 2016]]&lt;br /&gt;
&lt;br /&gt;
*'''[http://www.instructables.com/id/Backup-Your-Pi/ Backup Your Pi - All ]'''&lt;br /&gt;
*'''[http://www.instructables.com/id/Python-Autoexec-for-Your-Raspberry-Pi/ Python Autoexec for Your Raspberry Pi - All ]'''&lt;br /&gt;
*'''[http://www.instructables.com/id/ClipBoard-Communication-PC-Pi-With-Python/ ClipBoard Communication PC ↔ Pi With Python - All ]'''&lt;br /&gt;
&lt;br /&gt;
== Related to Electronics ==&lt;br /&gt;
&lt;br /&gt;
[[PiSetup]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*'''[http://www.instructables.com/id/Electronics-Building-Tips-in-21-Plus-Steps-/ Electronics Building Tips ( in 21 Plus Steps ) - All ]'''&lt;br /&gt;
*'''[http://www.instructables.com/id/More-Electronics-Building-Tips-in-21-plus-more-ste/ More Electronics Building Tips ( in 21 plus more steps ) - All ]'''&lt;br /&gt;
*'''[http://www.instructables.com/id/Comprehensive-Guide-to-Electronic-Breadboards-A-Me/ Comprehensive Guide to Electronic Breadboards: A Meta Instructable - All ]'''&lt;br /&gt;
*'''[http://www.instructables.com/id/Three-in-One-IC-Continuity-Tester-Signal-Generator/ Three in One: IC/ Continuity Tester, &amp;amp; Signal Generator - All ]'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
us double brackes for categories&lt;br /&gt;
&lt;br /&gt;
   category:Member Page&lt;br /&gt;
   category:salvage&lt;br /&gt;
   category:Test Instrument&lt;br /&gt;
   category:Serial Communications&lt;br /&gt;
   category:Microcontroller&lt;br /&gt;
   category:PIC&lt;br /&gt;
   category:Test Instrument&lt;br /&gt;
   category:Test Instrument&lt;br /&gt;
   [[category:BoostC]]&lt;/div&gt;</summary>
		<author><name>Russ hensel</name></author>
		
	</entry>
	<entry>
		<id>http://www.opencircuits.com/index.php?title=Chemical_Etchants&amp;diff=88251</id>
		<title>Chemical Etchants</title>
		<link rel="alternate" type="text/html" href="http://www.opencircuits.com/index.php?title=Chemical_Etchants&amp;diff=88251"/>
		<updated>2022-10-02T21:02:24Z</updated>

		<summary type="html">&lt;p&gt;Russ hensel: Reverted edits by 82.165.115.89 (talk) to last revision by DavidCary&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{stub}}&lt;br /&gt;
&lt;br /&gt;
Chemical etching is one step of some popular [[techniques | PCB fabrication techniques]].&lt;br /&gt;
&lt;br /&gt;
In this technique,&lt;br /&gt;
* one starts with a copper-clad board.&lt;br /&gt;
* one puts a mask over all the copper he want to keep. There are a variety of ways to do this -- see [[Toner Transfer]] and [[Photoetching]].&lt;br /&gt;
* one removes the parts he don't want to keep, by chemically etching away the copper.&lt;br /&gt;
* cleanup: wash off the board in the sink; carefully store or dispose of the acid.&lt;br /&gt;
&lt;br /&gt;
There are a lot of different chemical techniques for doing this, each with its own advantages and drawbacks.&lt;br /&gt;
&lt;br /&gt;
None of these chemicals is incredibly dangerous, but they can all be toxic or caustic, and should be treated with care. Eye protection and gloves are a very good idea. Before you start, make sure you know how dangerous each chemical is, and figure out what you will need to do if you spill it or get it on yourself. Washing with plenty of water is usually a good start. For some chemicals you may want to keep a neutralizing agent handy. An MSDS (Materials Safety Data Sheet) for the chemical will give you some basic information.&lt;br /&gt;
&lt;br /&gt;
== vinegar and salt ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.kobakant.at/DIY/?p=2575 How to get what you want: Salt and Vinegar Etching]&lt;br /&gt;
* [http://www.flickr.com/photos/jeanbaptisteparis/4831465916/ smt pcb with Salt and Vinegar]&lt;br /&gt;
* [http://www.instructables.com/id/The-Saltwater-etch-process/ The Saltwater etch process]&lt;br /&gt;
* [http://www.electro-tech-online.com/general-electronics-chat/33876-electro-etching-no-acid.html electro etching a PCB with vinegar, salt, and a 12 V power supply] (the copper etched off the PCB is plated on the anode?) -- however, other people claim that &amp;quot;You should not be using any acids (or basic 'acids') with your [electro] etcher at all. No FeCl no vinegar, etc &amp;quot;.[http://www.bladeforums.com/forums/showthread.php?t=671936]&lt;br /&gt;
&lt;br /&gt;
== Ferric Chloride ==&lt;br /&gt;
This is the most common hobbyist etchant. Ferric chloride, FeCl&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt;, is a brownish substance. It's usually sold in a bottle (dissolved in water, perhaps with a little acid or peroxide) or as a powder (which you have to dissolve in water).&lt;br /&gt;
&lt;br /&gt;
When in solution, ferric chloride is a ferric ion (Fe&amp;lt;sup&amp;gt;3+&amp;lt;/sup&amp;gt;) and a chloride ion (Cl&amp;lt;sup&amp;gt;-&amp;lt;/sup&amp;gt;). The ferric ion reacts with the metallic copper on the circuit board in a redox reaction, producing a ferrous ion (Fe&amp;lt;sup&amp;gt;2+&amp;lt;/sup&amp;gt;) and cuprous or cupric (Cu&amp;lt;sup&amp;gt;1+&amp;lt;/sup&amp;gt; or Cu&amp;lt;sup&amp;gt;2+&amp;lt;/sup&amp;gt;) copper. The chlorine is just along for the ride. The copper ion, unlike the metallic copper, is soluble, so it leaves the circuit board and goes into solution. The reaction products form a black sludge which settles to the bottom of the etching tank. After etching enough copper, all your Fe&amp;lt;sup&amp;gt;3+&amp;lt;/sup&amp;gt; is used up and your solution is full of Cu&amp;lt;sup&amp;gt;1+&amp;lt;/sup&amp;gt;, and you need to get more etchant.&lt;br /&gt;
&lt;br /&gt;
== Ammonium Persulfate ==&lt;br /&gt;
Expensive &amp;amp; hard to control and optimize the process parameters (such as specific gravity &amp;amp; pH value).&lt;br /&gt;
&lt;br /&gt;
== HydroChloric Acid / Hydrogen Peroxide ==&lt;br /&gt;
&lt;br /&gt;
Mixing about 1 part HCl (Which can be found at most hardware stores, also known as Muriatic Acid. Ask for concrete cleaner.) into 2 parts Hydrogen peroxide (normally used for cleaning cuts) you can make a fairly powerful etchant. Use gloves and don't breathe the fumes though. This will etch a 3&amp;quot;x5&amp;quot; board in less than 10 minutes. No need to heat it up. I usually like to drill a small hole through the board on a corner and thread a wire or nylon string through to help agitate / remove the board.&lt;br /&gt;
&lt;br /&gt;
When the board is done etching, the etchant will probably look like green kool-aid, from the copper content in it. This stuff is highly corrosive and will burn skin, which is why you should wear gloves. But it is easy to handle, and fairly easy to dispose of. the etchant is easily deactivated with baking soda. Pour enough baking soda into it slowly (to keep it from boiling and overflowing... remember what happens with baking soda/vinegar? ya...) until it is a solid mass, then leave it in the sun to dry. You should contact your local authorities to find out what you should do with it next. Whatever you do, DO NOT dump the stuff down the drain, it will eat through your pipes just like any of the other etchants.&lt;br /&gt;
&lt;br /&gt;
Alternatively, instead of disposing of the etchant, you can re-use it again and again. In fact, after etching a few boards with this solution, you will have successfully made [[Chemical Etchants#Acid Cupric Chloride|Acid Cupric Chloride]] (see below).&lt;br /&gt;
You can also find a detailed tutorial on etching at [http://robotplatform.com/howto/pcb%20etching/pcb_etching_1.html Muriatic Acid etching tutorial]&lt;br /&gt;
&lt;br /&gt;
== Sodium Persulfate ==&lt;br /&gt;
More environmentally friendly than ferric chloride.  Can monitor the etching as initially clear new etchant solution turns blue from the copper ions.&lt;br /&gt;
&lt;br /&gt;
== Acid Cupric Chloride ==&lt;br /&gt;
Dead simple etchant made from ordinary, store-bought chemicals (hydrochloric acid and hydrogen peroxide). Has the advantage that it can be regenerated by bubbling oxygen/air through it, or by adding more H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;. In addition, it doesn't get used up: the etchant bath simply grows with use (kind of like sourdough starter…)&lt;br /&gt;
The used etchant also makes a great algecide/pH reducer for your pool (and a whole lot cheaper than that stuff they sell at the pool store).&lt;br /&gt;
&lt;br /&gt;
What you need:&lt;br /&gt;
* 38% Hydrochloric Acid, HCl (available at finer hardware stores or pool supply stores as Muriatic Acid)&lt;br /&gt;
* 3% Hydrogen Peroxide, H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; (available from any drug store)&lt;br /&gt;
* Plastic or Glass Pans, Jars, and tongs (no metal)&lt;br /&gt;
Directions:&lt;br /&gt;
&lt;br /&gt;
# Mix your HCl and H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; 1:1 in a non-metalic container, making sure to add the acid slowly to the H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;. DO NOT ADD THE H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; TO THE ACID!!!&lt;br /&gt;
# After you've masked your board, dip it in the solution and constantly agitate. You should notice a dark green cloud start to come from the board almost immedately which quickly dissapears or turns lighter as it gets further from the surface of the board.&lt;br /&gt;
# Etching should take about 10min depending on the temperature and how well you agitated the etchant. When all of the copper is gone, dip in water to wash off any stray etchant and stop the reaction.&lt;br /&gt;
# When done etching, save used etchant in a non-metalic container and mark clearly its contents.&lt;br /&gt;
# If your etchant has become a dark, murky green color, add a little bit of H&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; or bubble air/O&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; through the solution to regenerate it back to a light, transparent green color.&lt;br /&gt;
See links at bottom for more information on the chemistry and some pictures of the process.&lt;br /&gt;
&lt;br /&gt;
== Disposal procedures ==&lt;br /&gt;
Flushing used etchant down the drain is a bad idea (and usually illegal) because copper ion is toxic. The usual recommended way to dispose of hobbyist amounts of etchant is to convert it to a solid somehow and dispose of the solid in accordance with local laws.&lt;br /&gt;
&lt;br /&gt;
== External Links == &lt;br /&gt;
&lt;br /&gt;
* [http://www.instructables.com/id/Sponge-Ferric-Chloride-Method-Etch-Circuit-Bo/ &amp;quot;Sponge + Ferric Chloride Method -- Etch PCBs in One Minute!&amp;quot;]&lt;br /&gt;
* [http://www.k9spud.com/wiki/PCB:Etchants Ferric Chloride vs. Ammonium Persulfate] and other etching chemicals.&lt;br /&gt;
* [http://members.optusnet.com.au/~eseychell/PCB/etching_CuCl/index.html Etching with Air Regenerated Acid Cupric Chloride] — an excellent in-depth page on acid cupric chloride etching by Adam Seychell.&lt;br /&gt;
* [http://www.esmonde-white.com/home/diversions/etching-a-copper-pcb Etching a Copper PCB with HCl and H2O2]&lt;br /&gt;
* [http://www.mgchemicals.com/ MG Chemicals] A possible source?&lt;br /&gt;
* [http://reprap.org/wiki/MakePCBInstructions RepRap wiki: Make PCB instructions]&lt;br /&gt;
&lt;br /&gt;
== Internal Links ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*[[Toner Transfer]]&lt;br /&gt;
*[[Techniques]]&lt;br /&gt;
*[[Eagle Links]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Techniques]]&lt;/div&gt;</summary>
		<author><name>Russ hensel</name></author>
		
	</entry>
	<entry>
		<id>http://www.opencircuits.com/index.php?title=Russ_Page_Links&amp;diff=88235</id>
		<title>Russ Page Links</title>
		<link rel="alternate" type="text/html" href="http://www.opencircuits.com/index.php?title=Russ_Page_Links&amp;diff=88235"/>
		<updated>2022-09-16T14:22:24Z</updated>

		<summary type="html">&lt;p&gt;Russ hensel: /* 2021 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= My Links =&lt;br /&gt;
&lt;br /&gt;
These links are for me to navigate to pages I have done quite a bit of work on or want to look at frequently.  They are not for you, but you can use them if you want.  &lt;br /&gt;
[[Special:CreateAccount]]&lt;br /&gt;
&lt;br /&gt;
You may find that some pages say something like:&lt;br /&gt;
&lt;br /&gt;
This is an article started by Russ Hensel, see &amp;quot;http://www.opencircuits.com/index.php?title=Russ_hensel#About My Articles&amp;quot; '''About My Articles''' for a bit of info.  The page is only partly finished&lt;br /&gt;
&lt;br /&gt;
== Sticky ==&lt;br /&gt;
&lt;br /&gt;
*[[Russ Page Template]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== 2022 ==&lt;br /&gt;
&lt;br /&gt;
*[[Mushrrom Documentation]]&lt;br /&gt;
&lt;br /&gt;
== 2021 ==&lt;br /&gt;
*[[Command Assistant Help File]]&lt;br /&gt;
&lt;br /&gt;
*[[Delete Duplicates Help File]]&lt;br /&gt;
&lt;br /&gt;
== New 2020 ==&lt;br /&gt;
&lt;br /&gt;
* smart_clipboard  [[Python Smart ClipBoard]]   https://github.com/russ-hensel/smart_clipboard/tree/master&lt;br /&gt;
* [[Python Button Dictionary Case Statement]]&lt;br /&gt;
* [[Twitter Analysis DB]]&lt;br /&gt;
* [[Copy and Paste Is Good]]&lt;br /&gt;
*[[Python Installation]]&lt;br /&gt;
&lt;br /&gt;
* [[‎Adoptions]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-----------&lt;br /&gt;
this cannot bee seen&lt;br /&gt;
&lt;br /&gt;
* [[Twitter Analysis DB]]* [[Twitter Analysis DB]]&lt;br /&gt;
* [[Twitter Analysis DB]]&lt;br /&gt;
* [[Twitter Analysis DB]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-------------&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== New 2019 ==&lt;br /&gt;
&lt;br /&gt;
*[[Python Desk Top Applications]]&lt;br /&gt;
*[[BullDog Notes]]&lt;br /&gt;
*[[Python Control of Smart Plugs]]&lt;br /&gt;
*[[My Python Coding Conventions]]&lt;br /&gt;
*[[Python Backup Program]]&lt;br /&gt;
*[[Python Easy DataBase Project]]&lt;br /&gt;
*[[My Linux Mint Install]]&lt;br /&gt;
&lt;br /&gt;
== New 2018 ==&lt;br /&gt;
&lt;br /&gt;
*[[Russ's Pi Recipie]]&lt;br /&gt;
*[[Raspbery Pi Mounting Platform and Bracket]]&lt;br /&gt;
&lt;br /&gt;
*[[Fastening Objects in 3D Printing]]&lt;br /&gt;
*[[Parametric 3D Printed Electronics Case/Enclosure]]&lt;br /&gt;
*[[Arduino/Raspberry Pi based Dancing Clock]]&lt;br /&gt;
*[[FreeCad Tips for Beginners]]&lt;br /&gt;
*[[Raspberry Pi Stretch - 2018 Tricks ]]&lt;br /&gt;
*[[No Tools Garden Hose Connect]]&lt;br /&gt;
*[[Smarter Arduino Programming - Tips and Tricks]] &lt;br /&gt;
*[[Arduino Socket]]&lt;br /&gt;
*[[Configuration Files For Python]]&lt;br /&gt;
*[[Cookbook of Raspberry Pi Commands]]&lt;br /&gt;
*[[Python Scheduling Application]]&lt;br /&gt;
*[[Setup Toga with Spyder]]&lt;br /&gt;
*[[Almost Orphans]]&lt;br /&gt;
*[[new page]]&lt;br /&gt;
&lt;br /&gt;
== New 2017 ==&lt;br /&gt;
*[[200 Dollar 3D Printer Club]]&lt;br /&gt;
&lt;br /&gt;
*[[3D Printer Kit]]&lt;br /&gt;
*[[Two Axis Stepper Controller]]&lt;br /&gt;
*[[3D Printed Mechanisms]]&lt;br /&gt;
*[[FreeCad Gear Box]]&lt;br /&gt;
*[[Install Kivy]]&lt;br /&gt;
*[[Russ Python Tips and Techniques]]&lt;br /&gt;
*[[Russ Page Template]]&lt;br /&gt;
&lt;br /&gt;
*[[Python Smart Terminal]]&lt;br /&gt;
*[[Blinking Blues]]&lt;br /&gt;
&lt;br /&gt;
*[[Arduino Kit - Cheap]]&lt;br /&gt;
&lt;br /&gt;
*[[Blinking Blues]]&lt;br /&gt;
&lt;br /&gt;
== New 2016 ==&lt;br /&gt;
&lt;br /&gt;
*[[Russ Page Template]]&lt;br /&gt;
&lt;br /&gt;
*[[Python Smart Terminal]]&lt;br /&gt;
&lt;br /&gt;
*[https://github.com/russ-hensel My profile at github]&lt;br /&gt;
*[[Instrumentino Notes]]&lt;br /&gt;
&lt;br /&gt;
*[[Pi Setup Nov 2016]]&lt;br /&gt;
*[[Russ Wiki Links]]  delete it ??&lt;br /&gt;
&lt;br /&gt;
*[[FreeCad Notes]]&lt;br /&gt;
&lt;br /&gt;
*[[Blinking Blues]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== SCIL and Makerspace ==&lt;br /&gt;
&lt;br /&gt;
*[[SCIL at OpenCircuits]]&lt;br /&gt;
*[[Maker Space SC]]&lt;br /&gt;
*[[Maker Space Monitor]]&lt;br /&gt;
*[[Python Lists]]&lt;br /&gt;
&lt;br /&gt;
== Misc ==&lt;br /&gt;
&lt;br /&gt;
* [[Python Resources for Math 499]] --&amp;gt; [[Special:Export/Python Resources for Math 499]]&lt;br /&gt;
* [[499 Projects]] --&amp;gt; [[Special:Export/499 Projects]]&lt;br /&gt;
* [[Python Installation On Your System]] --&amp;gt; [[Special:Export/Python Installation On Your System]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*[[R Pi Notes]] &lt;br /&gt;
*[[Running a DreamHost Wiki]] &lt;br /&gt;
*[[SageMath]] &lt;br /&gt;
*[[Python]] &lt;br /&gt;
*[[Electronics Software with SageMath]] &lt;br /&gt;
*[[Russ Page Template]] &lt;br /&gt;
*[[The EggBot]]&lt;br /&gt;
*[[Buying an Arduino for the Robotics Club]]&lt;br /&gt;
*[[LTSpice Links]]&lt;br /&gt;
*[[Arduino Theremin]]&lt;br /&gt;
*[[Arduino Command Interpreter]]&lt;br /&gt;
*[[Arduino Laser Cannon]] &lt;br /&gt;
*[[Solid State Drive Issues]]&lt;br /&gt;
*[[Orphans To Link]]&lt;br /&gt;
&lt;br /&gt;
*[[Real Time Clock -- Keeping Time with a Microcontroller]]&lt;br /&gt;
&lt;br /&gt;
*[[All About Salvage]]&lt;br /&gt;
*[[Projects From Salvage]]&lt;br /&gt;
&lt;br /&gt;
*[[Debouncing Microcontroller Inputs]]&lt;br /&gt;
&lt;br /&gt;
*[[Spam Attack 2011]]&lt;br /&gt;
&lt;br /&gt;
== BoostC Wiki ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;	&lt;br /&gt;
|What&lt;br /&gt;
|Where&lt;br /&gt;
|Posted&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;[[Use C for PIC Programming!]]top&amp;quot;&lt;br /&gt;
|[[BoostC tiny Wiki]]&lt;br /&gt;
|An experiment as a possible wiki for BoostC, If it gets big it should find its own home somewhere else.&lt;br /&gt;
|[[Special:Export/BoostC tiny Wiki]]&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[Playing With PIC Pack]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/---]]&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[BoostC from the Fourm]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/BoostC from the Fourm]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[BoostC Forum Extracts 2007]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/BoostC Forum Extracts 2007]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[A C Program Header Example]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/---]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[BoostC Optimizations]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/---]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[BoostC Floating Point]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/BoostC Optimizations]]&lt;br /&gt;
&amp;lt;!--------------------------------&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/---]]&lt;br /&gt;
&amp;lt;!--------------------------------&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/---]]&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[BoostC Inline C Functions]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/---]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[BoostC Explaining BoostC.h]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/---]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[BoostC Wiki Help Needed]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/---]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--------------------------------&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[BoostC Explaining BoostC.h]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/---]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--------------------------------&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[BoostC Explaining BoostC.h]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/---]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-----------end of table---------------------&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Example Code In Projects ==&lt;br /&gt;
&lt;br /&gt;
These examples are imbeded in projects and may be easier or not to extract the fragment you want.  On the otherhand these suckers should have been compiled and tested..... &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;	&lt;br /&gt;
|Code Does What&lt;br /&gt;
|Where&lt;br /&gt;
|Comment&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;[[Use C for PIC Programming!]]top&amp;quot;&lt;br /&gt;
|Serial Comm. RS232&lt;br /&gt;
|[[Serial Communications (RS232) in BoostC]] and the older [[Serial Communications Library -- BoostC and 16F877A]] and [[PIC based Stepper Motor Dancing Analog Clock]]&lt;br /&gt;
|Not using BoostC Library ( sorry ).  Hardware based.&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;[[Use C for PIC Programming!]]top&amp;quot;&lt;br /&gt;
|Simple Command Interperter&lt;br /&gt;
|[[PIC based Stepper Motor Dancing Analog Clock]]&lt;br /&gt;
|Assumes a PC terminal program or something similar.  Single letter commands with numeric parameters.  Caps insensitive.  Supports backspace.&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|Stepper Motor Drive&lt;br /&gt;
|[[Stepper Motor Tester]]&lt;br /&gt;
|Half step, forward reverse, variable speed. &lt;br /&gt;
&amp;lt;!--------------------------------&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|Stepper Motor Drive&lt;br /&gt;
|[[Stepper Motor Demonstration and Tester]]&lt;br /&gt;
|Half step, forward reverse, variable speed. For PIC and Arduino&lt;br /&gt;
&amp;lt;!--------------------------------&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|what&lt;br /&gt;
|[[]]&lt;br /&gt;
|Comment&lt;br /&gt;
&amp;lt;!--------------------------------&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|what&lt;br /&gt;
|[[]]&lt;br /&gt;
|Commen&lt;br /&gt;
&amp;lt;!--------------------------------&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|what&lt;br /&gt;
|[[]]&lt;br /&gt;
|Comment&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-----------end of table---------------------&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Export ===&lt;br /&gt;
&lt;br /&gt;
[[Special:Export/Basic Circuits and Circuit Building Blocks]]&lt;br /&gt;
&lt;br /&gt;
[[Special:Export/Oscilloscope]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Special:Export/Techniques ‎]]&lt;br /&gt;
&lt;br /&gt;
[[Special:Export/]]&lt;br /&gt;
&lt;br /&gt;
[[Special:Export/]]&lt;br /&gt;
&lt;br /&gt;
[[Special:Export/]]&lt;br /&gt;
&lt;br /&gt;
[[Special:Export/]]&lt;br /&gt;
&lt;br /&gt;
[[Special:Export/]]&lt;br /&gt;
&lt;br /&gt;
[[Special:Export/BitWacker PIC and Other Microcontroller to Java Communications]]&lt;br /&gt;
[[Special:Export/BitWacker PIC and Other Microcontroller to Java Communications]]&lt;br /&gt;
&lt;br /&gt;
=== PIC Related ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*[[Index of sample code pages]]&lt;br /&gt;
*[[A Note on My BoostC Projects and Libraries]]&lt;br /&gt;
*[[Using I2C Memory]]&lt;br /&gt;
*[[The C Preprocessor and #Define]]&lt;br /&gt;
*[[Kit Suppliers]]&lt;br /&gt;
*[[Microcontroller User Interfaces]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;	&lt;br /&gt;
|What&lt;br /&gt;
|Where&lt;br /&gt;
|Other&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[A Really Basic Guide to the PIC Microprocessor and BoostC]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/A Really Basic Guide to the PIC Microprocessor and BoostC]]&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[PIC Programmers, In Circuit Programming and BootLoaders]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/PIC Programmers, In Circuit Programming and BootLoaders]]&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[A Note on My BoostC Projects and Libraries]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/A Really Basic Guide to the PIC Microprocessor and BoostC]]&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[BitWacker PIC USB Development Board]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/BitWacker PIC USB Development Board]]&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[BitWacker Java Communications]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/BitWacker Java Communications]]&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[BitWacker PIC and Other Microcontroller to Java Communications]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/BitWacker PIC and Other Microcontroller to Java Communications]]&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[BitWacker Command GUI]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/BitWacker Command GUI]]&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[EL Wire]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/EL Wire]]&lt;br /&gt;
&amp;lt;!--------------------------------&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[]]&lt;br /&gt;
|in process&lt;br /&gt;
|[[Special:Export/ ]]&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[Experimenting with IR Remotes using a PIC running BoostC Project]]&lt;br /&gt;
|in process&lt;br /&gt;
|[[Special:Export/Experimenting with IR Remotes using a PIC running BoostC Project]]&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[Experimenting with Stepper Motors as Rotary Encoders using a PIC running BoostC Project]]&lt;br /&gt;
|not linked in yet in process&lt;br /&gt;
|[[Special:Export/Experimenting with Stepper Motors as Rotary Encoders using a PIC running BoostC Project]]&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[Graphical Data Logger]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/Graphical Data Logger]]&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[Making Your Own Microcontroller Serial Communications Application]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/Making Your Own Microcontroller Serial Communications Application]]&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[MC_RS232_Comm]]                   &lt;br /&gt;
|                      &lt;br /&gt;
|[[Special:Export/MC_RS232_Comm]]&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[Microcontroller Serial Communications Articles]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/Microcontroller Serial Communications Articles]]&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[PIC based Stepper Motor Dancing Analog Clock]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/PIC based Stepper Motor Dancing Analog Clock]]&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[PIC Links]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/PIC Links]]&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[PointLess LED Array]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/PointLess LED Array]]&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[RS232/USB Probe]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/RS232/USB Probe]]&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[Russ_Hensel's EL Wire Project]]&lt;br /&gt;
|&lt;br /&gt;
|[[russ_hensel]]&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[Smart Battery Charger with Graphical Data Logger]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[Semiconductor Analyzer Review]]&lt;br /&gt;
|&lt;br /&gt;
|Semiconductor Analyzer Review from M Cubed Electronix, Inc.&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[Stepper Motor Tester]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/Stepper Motor Tester]]&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[DraftDocSerialComm]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/---]]&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[Serial Communications Library -- BoostC and 16F877A]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/Serial Communications Library -- BoostC and 16F877A]]&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[USB Bit Whacker]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/USB Bit Whacker]]&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[Use C for PIC Programming!]]&lt;br /&gt;
|Use C for PIC Programming!&lt;br /&gt;
|[[Special:Export/Use C for PIC Programming!]]&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[A a Tutorial on PIC interrupts using BoostC including Example Programs]] &lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/A Tutorial on PIC interrupts using BoostC including Example Programs]]&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[PIC based Power Use Timer]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/PIC based Power Use Timer]]&lt;br /&gt;
&amp;lt;!--------------------------------&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/---]]&lt;br /&gt;
&amp;lt;!--------------------------------&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/---]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Not PIC ==&lt;br /&gt;
&lt;br /&gt;
Some pages I have done quite a bit of work on.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;	&lt;br /&gt;
|What&lt;br /&gt;
|Where&lt;br /&gt;
|Posted&lt;br /&gt;
&amp;lt;!--------------------------------&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[Arduino Links]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/Arduino Links]]&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[Tips on Using Open Circuits]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/Tips on Using Open Circuits]]&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[AVR Links]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/AVR Links]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--------------------------------&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[Blank Table]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/BitWacker PIC and Other Microcontroller to Java Communications]]&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[BitWacker Command GUI]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/BitWacker Command GUI]]&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[Bargains]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/Bargains]]&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[Basic Circuits and Circuit Building Blocks]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/Eagle Links]]&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[Chemical Etchants]]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[Eagle Links]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/Eagle Links]]&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[EL Wire]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/EL Wire]]&lt;br /&gt;
&amp;lt;!--------------------------------&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[Experimenting with Stepper Motors as Rotary Encoders using a PIC running BoostC Project]]&lt;br /&gt;
|not linked in yet in process&lt;br /&gt;
|[[LTSpice Links]][[Special:Export/---]]&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[Graphical Data Logger]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/Graphical Data Logger]]&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[hardware tool]]s&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/hardware tool]]&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[Making Your Own Microcontroller Serial Communications Application]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/Making Your Own Microcontroller Serial Communications Application]]&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[MC_RS232_Comm]]                   &lt;br /&gt;
|                      &lt;br /&gt;
|[[Special:Export/MC_RS232_Comm]]&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[Microcontrollers]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/Microcontrollers]]&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[Meta Open Source]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/Meta Open Source]]&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[How I Do Eagle]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/How I Do Eagle]]&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[Microcontroller Serial Communications Articles]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/Microcontroller Serial Communications Articles]]&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[PC Serial Communications Programs]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/PC Serial Communications Programs]]&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[Obscure Eagle]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/---]]&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[Other Projects]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/Other Projects]]&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[OpAmp Links]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/OpAmp Links]]&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[Project DYI Whiteboard]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/---]]&lt;br /&gt;
&amp;lt;!--------------------------------&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[RS232/USB Probe]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/RS232/USB Probe]]&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[Russ_Hensel's EL Wire Project]]&lt;br /&gt;
|&lt;br /&gt;
|[[russ_hensel]]&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[Salvage Parts and Sources]]&lt;br /&gt;
|For ideas on different ways to use some parts see [[Salvage Ideas]]. You may also find [[Free From Salvage]] useful.&lt;br /&gt;
|[[Special:Export/Salvage Parts and Sources]]&lt;br /&gt;
&amp;lt;!--------------------------------&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[Salvage Ideas]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/Salvage Ideas]]&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[Salvage Topics]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/---]]&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[Salvage Challenges]]&lt;br /&gt;
|Parts that should be Useful if we could Just figure out How&lt;br /&gt;
|[[Special:Export/---]]&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[Free From Salvage]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/---]]&lt;br /&gt;
&amp;lt;!--------------------------------&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[Solderless protoboard]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/Solderless protoboard]]&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[Supplier Quick Reference]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Supplier Quick Reference]]&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[Tutorials]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/Tutorials]]&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[Toner Transfer]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/Toner Transfer]]&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[DraftDocSerialComm]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/---]]&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[USB Bit Whacker]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/USB Bit Whacker]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[Westport High School Page]]&lt;br /&gt;
|A page for the Westport High School Robotics Club&lt;br /&gt;
|[[Special:Export/---]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[Tools and Techniques]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/---]]&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[Microcontrollers for Beginners]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/---]]&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|[[New Project]]&lt;br /&gt;
|&lt;br /&gt;
|[[Special:Export/---]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Printed Circuit Etchants]] no use instead:  ???&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[How Should We Deal With Spam]]&lt;br /&gt;
&lt;br /&gt;
=== Image Example === &lt;br /&gt;
&lt;br /&gt;
[[Image:RS232ProbeMainxx.png | Screen Shot ]]&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
us double brackes for categories&lt;br /&gt;
&lt;br /&gt;
   category:Member Page&lt;br /&gt;
   category:salvage&lt;br /&gt;
   category:Test Instrument&lt;br /&gt;
   category:Serial Communications&lt;br /&gt;
   category:Microcontroller&lt;br /&gt;
   category:PIC&lt;br /&gt;
   category:Test Instrument&lt;br /&gt;
   category:Test Instrument&lt;br /&gt;
   [[category:BoostC]]&lt;/div&gt;</summary>
		<author><name>Russ hensel</name></author>
		
	</entry>
	<entry>
		<id>http://www.opencircuits.com/index.php?title=Python_Smart_Terminal&amp;diff=88226</id>
		<title>Python Smart Terminal</title>
		<link rel="alternate" type="text/html" href="http://www.opencircuits.com/index.php?title=Python_Smart_Terminal&amp;diff=88226"/>
		<updated>2022-08-29T15:59:28Z</updated>

		<summary type="html">&lt;p&gt;Russ hensel: /* My Environment/Your Environment */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Why this Terminal =&lt;br /&gt;
&lt;br /&gt;
This terminal has a variety of uses, most are focused on interaction with&lt;br /&gt;
micro controller projects where ASCII data is exchanged, typically with messages&lt;br /&gt;
terminated with a newline or carriage return ( typical for most Arduino projects).&lt;br /&gt;
&lt;br /&gt;
It is also intended for those with a minimal understanding of Python ( required skill&lt;br /&gt;
ranges from the vary basic to familiarity with multi-threaded applications ).&lt;br /&gt;
&lt;br /&gt;
Its repository includes several examples of projects where the interaction is&lt;br /&gt;
either with a PC ( windows, mac, or Linux ) or a raspberry pi ( Linux ).&lt;br /&gt;
&lt;br /&gt;
Applications may be set up so control of the Arduino is manual, or entirely&lt;br /&gt;
automated.&lt;br /&gt;
&lt;br /&gt;
If this is the case there are many ways to use it:&lt;br /&gt;
&lt;br /&gt;
* Base Case&lt;br /&gt;
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.&lt;br /&gt;
 &lt;br /&gt;
* Base Case Plus&lt;br /&gt;
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 &amp;quot;documents&amp;quot; their use.  This can be very nice for debugging or manually controlled projects.&lt;br /&gt;
&lt;br /&gt;
* Automatic modes&lt;br /&gt;
The automatic mode implements the &amp;quot;Base Case Plus&amp;quot; but there is additional code running in another thread that makes the entire operation automatic and is intended for projects that just &amp;quot;run&amp;quot;.  In my case all these projects are used with a raspberry pi plus Arduino.  This typically gives the project:&lt;br /&gt;
** high speed response in the Arduino code ( micro second )&lt;br /&gt;
** internet access wifi and cat5&lt;br /&gt;
** bluetooth support&lt;br /&gt;
** Python and other high level program support&lt;br /&gt;
** Graphical interface support via remote terminal to a raspberry pi.&lt;br /&gt;
** HTTP server support&lt;br /&gt;
** Email access&lt;br /&gt;
** Remote terminal support -- either Desktop GUI or ssh terminal&lt;br /&gt;
&lt;br /&gt;
I have example code for these applications included in the repository that I have completed as projects of my own.&lt;br /&gt;
&lt;br /&gt;
= Goal =&lt;br /&gt;
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]]&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
This program is designed to be:&lt;br /&gt;
*Easily configurable through a configuration file parameters.py&lt;br /&gt;
*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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
See the graphical user interface here ( with screen shot ): [[Smart Terminal GUI]]&lt;br /&gt;
&lt;br /&gt;
This application is also part of a family of applications see the category below: Python Projects.&lt;br /&gt;
&lt;br /&gt;
This is an article started by Russ Hensel, see &amp;quot;http://www.opencircuits.com/index.php?title=Russ_hensel#About My Articles&amp;quot; About My Articles for a bit of info.&lt;br /&gt;
&lt;br /&gt;
'''Who should use this program and How:'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;	&lt;br /&gt;
|Who&lt;br /&gt;
|What&lt;br /&gt;
|How&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|Person with little programming experience, no interest in Python.  Looking for download and install.&lt;br /&gt;
|Probably should use another program.&lt;br /&gt;
|Not well suited to use this, I do not plan to fix this.&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|Programming microcontrollers in text based language, willing to install or has Python installed.&lt;br /&gt;
|Run the basic program.  Customize in fairly minor ways.&lt;br /&gt;
|Edit the parameter file to configure the terminal.  Could use processing extensions written by others.&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|Modest Python experience&lt;br /&gt;
|Modify all over the place, monitor equipment, save data to database ......&lt;br /&gt;
|Program should be well documented with an API, sample extensions.  Code changes localized ( now ) to one class plus the parameter file.&lt;br /&gt;
&amp;lt;!--------------------------------&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|ddd&lt;br /&gt;
|eee&lt;br /&gt;
|fff&lt;br /&gt;
&amp;lt;!--------------------------------&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;!--------------------------------&lt;br /&gt;
&amp;lt;!--------------------------------&lt;br /&gt;
&amp;lt;!--------------------------------&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= More on What and Why =&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 can 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.  &lt;br /&gt;
&lt;br /&gt;
Currently the terminal waits for a carriage return ( or line fead ) 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. &lt;br /&gt;
&lt;br /&gt;
So what are the features?&lt;br /&gt;
&lt;br /&gt;
* Free open source&lt;br /&gt;
* Runs across OSs Linux ( inc '''Raspberry Pi''' ), Mac or Windows &lt;br /&gt;
* Python&lt;br /&gt;
* &amp;quot;RS232&amp;quot; all standard baud rates etc.&lt;br /&gt;
* Easily adjusted serial communications parameters&lt;br /&gt;
* Multiple, preloaded with data entry fields.&lt;br /&gt;
* Clear ( erase ) receive area for removal of clutter.&lt;br /&gt;
* Copy all or part of receive area.&lt;br /&gt;
* Programmable&lt;br /&gt;
* I have extensions to work with specific arduino programs.  These:  Run a clock, Monitor a Green House, Monitor a root cellar, Monitor a Well.&lt;br /&gt;
* Database Interface ( now MYSQL can connect across the network )&lt;br /&gt;
* Email interface.&lt;br /&gt;
* Easily Modified or Replaceable GUI&lt;br /&gt;
* Parameter file for wide range of modifications of program behavior.&lt;br /&gt;
* Easy to run multiple instances with different parameters.&lt;br /&gt;
* Uses standard Python logging class.&lt;br /&gt;
* Includes some advanced data logging features in addition to database data logging.&lt;br /&gt;
* For more on the features see [[SmartTerminal Features]]&lt;br /&gt;
&lt;br /&gt;
Limits:&lt;br /&gt;
&lt;br /&gt;
* Polls the comm port at 10 to 100 hz.  So full lines ( ending with carriage return &amp;lt;cr&amp;gt; ) cannot come in too fast.  This is theory I have not pushed the terminal.&lt;br /&gt;
* One instance of the program per com port at a time, but easy to run multiple instances.&lt;br /&gt;
&lt;br /&gt;
What would you like to see in the program or documentation? Email me.&lt;br /&gt;
&lt;br /&gt;
A much earlier version of this terminal was described in my instructable [[http://www.instructables.com/id/Python-Terminal-for-Cheap-Pi-Arduino-Connection/ Python Terminal for Cheap Pi Arduino Connection]]  It may have some information that is useful, but the program has grown a lot since then.&lt;br /&gt;
&lt;br /&gt;
= Installation =&lt;br /&gt;
This program is intended for those who at least occasionally develop in Python.  I expect that they already run some things in Python and will just add this as an additional project.  There is no install program you just download the files, place where you keep your projects and run.  A bit more later in this section.&lt;br /&gt;
&lt;br /&gt;
== My Environment/Your Environment ==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
  &lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
There is an informal requirements.txt in the repository that may be helpful.&lt;br /&gt;
&lt;br /&gt;
== Download ==&lt;br /&gt;
&lt;br /&gt;
Code at GitHub, see [[https://github.com/russ-hensel/python_smart_terminal Code at GitHub]] ( it is Python and you can run directly from the source ) Email me if you have issues ( use this link [[User:Russ_hensel]] ).&lt;br /&gt;
You will get a zip file, unzip it and you should get:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
     .... whatever --|&lt;br /&gt;
                     |&lt;br /&gt;
                     |-- smart_terminal --| -&amp;gt; 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 )&lt;br /&gt;
                                          |    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&lt;br /&gt;
                                          |    get your own log files ... all typically named xxx.py_log &lt;br /&gt;
                                          | -- images -&amp;gt; image files, mostly screen shots, icons... or what ever, not important for the code.&lt;br /&gt;
                                          | -- sounds -&amp;gt; wav files used for the deer me extension, my attempt to scare deer.&lt;br /&gt;
                                          | -- wiki_etc -&amp;gt; various files documenting program, including at least some of the material from this wiki &lt;br /&gt;
&lt;br /&gt;
Put them in your system making &amp;quot;....whatever&amp;quot; anything convenient for your Python ( that is move the files to where you keep your Python source ).  &lt;br /&gt;
&lt;br /&gt;
Note that there may be a certain amount of left over, dead code, in the directory I am cleaning out bit by bit, someday it may be nice and neat.  For now if you want to tinker look at the design info below first.&lt;br /&gt;
&lt;br /&gt;
== Run ==&lt;br /&gt;
&lt;br /&gt;
Run it until it stops complaining about dependencies ( in the console ), after that ( and perhaps even before ) the GUI should come up.  You are installed.&lt;br /&gt;
&lt;br /&gt;
I have run the program on both Windows 10 and Rasperian on a RPi.  It should work in most OS's.  Let me know about issues.&lt;br /&gt;
&lt;br /&gt;
Some parts of the program think that mySql is available.  It should run fine without it ( there will be a message or two in the console ), untill you try to use the database then it is not so gracious.  Straight ahead use as a terminal does not use the database.&lt;br /&gt;
&lt;br /&gt;
= Configure to Run =&lt;br /&gt;
&lt;br /&gt;
== Basic ==&lt;br /&gt;
&lt;br /&gt;
Basic configuration of comm parameters like port, baud rate .... is all done in a file called parameters.py.  It seemed easier to simply use a Python text file instead of some other format like an ini file.  Pretty much all the file does is set instance variables in itself.  It is used by the program controller ( smart_terminal.SmartTerminal ) to create an instance of Parameters and then the values can be used.  Save the original ( parameters.py, maybe I will include a backup maybe not ) in case you mess it up too much.&lt;br /&gt;
&lt;br /&gt;
I have made yet another pass to clean up and comment the code in parameters.  Let me know if you have issues.  You should understand some values are being phased out but may still have some implementation and some may be coming in and have little or no implementation.  The comments should let you identify these situations.&lt;br /&gt;
&lt;br /&gt;
Parameters starts out with some &amp;quot;meta&amp;quot; parameters.  These are defined early in the creation of the objects and may effect other values.  In any case you can always define a value twice, the last one always wins.  The most important meta parameter is mode, you should not change it from self.mode = &amp;quot;Terminal&amp;quot; unless you understand the implications or do not mind going on a ride.&lt;br /&gt;
&lt;br /&gt;
All the com port values are defined in pretty much one place, find it ( say search on &amp;quot;baud&amp;quot; ) an change it to what you need.&lt;br /&gt;
&lt;br /&gt;
== Command Line Arguments ==&lt;br /&gt;
&lt;br /&gt;
If you run with the command line parameters=paramaters_b then after the regular parameters file runs, then the system looks for parameters_b.py and uses that to override values that you might want to tweak ( or completely redo.  There are two examples in the directory follow the pattern in them and you should be fine ).&lt;br /&gt;
&lt;br /&gt;
This can be especially useful if you want to run two copies connected to different ports and possibly running in different modes.  In this case it is also nice to change ( its in parameters ) the '''icon''' and '''color''' for each instance of the program.  You can write or use the little bat file to start them ( although this leaves a dos console hanging around )  Command line arguments can also be placed in shortcuts.  In either case they may take some tweaking to run in/from your file locations.&lt;br /&gt;
&lt;br /&gt;
The above mostly applies to Windows, but the program run fine with Linux ( including the Raspberry Pi ) and I suppose the Mac.  Of course the .bat file and shortcuts will not work, but similar facilities exist in the other OSs.&lt;br /&gt;
&lt;br /&gt;
== Running It ==&lt;br /&gt;
&lt;br /&gt;
When you run it it should open a windows a lot like the picture [[Smart Terminal GUI]].  Errors may show up in your Python console or the log file ( look in parameters.py for the name of the log file, typically self.pylogging_fn      = &amp;quot;smart_terminal.py_log&amp;quot; ).  The most likely errors will point to missing Python modules like pyserial.  You should install with pip ( or conda if using Spyder ).  Let me know how it goes.&lt;br /&gt;
&lt;br /&gt;
Normally the terminal does not open the com port until you press the &amp;lt;Open&amp;gt; button.  The parameters are displayed in the GUI if you do not like them ( for example when you press the &amp;lt;open&amp;gt; button the port open status changes to &amp;quot;open failed&amp;quot;, not the desired &amp;quot;open&amp;quot; ) you can shutdown, edit parameters.py and restart.  There is a simpler way.&lt;br /&gt;
&lt;br /&gt;
*First configure parameters.py to know the name of a text editor on your system. For mine this is one of: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
self.ex_editor   =  r&amp;quot;leafpad&amp;quot;    # linux and pi&lt;br /&gt;
&lt;br /&gt;
self.ex_editor   =  r&amp;quot;D:\apps\Notepad++\notepad++.exe&amp;quot; # for windows.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is set up to auto switch between the two os to make copying the whole program back and forth between the windows and linux a bit easier.&lt;br /&gt;
&lt;br /&gt;
*Now when you run it the button &amp;lt;Edit Parms&amp;gt; should let you edit the parameters.py file.  Edit it and save.&lt;br /&gt;
&lt;br /&gt;
*Hit the &amp;lt;Restart&amp;gt; button.  In a flash the program should restart with the new parameters.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
..... more here soon ......&lt;br /&gt;
&lt;br /&gt;
= Notes on the Code =&lt;br /&gt;
&lt;br /&gt;
In some ways I am proud of the code, it was sometimes a slog, and I had to learn a lot of Python to get it going.  On the other hand it kind of sucks, it has lots of dead code, ass backwards was of doing things, poor naming...... There is also a good bit of code on features that I am adding, but that is unfinished.  Until I loose interest in it it will probably improve.  However, adding features is more part of the life of a programmer than polishing old features; making something better that seems good enough is not always the priority it should be.  If you do not like it, mostly keep it to yourself unless it is accompanied by an offer to improve it.  I do not need ideas, I need time.  That said if you think you have a helpful comment contact me, my page will tell you how: [[User:Russ_hensel]]&lt;br /&gt;
&lt;br /&gt;
= Design =&lt;br /&gt;
&lt;br /&gt;
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 ).&lt;br /&gt;
&lt;br /&gt;
see: [[Python Smart Terminal Technical]]&lt;br /&gt;
&lt;br /&gt;
= Customizing/Extending =&lt;br /&gt;
&lt;br /&gt;
Simple customization may be done simply by changing the parameter file, see: [[Smart Terminal Parameter Examples]]  If you want to add code that can be done by messing with any of the source code ( not recommended ) or by programming an extension, see:  [[Python Smart Terminal Technical]] and [[Writing You Own Extensions to SmartTerminal]]&lt;br /&gt;
&lt;br /&gt;
= Additional Info =&lt;br /&gt;
&lt;br /&gt;
*Click on the category smart terminal below ( and perhaps the others as well )&lt;br /&gt;
*For a graphing ( plotting ) application that is a companion to this see [[Python Smart Terminal Graph]]&lt;br /&gt;
*[[Writing You Own Extensions to SmartTerminal]]&lt;br /&gt;
*[[Debugging the Smart Terminal]] &lt;br /&gt;
*[[Smart Terminal as Smart Data Logger]]  obsolete, gone, may come back.&lt;br /&gt;
*[[Smart Terminal GUI]]&lt;br /&gt;
*[[GreenHouse Monitor Program]]&lt;br /&gt;
*[[Smart Terminal Parameter Examples]]&lt;br /&gt;
*[[Python Desk Top Applications]]&lt;br /&gt;
*[ https://github.com/russ-hensel/python_smart_terminal python_smart_terminal at git hub]&lt;br /&gt;
*[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.&lt;br /&gt;
&lt;br /&gt;
[[Category:Python Projects]] [[category:Python]]  [[Category:Arduino/RaspberryPi]] [[Category:SmartTerminal]] [[Category:Serial Communications]]&lt;/div&gt;</summary>
		<author><name>Russ hensel</name></author>
		
	</entry>
	<entry>
		<id>http://www.opencircuits.com/index.php?title=Python_Smart_Terminal&amp;diff=88225</id>
		<title>Python Smart Terminal</title>
		<link rel="alternate" type="text/html" href="http://www.opencircuits.com/index.php?title=Python_Smart_Terminal&amp;diff=88225"/>
		<updated>2022-08-29T15:57:54Z</updated>

		<summary type="html">&lt;p&gt;Russ hensel: /* What/Why */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Why this Terminal =&lt;br /&gt;
&lt;br /&gt;
This terminal has a variety of uses, most are focused on interaction with&lt;br /&gt;
micro controller projects where ASCII data is exchanged, typically with messages&lt;br /&gt;
terminated with a newline or carriage return ( typical for most Arduino projects).&lt;br /&gt;
&lt;br /&gt;
It is also intended for those with a minimal understanding of Python ( required skill&lt;br /&gt;
ranges from the vary basic to familiarity with multi-threaded applications ).&lt;br /&gt;
&lt;br /&gt;
Its repository includes several examples of projects where the interaction is&lt;br /&gt;
either with a PC ( windows, mac, or Linux ) or a raspberry pi ( Linux ).&lt;br /&gt;
&lt;br /&gt;
Applications may be set up so control of the Arduino is manual, or entirely&lt;br /&gt;
automated.&lt;br /&gt;
&lt;br /&gt;
If this is the case there are many ways to use it:&lt;br /&gt;
&lt;br /&gt;
* Base Case&lt;br /&gt;
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.&lt;br /&gt;
 &lt;br /&gt;
* Base Case Plus&lt;br /&gt;
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 &amp;quot;documents&amp;quot; their use.  This can be very nice for debugging or manually controlled projects.&lt;br /&gt;
&lt;br /&gt;
* Automatic modes&lt;br /&gt;
The automatic mode implements the &amp;quot;Base Case Plus&amp;quot; but there is additional code running in another thread that makes the entire operation automatic and is intended for projects that just &amp;quot;run&amp;quot;.  In my case all these projects are used with a raspberry pi plus Arduino.  This typically gives the project:&lt;br /&gt;
** high speed response in the Arduino code ( micro second )&lt;br /&gt;
** internet access wifi and cat5&lt;br /&gt;
** bluetooth support&lt;br /&gt;
** Python and other high level program support&lt;br /&gt;
** Graphical interface support via remote terminal to a raspberry pi.&lt;br /&gt;
** HTTP server support&lt;br /&gt;
** Email access&lt;br /&gt;
** Remote terminal support -- either Desktop GUI or ssh terminal&lt;br /&gt;
&lt;br /&gt;
I have example code for these applications included in the repository that I have completed as projects of my own.&lt;br /&gt;
&lt;br /&gt;
= Goal =&lt;br /&gt;
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]]&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
This program is designed to be:&lt;br /&gt;
*Easily configurable through a configuration file parameters.py&lt;br /&gt;
*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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
See the graphical user interface here ( with screen shot ): [[Smart Terminal GUI]]&lt;br /&gt;
&lt;br /&gt;
This application is also part of a family of applications see the category below: Python Projects.&lt;br /&gt;
&lt;br /&gt;
This is an article started by Russ Hensel, see &amp;quot;http://www.opencircuits.com/index.php?title=Russ_hensel#About My Articles&amp;quot; About My Articles for a bit of info.&lt;br /&gt;
&lt;br /&gt;
'''Who should use this program and How:'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;	&lt;br /&gt;
|Who&lt;br /&gt;
|What&lt;br /&gt;
|How&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|Person with little programming experience, no interest in Python.  Looking for download and install.&lt;br /&gt;
|Probably should use another program.&lt;br /&gt;
|Not well suited to use this, I do not plan to fix this.&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|Programming microcontrollers in text based language, willing to install or has Python installed.&lt;br /&gt;
|Run the basic program.  Customize in fairly minor ways.&lt;br /&gt;
|Edit the parameter file to configure the terminal.  Could use processing extensions written by others.&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|Modest Python experience&lt;br /&gt;
|Modify all over the place, monitor equipment, save data to database ......&lt;br /&gt;
|Program should be well documented with an API, sample extensions.  Code changes localized ( now ) to one class plus the parameter file.&lt;br /&gt;
&amp;lt;!--------------------------------&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|ddd&lt;br /&gt;
|eee&lt;br /&gt;
|fff&lt;br /&gt;
&amp;lt;!--------------------------------&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;!--------------------------------&lt;br /&gt;
&amp;lt;!--------------------------------&lt;br /&gt;
&amp;lt;!--------------------------------&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= More on What and Why =&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 can 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.  &lt;br /&gt;
&lt;br /&gt;
Currently the terminal waits for a carriage return ( or line fead ) 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. &lt;br /&gt;
&lt;br /&gt;
So what are the features?&lt;br /&gt;
&lt;br /&gt;
* Free open source&lt;br /&gt;
* Runs across OSs Linux ( inc '''Raspberry Pi''' ), Mac or Windows &lt;br /&gt;
* Python&lt;br /&gt;
* &amp;quot;RS232&amp;quot; all standard baud rates etc.&lt;br /&gt;
* Easily adjusted serial communications parameters&lt;br /&gt;
* Multiple, preloaded with data entry fields.&lt;br /&gt;
* Clear ( erase ) receive area for removal of clutter.&lt;br /&gt;
* Copy all or part of receive area.&lt;br /&gt;
* Programmable&lt;br /&gt;
* I have extensions to work with specific arduino programs.  These:  Run a clock, Monitor a Green House, Monitor a root cellar, Monitor a Well.&lt;br /&gt;
* Database Interface ( now MYSQL can connect across the network )&lt;br /&gt;
* Email interface.&lt;br /&gt;
* Easily Modified or Replaceable GUI&lt;br /&gt;
* Parameter file for wide range of modifications of program behavior.&lt;br /&gt;
* Easy to run multiple instances with different parameters.&lt;br /&gt;
* Uses standard Python logging class.&lt;br /&gt;
* Includes some advanced data logging features in addition to database data logging.&lt;br /&gt;
* For more on the features see [[SmartTerminal Features]]&lt;br /&gt;
&lt;br /&gt;
Limits:&lt;br /&gt;
&lt;br /&gt;
* Polls the comm port at 10 to 100 hz.  So full lines ( ending with carriage return &amp;lt;cr&amp;gt; ) cannot come in too fast.  This is theory I have not pushed the terminal.&lt;br /&gt;
* One instance of the program per com port at a time, but easy to run multiple instances.&lt;br /&gt;
&lt;br /&gt;
What would you like to see in the program or documentation? Email me.&lt;br /&gt;
&lt;br /&gt;
A much earlier version of this terminal was described in my instructable [[http://www.instructables.com/id/Python-Terminal-for-Cheap-Pi-Arduino-Connection/ Python Terminal for Cheap Pi Arduino Connection]]  It may have some information that is useful, but the program has grown a lot since then.&lt;br /&gt;
&lt;br /&gt;
= Installation =&lt;br /&gt;
This program is intended for those who at least occasionally develop in Python.  I expect that they already run some things in Python and will just add this as an additional project.  There is no install program you just download the files, place where you keep your projects and run.  A bit more later in this section.&lt;br /&gt;
&lt;br /&gt;
== My Environment/Your Environment ==&lt;br /&gt;
&lt;br /&gt;
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'''&lt;br /&gt;
  &lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Download ==&lt;br /&gt;
&lt;br /&gt;
Code at GitHub, see [[https://github.com/russ-hensel/python_smart_terminal Code at GitHub]] ( it is Python and you can run directly from the source ) Email me if you have issues ( use this link [[User:Russ_hensel]] ).&lt;br /&gt;
You will get a zip file, unzip it and you should get:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
     .... whatever --|&lt;br /&gt;
                     |&lt;br /&gt;
                     |-- smart_terminal --| -&amp;gt; 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 )&lt;br /&gt;
                                          |    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&lt;br /&gt;
                                          |    get your own log files ... all typically named xxx.py_log &lt;br /&gt;
                                          | -- images -&amp;gt; image files, mostly screen shots, icons... or what ever, not important for the code.&lt;br /&gt;
                                          | -- sounds -&amp;gt; wav files used for the deer me extension, my attempt to scare deer.&lt;br /&gt;
                                          | -- wiki_etc -&amp;gt; various files documenting program, including at least some of the material from this wiki &lt;br /&gt;
&lt;br /&gt;
Put them in your system making &amp;quot;....whatever&amp;quot; anything convenient for your Python ( that is move the files to where you keep your Python source ).  &lt;br /&gt;
&lt;br /&gt;
Note that there may be a certain amount of left over, dead code, in the directory I am cleaning out bit by bit, someday it may be nice and neat.  For now if you want to tinker look at the design info below first.&lt;br /&gt;
&lt;br /&gt;
== Run ==&lt;br /&gt;
&lt;br /&gt;
Run it until it stops complaining about dependencies ( in the console ), after that ( and perhaps even before ) the GUI should come up.  You are installed.&lt;br /&gt;
&lt;br /&gt;
I have run the program on both Windows 10 and Rasperian on a RPi.  It should work in most OS's.  Let me know about issues.&lt;br /&gt;
&lt;br /&gt;
Some parts of the program think that mySql is available.  It should run fine without it ( there will be a message or two in the console ), untill you try to use the database then it is not so gracious.  Straight ahead use as a terminal does not use the database.&lt;br /&gt;
&lt;br /&gt;
= Configure to Run =&lt;br /&gt;
&lt;br /&gt;
== Basic ==&lt;br /&gt;
&lt;br /&gt;
Basic configuration of comm parameters like port, baud rate .... is all done in a file called parameters.py.  It seemed easier to simply use a Python text file instead of some other format like an ini file.  Pretty much all the file does is set instance variables in itself.  It is used by the program controller ( smart_terminal.SmartTerminal ) to create an instance of Parameters and then the values can be used.  Save the original ( parameters.py, maybe I will include a backup maybe not ) in case you mess it up too much.&lt;br /&gt;
&lt;br /&gt;
I have made yet another pass to clean up and comment the code in parameters.  Let me know if you have issues.  You should understand some values are being phased out but may still have some implementation and some may be coming in and have little or no implementation.  The comments should let you identify these situations.&lt;br /&gt;
&lt;br /&gt;
Parameters starts out with some &amp;quot;meta&amp;quot; parameters.  These are defined early in the creation of the objects and may effect other values.  In any case you can always define a value twice, the last one always wins.  The most important meta parameter is mode, you should not change it from self.mode = &amp;quot;Terminal&amp;quot; unless you understand the implications or do not mind going on a ride.&lt;br /&gt;
&lt;br /&gt;
All the com port values are defined in pretty much one place, find it ( say search on &amp;quot;baud&amp;quot; ) an change it to what you need.&lt;br /&gt;
&lt;br /&gt;
== Command Line Arguments ==&lt;br /&gt;
&lt;br /&gt;
If you run with the command line parameters=paramaters_b then after the regular parameters file runs, then the system looks for parameters_b.py and uses that to override values that you might want to tweak ( or completely redo.  There are two examples in the directory follow the pattern in them and you should be fine ).&lt;br /&gt;
&lt;br /&gt;
This can be especially useful if you want to run two copies connected to different ports and possibly running in different modes.  In this case it is also nice to change ( its in parameters ) the '''icon''' and '''color''' for each instance of the program.  You can write or use the little bat file to start them ( although this leaves a dos console hanging around )  Command line arguments can also be placed in shortcuts.  In either case they may take some tweaking to run in/from your file locations.&lt;br /&gt;
&lt;br /&gt;
The above mostly applies to Windows, but the program run fine with Linux ( including the Raspberry Pi ) and I suppose the Mac.  Of course the .bat file and shortcuts will not work, but similar facilities exist in the other OSs.&lt;br /&gt;
&lt;br /&gt;
== Running It ==&lt;br /&gt;
&lt;br /&gt;
When you run it it should open a windows a lot like the picture [[Smart Terminal GUI]].  Errors may show up in your Python console or the log file ( look in parameters.py for the name of the log file, typically self.pylogging_fn      = &amp;quot;smart_terminal.py_log&amp;quot; ).  The most likely errors will point to missing Python modules like pyserial.  You should install with pip ( or conda if using Spyder ).  Let me know how it goes.&lt;br /&gt;
&lt;br /&gt;
Normally the terminal does not open the com port until you press the &amp;lt;Open&amp;gt; button.  The parameters are displayed in the GUI if you do not like them ( for example when you press the &amp;lt;open&amp;gt; button the port open status changes to &amp;quot;open failed&amp;quot;, not the desired &amp;quot;open&amp;quot; ) you can shutdown, edit parameters.py and restart.  There is a simpler way.&lt;br /&gt;
&lt;br /&gt;
*First configure parameters.py to know the name of a text editor on your system. For mine this is one of: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
self.ex_editor   =  r&amp;quot;leafpad&amp;quot;    # linux and pi&lt;br /&gt;
&lt;br /&gt;
self.ex_editor   =  r&amp;quot;D:\apps\Notepad++\notepad++.exe&amp;quot; # for windows.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is set up to auto switch between the two os to make copying the whole program back and forth between the windows and linux a bit easier.&lt;br /&gt;
&lt;br /&gt;
*Now when you run it the button &amp;lt;Edit Parms&amp;gt; should let you edit the parameters.py file.  Edit it and save.&lt;br /&gt;
&lt;br /&gt;
*Hit the &amp;lt;Restart&amp;gt; button.  In a flash the program should restart with the new parameters.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
..... more here soon ......&lt;br /&gt;
&lt;br /&gt;
= Notes on the Code =&lt;br /&gt;
&lt;br /&gt;
In some ways I am proud of the code, it was sometimes a slog, and I had to learn a lot of Python to get it going.  On the other hand it kind of sucks, it has lots of dead code, ass backwards was of doing things, poor naming...... There is also a good bit of code on features that I am adding, but that is unfinished.  Until I loose interest in it it will probably improve.  However, adding features is more part of the life of a programmer than polishing old features; making something better that seems good enough is not always the priority it should be.  If you do not like it, mostly keep it to yourself unless it is accompanied by an offer to improve it.  I do not need ideas, I need time.  That said if you think you have a helpful comment contact me, my page will tell you how: [[User:Russ_hensel]]&lt;br /&gt;
&lt;br /&gt;
= Design =&lt;br /&gt;
&lt;br /&gt;
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 ).&lt;br /&gt;
&lt;br /&gt;
see: [[Python Smart Terminal Technical]]&lt;br /&gt;
&lt;br /&gt;
= Customizing/Extending =&lt;br /&gt;
&lt;br /&gt;
Simple customization may be done simply by changing the parameter file, see: [[Smart Terminal Parameter Examples]]  If you want to add code that can be done by messing with any of the source code ( not recommended ) or by programming an extension, see:  [[Python Smart Terminal Technical]] and [[Writing You Own Extensions to SmartTerminal]]&lt;br /&gt;
&lt;br /&gt;
= Additional Info =&lt;br /&gt;
&lt;br /&gt;
*Click on the category smart terminal below ( and perhaps the others as well )&lt;br /&gt;
*For a graphing ( plotting ) application that is a companion to this see [[Python Smart Terminal Graph]]&lt;br /&gt;
*[[Writing You Own Extensions to SmartTerminal]]&lt;br /&gt;
*[[Debugging the Smart Terminal]] &lt;br /&gt;
*[[Smart Terminal as Smart Data Logger]]  obsolete, gone, may come back.&lt;br /&gt;
*[[Smart Terminal GUI]]&lt;br /&gt;
*[[GreenHouse Monitor Program]]&lt;br /&gt;
*[[Smart Terminal Parameter Examples]]&lt;br /&gt;
*[[Python Desk Top Applications]]&lt;br /&gt;
*[ https://github.com/russ-hensel/python_smart_terminal python_smart_terminal at git hub]&lt;br /&gt;
*[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.&lt;br /&gt;
&lt;br /&gt;
[[Category:Python Projects]] [[category:Python]]  [[Category:Arduino/RaspberryPi]] [[Category:SmartTerminal]] [[Category:Serial Communications]]&lt;/div&gt;</summary>
		<author><name>Russ hensel</name></author>
		
	</entry>
	<entry>
		<id>http://www.opencircuits.com/index.php?title=Python_Smart_Terminal&amp;diff=88224</id>
		<title>Python Smart Terminal</title>
		<link rel="alternate" type="text/html" href="http://www.opencircuits.com/index.php?title=Python_Smart_Terminal&amp;diff=88224"/>
		<updated>2022-08-28T20:16:09Z</updated>

		<summary type="html">&lt;p&gt;Russ hensel: /* Why this Terminal */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Why this Terminal =&lt;br /&gt;
&lt;br /&gt;
This terminal has a variety of uses, most are focused on interaction with&lt;br /&gt;
micro controller projects where ASCII data is exchanged, typically with messages&lt;br /&gt;
terminated with a newline or carriage return ( typical for most Arduino projects).&lt;br /&gt;
&lt;br /&gt;
It is also intended for those with a minimal understanding of Python ( required skill&lt;br /&gt;
ranges from the vary basic to familiarity with multi-threaded applications ).&lt;br /&gt;
&lt;br /&gt;
Its repository includes several examples of projects where the interaction is&lt;br /&gt;
either with a PC ( windows, mac, or Linux ) or a raspberry pi ( Linux ).&lt;br /&gt;
&lt;br /&gt;
Applications may be set up so control of the Arduino is manual, or entirely&lt;br /&gt;
automated.&lt;br /&gt;
&lt;br /&gt;
If this is the case there are many ways to use it:&lt;br /&gt;
&lt;br /&gt;
* Base Case&lt;br /&gt;
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.&lt;br /&gt;
 &lt;br /&gt;
* Base Case Plus&lt;br /&gt;
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 &amp;quot;documents&amp;quot; their use.  This can be very nice for debugging or manually controlled projects.&lt;br /&gt;
&lt;br /&gt;
* Automatic modes&lt;br /&gt;
The automatic mode implements the &amp;quot;Base Case Plus&amp;quot; but there is additional code running in another thread that makes the entire operation automatic and is intended for projects that just &amp;quot;run&amp;quot;.  In my case all these projects are used with a raspberry pi plus Arduino.  This typically gives the project:&lt;br /&gt;
** high speed response in the Arduino code ( micro second )&lt;br /&gt;
** internet access wifi and cat5&lt;br /&gt;
** bluetooth support&lt;br /&gt;
** Python and other high level program support&lt;br /&gt;
** Graphical interface support via remote terminal to a raspberry pi.&lt;br /&gt;
** HTTP server support&lt;br /&gt;
** Email access&lt;br /&gt;
** Remote terminal support -- either Desktop GUI or ssh terminal&lt;br /&gt;
&lt;br /&gt;
I have example code for these applications included in the repository that I have completed as projects of my own.&lt;br /&gt;
&lt;br /&gt;
= Goal =&lt;br /&gt;
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]]&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
This program is designed to be:&lt;br /&gt;
*Easily configurable through a configuration file parameters.py&lt;br /&gt;
*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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
See the graphical user interface here ( with screen shot ): [[Smart Terminal GUI]]&lt;br /&gt;
&lt;br /&gt;
This application is also part of a family of applications see the category below: Python Projects.&lt;br /&gt;
&lt;br /&gt;
This is an article started by Russ Hensel, see &amp;quot;http://www.opencircuits.com/index.php?title=Russ_hensel#About My Articles&amp;quot; About My Articles for a bit of info.&lt;br /&gt;
&lt;br /&gt;
'''Who should use this program and How:'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;	&lt;br /&gt;
|Who&lt;br /&gt;
|What&lt;br /&gt;
|How&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|Person with little programming experience, no interest in Python.  Looking for download and install.&lt;br /&gt;
|Probably should use another program.&lt;br /&gt;
|Not well suited to use this, I do not plan to fix this.&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|Programming microcontrollers in text based language, willing to install or has Python installed.&lt;br /&gt;
|Run the basic program.  Customize in fairly minor ways.&lt;br /&gt;
|Edit the parameter file to configure the terminal.  Could use processing extensions written by others.&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|Modest Python experience&lt;br /&gt;
|Modify all over the place, monitor equipment, save data to database ......&lt;br /&gt;
|Program should be well documented with an API, sample extensions.  Code changes localized ( now ) to one class plus the parameter file.&lt;br /&gt;
&amp;lt;!--------------------------------&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|ddd&lt;br /&gt;
|eee&lt;br /&gt;
|fff&lt;br /&gt;
&amp;lt;!--------------------------------&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;!--------------------------------&lt;br /&gt;
&amp;lt;!--------------------------------&lt;br /&gt;
&amp;lt;!--------------------------------&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= What/Why =&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 can 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.  &lt;br /&gt;
&lt;br /&gt;
Currently the terminal waits for a carriage return ( or line fead ) 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. &lt;br /&gt;
&lt;br /&gt;
So what are the features?&lt;br /&gt;
&lt;br /&gt;
* Free open source&lt;br /&gt;
* Runs across OSs Linux ( inc '''Raspberry Pi''' ), Mac or Windows &lt;br /&gt;
* Python&lt;br /&gt;
* &amp;quot;RS232&amp;quot; all standard baud rates etc.&lt;br /&gt;
* Easily adjusted serial communications parameters&lt;br /&gt;
* Multiple, preloaded with data entry fields.&lt;br /&gt;
* Clear ( erase ) receive area for removal of clutter.&lt;br /&gt;
* Copy all or part of receive area.&lt;br /&gt;
* Programmable&lt;br /&gt;
* I have extensions to work with specific arduino programs.  These:  Run a clock, Monitor a Green House, Monitor a root cellar, Monitor a Well.&lt;br /&gt;
* Database Interface ( now MYSQL can connect across the network )&lt;br /&gt;
* Email interface.&lt;br /&gt;
* Easily Modified or Replaceable GUI&lt;br /&gt;
* Parameter file for wide range of modifications of program behavior.&lt;br /&gt;
* Easy to run multiple instances with different parameters.&lt;br /&gt;
* Uses standard Python logging class.&lt;br /&gt;
* Includes some advanced data logging features in addition to database data logging.&lt;br /&gt;
* For more on the features see [[SmartTerminal Features]]&lt;br /&gt;
&lt;br /&gt;
Limits:&lt;br /&gt;
&lt;br /&gt;
* Polls the comm port at 10 to 100 hz.  So full lines ( ending with carriage return &amp;lt;cr&amp;gt; ) cannot come in too fast.  This is theory I have not pushed the terminal.&lt;br /&gt;
* One instance of the program per com port at a time, but easy to run multiple instances.&lt;br /&gt;
&lt;br /&gt;
What would you like to see in the program or documentation? Email me.&lt;br /&gt;
&lt;br /&gt;
A much earlier version of this terminal was described in my instructable [[http://www.instructables.com/id/Python-Terminal-for-Cheap-Pi-Arduino-Connection/ Python Terminal for Cheap Pi Arduino Connection]]  It may have some information that is useful, but the program has grown a lot since then.&lt;br /&gt;
&lt;br /&gt;
= Installation =&lt;br /&gt;
This program is intended for those who at least occasionally develop in Python.  I expect that they already run some things in Python and will just add this as an additional project.  There is no install program you just download the files, place where you keep your projects and run.  A bit more later in this section.&lt;br /&gt;
&lt;br /&gt;
== My Environment/Your Environment ==&lt;br /&gt;
&lt;br /&gt;
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'''&lt;br /&gt;
  &lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Download ==&lt;br /&gt;
&lt;br /&gt;
Code at GitHub, see [[https://github.com/russ-hensel/python_smart_terminal Code at GitHub]] ( it is Python and you can run directly from the source ) Email me if you have issues ( use this link [[User:Russ_hensel]] ).&lt;br /&gt;
You will get a zip file, unzip it and you should get:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
     .... whatever --|&lt;br /&gt;
                     |&lt;br /&gt;
                     |-- smart_terminal --| -&amp;gt; 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 )&lt;br /&gt;
                                          |    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&lt;br /&gt;
                                          |    get your own log files ... all typically named xxx.py_log &lt;br /&gt;
                                          | -- images -&amp;gt; image files, mostly screen shots, icons... or what ever, not important for the code.&lt;br /&gt;
                                          | -- sounds -&amp;gt; wav files used for the deer me extension, my attempt to scare deer.&lt;br /&gt;
                                          | -- wiki_etc -&amp;gt; various files documenting program, including at least some of the material from this wiki &lt;br /&gt;
&lt;br /&gt;
Put them in your system making &amp;quot;....whatever&amp;quot; anything convenient for your Python ( that is move the files to where you keep your Python source ).  &lt;br /&gt;
&lt;br /&gt;
Note that there may be a certain amount of left over, dead code, in the directory I am cleaning out bit by bit, someday it may be nice and neat.  For now if you want to tinker look at the design info below first.&lt;br /&gt;
&lt;br /&gt;
== Run ==&lt;br /&gt;
&lt;br /&gt;
Run it until it stops complaining about dependencies ( in the console ), after that ( and perhaps even before ) the GUI should come up.  You are installed.&lt;br /&gt;
&lt;br /&gt;
I have run the program on both Windows 10 and Rasperian on a RPi.  It should work in most OS's.  Let me know about issues.&lt;br /&gt;
&lt;br /&gt;
Some parts of the program think that mySql is available.  It should run fine without it ( there will be a message or two in the console ), untill you try to use the database then it is not so gracious.  Straight ahead use as a terminal does not use the database.&lt;br /&gt;
&lt;br /&gt;
= Configure to Run =&lt;br /&gt;
&lt;br /&gt;
== Basic ==&lt;br /&gt;
&lt;br /&gt;
Basic configuration of comm parameters like port, baud rate .... is all done in a file called parameters.py.  It seemed easier to simply use a Python text file instead of some other format like an ini file.  Pretty much all the file does is set instance variables in itself.  It is used by the program controller ( smart_terminal.SmartTerminal ) to create an instance of Parameters and then the values can be used.  Save the original ( parameters.py, maybe I will include a backup maybe not ) in case you mess it up too much.&lt;br /&gt;
&lt;br /&gt;
I have made yet another pass to clean up and comment the code in parameters.  Let me know if you have issues.  You should understand some values are being phased out but may still have some implementation and some may be coming in and have little or no implementation.  The comments should let you identify these situations.&lt;br /&gt;
&lt;br /&gt;
Parameters starts out with some &amp;quot;meta&amp;quot; parameters.  These are defined early in the creation of the objects and may effect other values.  In any case you can always define a value twice, the last one always wins.  The most important meta parameter is mode, you should not change it from self.mode = &amp;quot;Terminal&amp;quot; unless you understand the implications or do not mind going on a ride.&lt;br /&gt;
&lt;br /&gt;
All the com port values are defined in pretty much one place, find it ( say search on &amp;quot;baud&amp;quot; ) an change it to what you need.&lt;br /&gt;
&lt;br /&gt;
== Command Line Arguments ==&lt;br /&gt;
&lt;br /&gt;
If you run with the command line parameters=paramaters_b then after the regular parameters file runs, then the system looks for parameters_b.py and uses that to override values that you might want to tweak ( or completely redo.  There are two examples in the directory follow the pattern in them and you should be fine ).&lt;br /&gt;
&lt;br /&gt;
This can be especially useful if you want to run two copies connected to different ports and possibly running in different modes.  In this case it is also nice to change ( its in parameters ) the '''icon''' and '''color''' for each instance of the program.  You can write or use the little bat file to start them ( although this leaves a dos console hanging around )  Command line arguments can also be placed in shortcuts.  In either case they may take some tweaking to run in/from your file locations.&lt;br /&gt;
&lt;br /&gt;
The above mostly applies to Windows, but the program run fine with Linux ( including the Raspberry Pi ) and I suppose the Mac.  Of course the .bat file and shortcuts will not work, but similar facilities exist in the other OSs.&lt;br /&gt;
&lt;br /&gt;
== Running It ==&lt;br /&gt;
&lt;br /&gt;
When you run it it should open a windows a lot like the picture [[Smart Terminal GUI]].  Errors may show up in your Python console or the log file ( look in parameters.py for the name of the log file, typically self.pylogging_fn      = &amp;quot;smart_terminal.py_log&amp;quot; ).  The most likely errors will point to missing Python modules like pyserial.  You should install with pip ( or conda if using Spyder ).  Let me know how it goes.&lt;br /&gt;
&lt;br /&gt;
Normally the terminal does not open the com port until you press the &amp;lt;Open&amp;gt; button.  The parameters are displayed in the GUI if you do not like them ( for example when you press the &amp;lt;open&amp;gt; button the port open status changes to &amp;quot;open failed&amp;quot;, not the desired &amp;quot;open&amp;quot; ) you can shutdown, edit parameters.py and restart.  There is a simpler way.&lt;br /&gt;
&lt;br /&gt;
*First configure parameters.py to know the name of a text editor on your system. For mine this is one of: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
self.ex_editor   =  r&amp;quot;leafpad&amp;quot;    # linux and pi&lt;br /&gt;
&lt;br /&gt;
self.ex_editor   =  r&amp;quot;D:\apps\Notepad++\notepad++.exe&amp;quot; # for windows.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is set up to auto switch between the two os to make copying the whole program back and forth between the windows and linux a bit easier.&lt;br /&gt;
&lt;br /&gt;
*Now when you run it the button &amp;lt;Edit Parms&amp;gt; should let you edit the parameters.py file.  Edit it and save.&lt;br /&gt;
&lt;br /&gt;
*Hit the &amp;lt;Restart&amp;gt; button.  In a flash the program should restart with the new parameters.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
..... more here soon ......&lt;br /&gt;
&lt;br /&gt;
= Notes on the Code =&lt;br /&gt;
&lt;br /&gt;
In some ways I am proud of the code, it was sometimes a slog, and I had to learn a lot of Python to get it going.  On the other hand it kind of sucks, it has lots of dead code, ass backwards was of doing things, poor naming...... There is also a good bit of code on features that I am adding, but that is unfinished.  Until I loose interest in it it will probably improve.  However, adding features is more part of the life of a programmer than polishing old features; making something better that seems good enough is not always the priority it should be.  If you do not like it, mostly keep it to yourself unless it is accompanied by an offer to improve it.  I do not need ideas, I need time.  That said if you think you have a helpful comment contact me, my page will tell you how: [[User:Russ_hensel]]&lt;br /&gt;
&lt;br /&gt;
= Design =&lt;br /&gt;
&lt;br /&gt;
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 ).&lt;br /&gt;
&lt;br /&gt;
see: [[Python Smart Terminal Technical]]&lt;br /&gt;
&lt;br /&gt;
= Customizing/Extending =&lt;br /&gt;
&lt;br /&gt;
Simple customization may be done simply by changing the parameter file, see: [[Smart Terminal Parameter Examples]]  If you want to add code that can be done by messing with any of the source code ( not recommended ) or by programming an extension, see:  [[Python Smart Terminal Technical]] and [[Writing You Own Extensions to SmartTerminal]]&lt;br /&gt;
&lt;br /&gt;
= Additional Info =&lt;br /&gt;
&lt;br /&gt;
*Click on the category smart terminal below ( and perhaps the others as well )&lt;br /&gt;
*For a graphing ( plotting ) application that is a companion to this see [[Python Smart Terminal Graph]]&lt;br /&gt;
*[[Writing You Own Extensions to SmartTerminal]]&lt;br /&gt;
*[[Debugging the Smart Terminal]] &lt;br /&gt;
*[[Smart Terminal as Smart Data Logger]]  obsolete, gone, may come back.&lt;br /&gt;
*[[Smart Terminal GUI]]&lt;br /&gt;
*[[GreenHouse Monitor Program]]&lt;br /&gt;
*[[Smart Terminal Parameter Examples]]&lt;br /&gt;
*[[Python Desk Top Applications]]&lt;br /&gt;
*[ https://github.com/russ-hensel/python_smart_terminal python_smart_terminal at git hub]&lt;br /&gt;
*[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.&lt;br /&gt;
&lt;br /&gt;
[[Category:Python Projects]] [[category:Python]]  [[Category:Arduino/RaspberryPi]] [[Category:SmartTerminal]] [[Category:Serial Communications]]&lt;/div&gt;</summary>
		<author><name>Russ hensel</name></author>
		
	</entry>
	<entry>
		<id>http://www.opencircuits.com/index.php?title=Python_Smart_Terminal&amp;diff=88223</id>
		<title>Python Smart Terminal</title>
		<link rel="alternate" type="text/html" href="http://www.opencircuits.com/index.php?title=Python_Smart_Terminal&amp;diff=88223"/>
		<updated>2022-08-28T20:14:16Z</updated>

		<summary type="html">&lt;p&gt;Russ hensel: /* Why this Terminal */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Why this Terminal =&lt;br /&gt;
&lt;br /&gt;
This terminal has a variety of uses, most are focused on interaction with&lt;br /&gt;
micro controller projects where ASCII data is exchanged, typically with messages&lt;br /&gt;
terminated with a newline or carriage return ( typical for most Arduino projects).&lt;br /&gt;
&lt;br /&gt;
It is also intended for those with a minimal understanding of Python ( required skill&lt;br /&gt;
ranges from the vary basic to familiarity with multi-threaded applications ).&lt;br /&gt;
&lt;br /&gt;
Its repository includes several examples of projects where the interaction is&lt;br /&gt;
either with a PC ( windows, mac, or Linux ) or a raspberry pi ( Linux ).&lt;br /&gt;
&lt;br /&gt;
Applications may be set up so control of the Arduino is manual, or entirely&lt;br /&gt;
automated.&lt;br /&gt;
&lt;br /&gt;
If this is the case there are many ways to use it:&lt;br /&gt;
&lt;br /&gt;
* Base Case&lt;br /&gt;
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.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
* Base Case Plus&lt;br /&gt;
** 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 &amp;quot;documents&amp;quot; their use.  This can be very nice for debugging or manually controlled projects.&lt;br /&gt;
&lt;br /&gt;
* Automatic modes&lt;br /&gt;
The automatic mode implements the &amp;quot;Base Case Plus&amp;quot; but there is additional code running in another thread that makes the entire operation automatic and is intended for projects that just &amp;quot;run&amp;quot;.  In my case all these projects are used with a raspberry pi plus Arduino.  This typically gives the project:&lt;br /&gt;
** high speed response in the Arduino code ( micro second )&lt;br /&gt;
** internet access wifi and cat5&lt;br /&gt;
** bluetooth support&lt;br /&gt;
** Python and other high level program support&lt;br /&gt;
** Graphical interface support&lt;br /&gt;
** HTTP server support&lt;br /&gt;
** Email access&lt;br /&gt;
** Remote terminal support -- either Desktop GUI or ssh terminal&lt;br /&gt;
&lt;br /&gt;
I have example code for these applications included in the repository that I have completed.&lt;br /&gt;
&lt;br /&gt;
= Goal =&lt;br /&gt;
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]]&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
This program is designed to be:&lt;br /&gt;
*Easily configurable through a configuration file parameters.py&lt;br /&gt;
*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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
See the graphical user interface here ( with screen shot ): [[Smart Terminal GUI]]&lt;br /&gt;
&lt;br /&gt;
This application is also part of a family of applications see the category below: Python Projects.&lt;br /&gt;
&lt;br /&gt;
This is an article started by Russ Hensel, see &amp;quot;http://www.opencircuits.com/index.php?title=Russ_hensel#About My Articles&amp;quot; About My Articles for a bit of info.&lt;br /&gt;
&lt;br /&gt;
'''Who should use this program and How:'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;	&lt;br /&gt;
|Who&lt;br /&gt;
|What&lt;br /&gt;
|How&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|Person with little programming experience, no interest in Python.  Looking for download and install.&lt;br /&gt;
|Probably should use another program.&lt;br /&gt;
|Not well suited to use this, I do not plan to fix this.&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|Programming microcontrollers in text based language, willing to install or has Python installed.&lt;br /&gt;
|Run the basic program.  Customize in fairly minor ways.&lt;br /&gt;
|Edit the parameter file to configure the terminal.  Could use processing extensions written by others.&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|Modest Python experience&lt;br /&gt;
|Modify all over the place, monitor equipment, save data to database ......&lt;br /&gt;
|Program should be well documented with an API, sample extensions.  Code changes localized ( now ) to one class plus the parameter file.&lt;br /&gt;
&amp;lt;!--------------------------------&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|ddd&lt;br /&gt;
|eee&lt;br /&gt;
|fff&lt;br /&gt;
&amp;lt;!--------------------------------&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;!--------------------------------&lt;br /&gt;
&amp;lt;!--------------------------------&lt;br /&gt;
&amp;lt;!--------------------------------&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= What/Why =&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 can 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.  &lt;br /&gt;
&lt;br /&gt;
Currently the terminal waits for a carriage return ( or line fead ) 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. &lt;br /&gt;
&lt;br /&gt;
So what are the features?&lt;br /&gt;
&lt;br /&gt;
* Free open source&lt;br /&gt;
* Runs across OSs Linux ( inc '''Raspberry Pi''' ), Mac or Windows &lt;br /&gt;
* Python&lt;br /&gt;
* &amp;quot;RS232&amp;quot; all standard baud rates etc.&lt;br /&gt;
* Easily adjusted serial communications parameters&lt;br /&gt;
* Multiple, preloaded with data entry fields.&lt;br /&gt;
* Clear ( erase ) receive area for removal of clutter.&lt;br /&gt;
* Copy all or part of receive area.&lt;br /&gt;
* Programmable&lt;br /&gt;
* I have extensions to work with specific arduino programs.  These:  Run a clock, Monitor a Green House, Monitor a root cellar, Monitor a Well.&lt;br /&gt;
* Database Interface ( now MYSQL can connect across the network )&lt;br /&gt;
* Email interface.&lt;br /&gt;
* Easily Modified or Replaceable GUI&lt;br /&gt;
* Parameter file for wide range of modifications of program behavior.&lt;br /&gt;
* Easy to run multiple instances with different parameters.&lt;br /&gt;
* Uses standard Python logging class.&lt;br /&gt;
* Includes some advanced data logging features in addition to database data logging.&lt;br /&gt;
* For more on the features see [[SmartTerminal Features]]&lt;br /&gt;
&lt;br /&gt;
Limits:&lt;br /&gt;
&lt;br /&gt;
* Polls the comm port at 10 to 100 hz.  So full lines ( ending with carriage return &amp;lt;cr&amp;gt; ) cannot come in too fast.  This is theory I have not pushed the terminal.&lt;br /&gt;
* One instance of the program per com port at a time, but easy to run multiple instances.&lt;br /&gt;
&lt;br /&gt;
What would you like to see in the program or documentation? Email me.&lt;br /&gt;
&lt;br /&gt;
A much earlier version of this terminal was described in my instructable [[http://www.instructables.com/id/Python-Terminal-for-Cheap-Pi-Arduino-Connection/ Python Terminal for Cheap Pi Arduino Connection]]  It may have some information that is useful, but the program has grown a lot since then.&lt;br /&gt;
&lt;br /&gt;
= Installation =&lt;br /&gt;
This program is intended for those who at least occasionally develop in Python.  I expect that they already run some things in Python and will just add this as an additional project.  There is no install program you just download the files, place where you keep your projects and run.  A bit more later in this section.&lt;br /&gt;
&lt;br /&gt;
== My Environment/Your Environment ==&lt;br /&gt;
&lt;br /&gt;
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'''&lt;br /&gt;
  &lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Download ==&lt;br /&gt;
&lt;br /&gt;
Code at GitHub, see [[https://github.com/russ-hensel/python_smart_terminal Code at GitHub]] ( it is Python and you can run directly from the source ) Email me if you have issues ( use this link [[User:Russ_hensel]] ).&lt;br /&gt;
You will get a zip file, unzip it and you should get:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
     .... whatever --|&lt;br /&gt;
                     |&lt;br /&gt;
                     |-- smart_terminal --| -&amp;gt; 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 )&lt;br /&gt;
                                          |    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&lt;br /&gt;
                                          |    get your own log files ... all typically named xxx.py_log &lt;br /&gt;
                                          | -- images -&amp;gt; image files, mostly screen shots, icons... or what ever, not important for the code.&lt;br /&gt;
                                          | -- sounds -&amp;gt; wav files used for the deer me extension, my attempt to scare deer.&lt;br /&gt;
                                          | -- wiki_etc -&amp;gt; various files documenting program, including at least some of the material from this wiki &lt;br /&gt;
&lt;br /&gt;
Put them in your system making &amp;quot;....whatever&amp;quot; anything convenient for your Python ( that is move the files to where you keep your Python source ).  &lt;br /&gt;
&lt;br /&gt;
Note that there may be a certain amount of left over, dead code, in the directory I am cleaning out bit by bit, someday it may be nice and neat.  For now if you want to tinker look at the design info below first.&lt;br /&gt;
&lt;br /&gt;
== Run ==&lt;br /&gt;
&lt;br /&gt;
Run it until it stops complaining about dependencies ( in the console ), after that ( and perhaps even before ) the GUI should come up.  You are installed.&lt;br /&gt;
&lt;br /&gt;
I have run the program on both Windows 10 and Rasperian on a RPi.  It should work in most OS's.  Let me know about issues.&lt;br /&gt;
&lt;br /&gt;
Some parts of the program think that mySql is available.  It should run fine without it ( there will be a message or two in the console ), untill you try to use the database then it is not so gracious.  Straight ahead use as a terminal does not use the database.&lt;br /&gt;
&lt;br /&gt;
= Configure to Run =&lt;br /&gt;
&lt;br /&gt;
== Basic ==&lt;br /&gt;
&lt;br /&gt;
Basic configuration of comm parameters like port, baud rate .... is all done in a file called parameters.py.  It seemed easier to simply use a Python text file instead of some other format like an ini file.  Pretty much all the file does is set instance variables in itself.  It is used by the program controller ( smart_terminal.SmartTerminal ) to create an instance of Parameters and then the values can be used.  Save the original ( parameters.py, maybe I will include a backup maybe not ) in case you mess it up too much.&lt;br /&gt;
&lt;br /&gt;
I have made yet another pass to clean up and comment the code in parameters.  Let me know if you have issues.  You should understand some values are being phased out but may still have some implementation and some may be coming in and have little or no implementation.  The comments should let you identify these situations.&lt;br /&gt;
&lt;br /&gt;
Parameters starts out with some &amp;quot;meta&amp;quot; parameters.  These are defined early in the creation of the objects and may effect other values.  In any case you can always define a value twice, the last one always wins.  The most important meta parameter is mode, you should not change it from self.mode = &amp;quot;Terminal&amp;quot; unless you understand the implications or do not mind going on a ride.&lt;br /&gt;
&lt;br /&gt;
All the com port values are defined in pretty much one place, find it ( say search on &amp;quot;baud&amp;quot; ) an change it to what you need.&lt;br /&gt;
&lt;br /&gt;
== Command Line Arguments ==&lt;br /&gt;
&lt;br /&gt;
If you run with the command line parameters=paramaters_b then after the regular parameters file runs, then the system looks for parameters_b.py and uses that to override values that you might want to tweak ( or completely redo.  There are two examples in the directory follow the pattern in them and you should be fine ).&lt;br /&gt;
&lt;br /&gt;
This can be especially useful if you want to run two copies connected to different ports and possibly running in different modes.  In this case it is also nice to change ( its in parameters ) the '''icon''' and '''color''' for each instance of the program.  You can write or use the little bat file to start them ( although this leaves a dos console hanging around )  Command line arguments can also be placed in shortcuts.  In either case they may take some tweaking to run in/from your file locations.&lt;br /&gt;
&lt;br /&gt;
The above mostly applies to Windows, but the program run fine with Linux ( including the Raspberry Pi ) and I suppose the Mac.  Of course the .bat file and shortcuts will not work, but similar facilities exist in the other OSs.&lt;br /&gt;
&lt;br /&gt;
== Running It ==&lt;br /&gt;
&lt;br /&gt;
When you run it it should open a windows a lot like the picture [[Smart Terminal GUI]].  Errors may show up in your Python console or the log file ( look in parameters.py for the name of the log file, typically self.pylogging_fn      = &amp;quot;smart_terminal.py_log&amp;quot; ).  The most likely errors will point to missing Python modules like pyserial.  You should install with pip ( or conda if using Spyder ).  Let me know how it goes.&lt;br /&gt;
&lt;br /&gt;
Normally the terminal does not open the com port until you press the &amp;lt;Open&amp;gt; button.  The parameters are displayed in the GUI if you do not like them ( for example when you press the &amp;lt;open&amp;gt; button the port open status changes to &amp;quot;open failed&amp;quot;, not the desired &amp;quot;open&amp;quot; ) you can shutdown, edit parameters.py and restart.  There is a simpler way.&lt;br /&gt;
&lt;br /&gt;
*First configure parameters.py to know the name of a text editor on your system. For mine this is one of: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
self.ex_editor   =  r&amp;quot;leafpad&amp;quot;    # linux and pi&lt;br /&gt;
&lt;br /&gt;
self.ex_editor   =  r&amp;quot;D:\apps\Notepad++\notepad++.exe&amp;quot; # for windows.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is set up to auto switch between the two os to make copying the whole program back and forth between the windows and linux a bit easier.&lt;br /&gt;
&lt;br /&gt;
*Now when you run it the button &amp;lt;Edit Parms&amp;gt; should let you edit the parameters.py file.  Edit it and save.&lt;br /&gt;
&lt;br /&gt;
*Hit the &amp;lt;Restart&amp;gt; button.  In a flash the program should restart with the new parameters.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
..... more here soon ......&lt;br /&gt;
&lt;br /&gt;
= Notes on the Code =&lt;br /&gt;
&lt;br /&gt;
In some ways I am proud of the code, it was sometimes a slog, and I had to learn a lot of Python to get it going.  On the other hand it kind of sucks, it has lots of dead code, ass backwards was of doing things, poor naming...... There is also a good bit of code on features that I am adding, but that is unfinished.  Until I loose interest in it it will probably improve.  However, adding features is more part of the life of a programmer than polishing old features; making something better that seems good enough is not always the priority it should be.  If you do not like it, mostly keep it to yourself unless it is accompanied by an offer to improve it.  I do not need ideas, I need time.  That said if you think you have a helpful comment contact me, my page will tell you how: [[User:Russ_hensel]]&lt;br /&gt;
&lt;br /&gt;
= Design =&lt;br /&gt;
&lt;br /&gt;
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 ).&lt;br /&gt;
&lt;br /&gt;
see: [[Python Smart Terminal Technical]]&lt;br /&gt;
&lt;br /&gt;
= Customizing/Extending =&lt;br /&gt;
&lt;br /&gt;
Simple customization may be done simply by changing the parameter file, see: [[Smart Terminal Parameter Examples]]  If you want to add code that can be done by messing with any of the source code ( not recommended ) or by programming an extension, see:  [[Python Smart Terminal Technical]] and [[Writing You Own Extensions to SmartTerminal]]&lt;br /&gt;
&lt;br /&gt;
= Additional Info =&lt;br /&gt;
&lt;br /&gt;
*Click on the category smart terminal below ( and perhaps the others as well )&lt;br /&gt;
*For a graphing ( plotting ) application that is a companion to this see [[Python Smart Terminal Graph]]&lt;br /&gt;
*[[Writing You Own Extensions to SmartTerminal]]&lt;br /&gt;
*[[Debugging the Smart Terminal]] &lt;br /&gt;
*[[Smart Terminal as Smart Data Logger]]  obsolete, gone, may come back.&lt;br /&gt;
*[[Smart Terminal GUI]]&lt;br /&gt;
*[[GreenHouse Monitor Program]]&lt;br /&gt;
*[[Smart Terminal Parameter Examples]]&lt;br /&gt;
*[[Python Desk Top Applications]]&lt;br /&gt;
*[ https://github.com/russ-hensel/python_smart_terminal python_smart_terminal at git hub]&lt;br /&gt;
*[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.&lt;br /&gt;
&lt;br /&gt;
[[Category:Python Projects]] [[category:Python]]  [[Category:Arduino/RaspberryPi]] [[Category:SmartTerminal]] [[Category:Serial Communications]]&lt;/div&gt;</summary>
		<author><name>Russ hensel</name></author>
		
	</entry>
	<entry>
		<id>http://www.opencircuits.com/index.php?title=Python_Smart_Terminal_Technical_Details&amp;diff=88222</id>
		<title>Python Smart Terminal Technical Details</title>
		<link rel="alternate" type="text/html" href="http://www.opencircuits.com/index.php?title=Python_Smart_Terminal_Technical_Details&amp;diff=88222"/>
		<updated>2022-08-28T20:11:13Z</updated>

		<summary type="html">&lt;p&gt;Russ hensel: /* What are the Possible Comm Ports */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;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]]&lt;br /&gt;
&lt;br /&gt;
= GUI Construction =&lt;br /&gt;
This is one of the earlier GUIs that I worked on and the code has been worked over a lot.  It still has some early features that I would not write now, I have left them in because they work well enough.&lt;br /&gt;
......... more as I get to it......&lt;br /&gt;
&lt;br /&gt;
= Some Thread Details =&lt;br /&gt;
&lt;br /&gt;
There are two threads set up in the application, one meant to communicate from the gui to the helper thread and one the other way around.  Queues are supposed to be thread save so we should be ok so far.  Thread processing is quite localized in the code so you should be able to check it out pretty easily: search for '''queue_to_helper''' and '''queue_fr_helper'''.  Generally what is posted to the queues is a tuple with three parts: (action, function, function_args ).  In this tuple action is a string ( like &amp;quot;call&amp;quot;...&amp;quot;stop&amp;quot; )  function is a function reference, and function_args are arguments to the function.  Not all parts may be used for each action.  You should read the code to see what happens.&lt;br /&gt;
&lt;br /&gt;
One example that exists at, this time of writing, is how the helper thread outputs to the gui thread since it is not supposed to interact with direct calls.  What happens is that the helper thread posts a tuple:  ( &amp;quot;info&amp;quot;, None, ( &amp;quot;print me&amp;quot;, ) ).  &amp;quot;info&amp;quot; indicates that the helper thread wants to post an &amp;quot;info message&amp;quot; to the gui. None indicates that there is no explicit function call involved ( it is implied in the action &amp;quot;info&amp;quot; and (&amp;quot;print me&amp;quot;) is the data that is to be displayed.&lt;br /&gt;
&lt;br /&gt;
This is all I will document for now because smaller detail may change.  Since the code is localized you should be able to figure out more details yourself, if no email me.&lt;br /&gt;
&lt;br /&gt;
= Finding the Arduino - Comm Port Details =&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Comm Port Validation ==&lt;br /&gt;
&lt;br /&gt;
In the &amp;quot;manual&amp;quot; mode you would press the Open button on the GUI and hopefully the port will open ( it will if the port exists and is available for opening ).  Then typically you will send something to the micro controller and look for a reasonable response.  This is fine.  You can also automate the process by using the method  find_arduino(  ) in HelperThread instance.  Here is what it does.&lt;br /&gt;
&lt;br /&gt;
* Works through your list of comm ports as specified in '''parameters.port'''.&lt;br /&gt;
* For each port try to open it with the other comm parameters in '''parameters.py'''&lt;br /&gt;
* If a port opens waits a bit ( for the arduino to reset ... time specified by: parameters.not_done_yet  ...... now hardcoded &lt;br /&gt;
* The second level of validation is that the port can send and receive to the desired arduino, this is checked by sending a text string ( as specified in parameters.get_arduino_version) and looking for a response.&lt;br /&gt;
* The third level is to look at the received string.  If it contains the correct substring ( as specified in parameters.arduino_version) then the port is valid.&lt;br /&gt;
* Stops looking at the port list if a comm port passes this validation test.&lt;br /&gt;
&lt;br /&gt;
For example the terminal may send &amp;quot;v&amp;lt;cr&amp;gt;&amp;quot;, recieve &amp;quot;GreenHouse Monitor v3 2017 01 24.01&amp;lt;cr&amp;gt;&amp;quot;, and look for &amp;quot;GreenHouse&amp;quot; in the received string.  This would validate the port.&lt;br /&gt;
&lt;br /&gt;
So what does the terminal send and what does it look for -- see the parameter file; you should find something like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        # next used in a port probe routine to help identify the port with an arduino&lt;br /&gt;
        # the arduino is supposed to respond to a version request with a string&lt;br /&gt;
        # containing this, they are part of the name of an Arduino application&lt;br /&gt;
&lt;br /&gt;
        self.get_arduino_version    = &amp;quot;v&amp;quot;     # send to the port to get a response from the arduino.&lt;br /&gt;
&lt;br /&gt;
        self.arduino_version        = &amp;quot;GreenHouse&amp;quot;  # the received response from the arduino should contain this as a substring if the comm port is valid.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the find_arduino() method does not try different baud rates, you need to get that one right yourself.&lt;br /&gt;
&lt;br /&gt;
== What are the Possible Comm Ports ==&lt;br /&gt;
&lt;br /&gt;
The SmartTerminal uses two methods for this.  One is just back to the parameter file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        # used to probe around for ports&lt;br /&gt;
        if  self.os_win:&lt;br /&gt;
            self.port_list  =  [ &amp;quot;COM1&amp;quot;,  &amp;quot;COM2&amp;quot;,  &amp;quot;COM3&amp;quot;,  &amp;quot;COM4&amp;quot;,  &amp;quot;COM5&amp;quot;,  &amp;quot;COM6&amp;quot;,  &amp;quot;COM7&amp;quot;,  &amp;quot;COM8&amp;quot;,  &amp;quot;COM9&amp;quot;,  &amp;quot;COM10&amp;quot;,&lt;br /&gt;
                                &amp;quot;COM11&amp;quot;, &amp;quot;COM12&amp;quot;, &amp;quot;COM13&amp;quot;, &amp;quot;COM14&amp;quot;, &amp;quot;COM15&amp;quot;, &amp;quot;COM16&amp;quot;, &amp;quot;COM17&amp;quot;, &amp;quot;COM18&amp;quot;,  &amp;quot;COM19&amp;quot;, &amp;quot;COM20&amp;quot;,&lt;br /&gt;
                               ]&lt;br /&gt;
&lt;br /&gt;
        else:&lt;br /&gt;
            self.port_list  =  [ &amp;quot;/dev/ttyUSB0&amp;quot;, &amp;quot;/dev/ttyUSB1&amp;quot;, &amp;quot;/dev/ttyUSB2&amp;quot;,&lt;br /&gt;
                                &amp;quot;/dev/ttyACM0&amp;quot;, &amp;quot;/dev/ttyACM1&amp;quot;, &amp;quot;/dev/ttyACM2&amp;quot;,&lt;br /&gt;
  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above uses the automatic detection of the operating system.  You could of course skip that part of the implementation.&lt;br /&gt;
&lt;br /&gt;
The second method.  There is a Python function for detecting ports.  It is documented as not always being right.  Here it is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     list(serial.tools.list_ports.comports())&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So finally when making a list of ports to probe I make a list ( in the order the ports will be tested ):&lt;br /&gt;
&lt;br /&gt;
* Start with port in the parameter file.&lt;br /&gt;
* Add the ports reported by python ( no duplicates ).&lt;br /&gt;
* Add the ports in the parameter port list ( no duplicates ).&lt;br /&gt;
&lt;br /&gt;
If no ports are actually present you can test 20 ports in seconds.  Sending and receiving strings takes longer.  Note that all of this is done using the baud rate and other parameters in the parameter file, we do not probe using variations on them.  Actually, in most cases, the baud rate.... are part of the identification of the arduino.&lt;br /&gt;
&lt;br /&gt;
So with this list we loop through it trying to validate each port.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-----------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Code in SmartTerminal ==&lt;br /&gt;
&lt;br /&gt;
What?&lt;br /&gt;
&lt;br /&gt;
* Review this for the inner inner details.  Send questions if not clear.&lt;br /&gt;
&lt;br /&gt;
* in smart_terminal_helper.HelperThread.test_ports( self, a_port_list, a_get, a_valid_response ) is the probe and validation routine, but this needs the port list, the probe string and the valid response.  &lt;br /&gt;
&lt;br /&gt;
* above uses, in the same object, test_port()&lt;br /&gt;
&lt;br /&gt;
* first subroutine above is called from ( same object ) find_arduino( ) which constructs the port list and get parameters as needed from parameters.&lt;br /&gt;
this cannot bee seen&lt;br /&gt;
-------------&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:SmartTerminal]] [[Category:Python]]&lt;/div&gt;</summary>
		<author><name>Russ hensel</name></author>
		
	</entry>
	<entry>
		<id>http://www.opencircuits.com/index.php?title=Category:SmartTerminal&amp;diff=88221</id>
		<title>Category:SmartTerminal</title>
		<link rel="alternate" type="text/html" href="http://www.opencircuits.com/index.php?title=Category:SmartTerminal&amp;diff=88221"/>
		<updated>2022-08-28T20:10:32Z</updated>

		<summary type="html">&lt;p&gt;Russ hensel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Pages that relate to '''[[Python Smart Terminal]]''' and its related Arduino apps.  The main, starting page is '''[[Python Smart Terminal]]'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Python]] [[Category:Arduino/RaspberryPi]] [[Category:Serial Communications‏‎]]&lt;/div&gt;</summary>
		<author><name>Russ hensel</name></author>
		
	</entry>
	<entry>
		<id>http://www.opencircuits.com/index.php?title=Python_Smart_Terminal&amp;diff=88219</id>
		<title>Python Smart Terminal</title>
		<link rel="alternate" type="text/html" href="http://www.opencircuits.com/index.php?title=Python_Smart_Terminal&amp;diff=88219"/>
		<updated>2022-08-28T19:57:18Z</updated>

		<summary type="html">&lt;p&gt;Russ hensel: /* Why this Terminal */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Why this Terminal =&lt;br /&gt;
&lt;br /&gt;
This terminal has a variety of uses, most are focused on interaction with&lt;br /&gt;
micro controller projects where ASCII data is exchanged, typically with messages&lt;br /&gt;
terminated with a newline or carrige return ( typical for most Arduino projects).&lt;br /&gt;
&lt;br /&gt;
It is also intended for those with a minimal understanding of Python ( required skill&lt;br /&gt;
ranges from the vary basic to familiarity with multi-threaded applications ).&lt;br /&gt;
&lt;br /&gt;
Its repository includes several examples of projects where the interaction is&lt;br /&gt;
either with a PC ( windows, mac, or Linux ) or a raspberry pi ( Linux ).&lt;br /&gt;
&lt;br /&gt;
Applications may be set up so control of the Arduino is manual, or entirely&lt;br /&gt;
automated.&lt;br /&gt;
&lt;br /&gt;
If this is the case there are many ways to use it:&lt;br /&gt;
&lt;br /&gt;
    * Base Case&lt;br /&gt;
        Use as a replacement for an arduino serial monitor.&lt;br /&gt;
        For this case there is not much point unless you use it&lt;br /&gt;
        as a stepping stone to more advanced use.&lt;br /&gt;
        One nice feature is multiple places for user input, each&lt;br /&gt;
        of which is remembed untill changed.&lt;br /&gt;
        ( note: I do not have a graphing module for this case though&lt;br /&gt;
        one could be added. )&lt;br /&gt;
&lt;br /&gt;
    * Base Case Plus&lt;br /&gt;
        Typically the microcontroller is used with a small number of command&lt;br /&gt;
        strings, typically just a few letters, and in complicated cases more&lt;br /&gt;
        complicated strings.  The terminal can be set up with these preloaded&lt;br /&gt;
        and with a button that &amp;quot;documents&amp;quot; their use.  This can be very nice for&lt;br /&gt;
        debugging or manually controlled projects.&lt;br /&gt;
&lt;br /&gt;
    * Automatic modes&lt;br /&gt;
        The automatic mode implements the &amp;quot;Base Case Plus&amp;quot; but there is additional&lt;br /&gt;
        code running in another thread that makes the entire operation automatic&lt;br /&gt;
        and is intened for projects that juse &amp;quot;run&amp;quot;.  In my case all these projects&lt;br /&gt;
        are used with a raspberry pi plus arduino.  This typically gives the&lt;br /&gt;
        project&lt;br /&gt;
            - high speed response in the arduino code ( micro second )&lt;br /&gt;
            - internet access wifi and cat5&lt;br /&gt;
            - bluetooth support&lt;br /&gt;
            - Python and other high level program support&lt;br /&gt;
            - Graphical interface support&lt;br /&gt;
            - HTTP server support&lt;br /&gt;
            - Email access&lt;br /&gt;
            - Remote terminal suport -- either Desktop GUI or ssh terminal&lt;br /&gt;
&lt;br /&gt;
        I have exaple code for these applications included in the repository&lt;br /&gt;
        that I have completed.&lt;br /&gt;
&lt;br /&gt;
= Goal =&lt;br /&gt;
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]]&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
This program is designed to be:&lt;br /&gt;
*Easily configurable through a configuration file parameters.py&lt;br /&gt;
*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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
See the graphical user interface here ( with screen shot ): [[Smart Terminal GUI]]&lt;br /&gt;
&lt;br /&gt;
This application is also part of a family of applications see the category below: Python Projects.&lt;br /&gt;
&lt;br /&gt;
This is an article started by Russ Hensel, see &amp;quot;http://www.opencircuits.com/index.php?title=Russ_hensel#About My Articles&amp;quot; About My Articles for a bit of info.&lt;br /&gt;
&lt;br /&gt;
'''Who should use this program and How:'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;	&lt;br /&gt;
|Who&lt;br /&gt;
|What&lt;br /&gt;
|How&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|Person with little programming experience, no interest in Python.  Looking for download and install.&lt;br /&gt;
|Probably should use another program.&lt;br /&gt;
|Not well suited to use this, I do not plan to fix this.&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|Programming microcontrollers in text based language, willing to install or has Python installed.&lt;br /&gt;
|Run the basic program.  Customize in fairly minor ways.&lt;br /&gt;
|Edit the parameter file to configure the terminal.  Could use processing extensions written by others.&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|Modest Python experience&lt;br /&gt;
|Modify all over the place, monitor equipment, save data to database ......&lt;br /&gt;
|Program should be well documented with an API, sample extensions.  Code changes localized ( now ) to one class plus the parameter file.&lt;br /&gt;
&amp;lt;!--------------------------------&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|ddd&lt;br /&gt;
|eee&lt;br /&gt;
|fff&lt;br /&gt;
&amp;lt;!--------------------------------&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;!--------------------------------&lt;br /&gt;
&amp;lt;!--------------------------------&lt;br /&gt;
&amp;lt;!--------------------------------&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= What/Why =&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 can 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.  &lt;br /&gt;
&lt;br /&gt;
Currently the terminal waits for a carriage return ( or line fead ) 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. &lt;br /&gt;
&lt;br /&gt;
So what are the features?&lt;br /&gt;
&lt;br /&gt;
* Free open source&lt;br /&gt;
* Runs across OSs Linux ( inc '''Raspberry Pi''' ), Mac or Windows &lt;br /&gt;
* Python&lt;br /&gt;
* &amp;quot;RS232&amp;quot; all standard baud rates etc.&lt;br /&gt;
* Easily adjusted serial communications parameters&lt;br /&gt;
* Multiple, preloaded with data entry fields.&lt;br /&gt;
* Clear ( erase ) receive area for removal of clutter.&lt;br /&gt;
* Copy all or part of receive area.&lt;br /&gt;
* Programmable&lt;br /&gt;
* I have extensions to work with specific arduino programs.  These:  Run a clock, Monitor a Green House, Monitor a root cellar, Monitor a Well.&lt;br /&gt;
* Database Interface ( now MYSQL can connect across the network )&lt;br /&gt;
* Email interface.&lt;br /&gt;
* Easily Modified or Replaceable GUI&lt;br /&gt;
* Parameter file for wide range of modifications of program behavior.&lt;br /&gt;
* Easy to run multiple instances with different parameters.&lt;br /&gt;
* Uses standard Python logging class.&lt;br /&gt;
* Includes some advanced data logging features in addition to database data logging.&lt;br /&gt;
* For more on the features see [[SmartTerminal Features]]&lt;br /&gt;
&lt;br /&gt;
Limits:&lt;br /&gt;
&lt;br /&gt;
* Polls the comm port at 10 to 100 hz.  So full lines ( ending with carriage return &amp;lt;cr&amp;gt; ) cannot come in too fast.  This is theory I have not pushed the terminal.&lt;br /&gt;
* One instance of the program per com port at a time, but easy to run multiple instances.&lt;br /&gt;
&lt;br /&gt;
What would you like to see in the program or documentation? Email me.&lt;br /&gt;
&lt;br /&gt;
A much earlier version of this terminal was described in my instructable [[http://www.instructables.com/id/Python-Terminal-for-Cheap-Pi-Arduino-Connection/ Python Terminal for Cheap Pi Arduino Connection]]  It may have some information that is useful, but the program has grown a lot since then.&lt;br /&gt;
&lt;br /&gt;
= Installation =&lt;br /&gt;
This program is intended for those who at least occasionally develop in Python.  I expect that they already run some things in Python and will just add this as an additional project.  There is no install program you just download the files, place where you keep your projects and run.  A bit more later in this section.&lt;br /&gt;
&lt;br /&gt;
== My Environment/Your Environment ==&lt;br /&gt;
&lt;br /&gt;
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'''&lt;br /&gt;
  &lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Download ==&lt;br /&gt;
&lt;br /&gt;
Code at GitHub, see [[https://github.com/russ-hensel/python_smart_terminal Code at GitHub]] ( it is Python and you can run directly from the source ) Email me if you have issues ( use this link [[User:Russ_hensel]] ).&lt;br /&gt;
You will get a zip file, unzip it and you should get:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
     .... whatever --|&lt;br /&gt;
                     |&lt;br /&gt;
                     |-- smart_terminal --| -&amp;gt; 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 )&lt;br /&gt;
                                          |    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&lt;br /&gt;
                                          |    get your own log files ... all typically named xxx.py_log &lt;br /&gt;
                                          | -- images -&amp;gt; image files, mostly screen shots, icons... or what ever, not important for the code.&lt;br /&gt;
                                          | -- sounds -&amp;gt; wav files used for the deer me extension, my attempt to scare deer.&lt;br /&gt;
                                          | -- wiki_etc -&amp;gt; various files documenting program, including at least some of the material from this wiki &lt;br /&gt;
&lt;br /&gt;
Put them in your system making &amp;quot;....whatever&amp;quot; anything convenient for your Python ( that is move the files to where you keep your Python source ).  &lt;br /&gt;
&lt;br /&gt;
Note that there may be a certain amount of left over, dead code, in the directory I am cleaning out bit by bit, someday it may be nice and neat.  For now if you want to tinker look at the design info below first.&lt;br /&gt;
&lt;br /&gt;
== Run ==&lt;br /&gt;
&lt;br /&gt;
Run it until it stops complaining about dependencies ( in the console ), after that ( and perhaps even before ) the GUI should come up.  You are installed.&lt;br /&gt;
&lt;br /&gt;
I have run the program on both Windows 10 and Rasperian on a RPi.  It should work in most OS's.  Let me know about issues.&lt;br /&gt;
&lt;br /&gt;
Some parts of the program think that mySql is available.  It should run fine without it ( there will be a message or two in the console ), untill you try to use the database then it is not so gracious.  Straight ahead use as a terminal does not use the database.&lt;br /&gt;
&lt;br /&gt;
= Configure to Run =&lt;br /&gt;
&lt;br /&gt;
== Basic ==&lt;br /&gt;
&lt;br /&gt;
Basic configuration of comm parameters like port, baud rate .... is all done in a file called parameters.py.  It seemed easier to simply use a Python text file instead of some other format like an ini file.  Pretty much all the file does is set instance variables in itself.  It is used by the program controller ( smart_terminal.SmartTerminal ) to create an instance of Parameters and then the values can be used.  Save the original ( parameters.py, maybe I will include a backup maybe not ) in case you mess it up too much.&lt;br /&gt;
&lt;br /&gt;
I have made yet another pass to clean up and comment the code in parameters.  Let me know if you have issues.  You should understand some values are being phased out but may still have some implementation and some may be coming in and have little or no implementation.  The comments should let you identify these situations.&lt;br /&gt;
&lt;br /&gt;
Parameters starts out with some &amp;quot;meta&amp;quot; parameters.  These are defined early in the creation of the objects and may effect other values.  In any case you can always define a value twice, the last one always wins.  The most important meta parameter is mode, you should not change it from self.mode = &amp;quot;Terminal&amp;quot; unless you understand the implications or do not mind going on a ride.&lt;br /&gt;
&lt;br /&gt;
All the com port values are defined in pretty much one place, find it ( say search on &amp;quot;baud&amp;quot; ) an change it to what you need.&lt;br /&gt;
&lt;br /&gt;
== Command Line Arguments ==&lt;br /&gt;
&lt;br /&gt;
If you run with the command line parameters=paramaters_b then after the regular parameters file runs, then the system looks for parameters_b.py and uses that to override values that you might want to tweak ( or completely redo.  There are two examples in the directory follow the pattern in them and you should be fine ).&lt;br /&gt;
&lt;br /&gt;
This can be especially useful if you want to run two copies connected to different ports and possibly running in different modes.  In this case it is also nice to change ( its in parameters ) the '''icon''' and '''color''' for each instance of the program.  You can write or use the little bat file to start them ( although this leaves a dos console hanging around )  Command line arguments can also be placed in shortcuts.  In either case they may take some tweaking to run in/from your file locations.&lt;br /&gt;
&lt;br /&gt;
The above mostly applies to Windows, but the program run fine with Linux ( including the Raspberry Pi ) and I suppose the Mac.  Of course the .bat file and shortcuts will not work, but similar facilities exist in the other OSs.&lt;br /&gt;
&lt;br /&gt;
== Running It ==&lt;br /&gt;
&lt;br /&gt;
When you run it it should open a windows a lot like the picture [[Smart Terminal GUI]].  Errors may show up in your Python console or the log file ( look in parameters.py for the name of the log file, typically self.pylogging_fn      = &amp;quot;smart_terminal.py_log&amp;quot; ).  The most likely errors will point to missing Python modules like pyserial.  You should install with pip ( or conda if using Spyder ).  Let me know how it goes.&lt;br /&gt;
&lt;br /&gt;
Normally the terminal does not open the com port until you press the &amp;lt;Open&amp;gt; button.  The parameters are displayed in the GUI if you do not like them ( for example when you press the &amp;lt;open&amp;gt; button the port open status changes to &amp;quot;open failed&amp;quot;, not the desired &amp;quot;open&amp;quot; ) you can shutdown, edit parameters.py and restart.  There is a simpler way.&lt;br /&gt;
&lt;br /&gt;
*First configure parameters.py to know the name of a text editor on your system. For mine this is one of: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
self.ex_editor   =  r&amp;quot;leafpad&amp;quot;    # linux and pi&lt;br /&gt;
&lt;br /&gt;
self.ex_editor   =  r&amp;quot;D:\apps\Notepad++\notepad++.exe&amp;quot; # for windows.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is set up to auto switch between the two os to make copying the whole program back and forth between the windows and linux a bit easier.&lt;br /&gt;
&lt;br /&gt;
*Now when you run it the button &amp;lt;Edit Parms&amp;gt; should let you edit the parameters.py file.  Edit it and save.&lt;br /&gt;
&lt;br /&gt;
*Hit the &amp;lt;Restart&amp;gt; button.  In a flash the program should restart with the new parameters.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
..... more here soon ......&lt;br /&gt;
&lt;br /&gt;
= Notes on the Code =&lt;br /&gt;
&lt;br /&gt;
In some ways I am proud of the code, it was sometimes a slog, and I had to learn a lot of Python to get it going.  On the other hand it kind of sucks, it has lots of dead code, ass backwards was of doing things, poor naming...... There is also a good bit of code on features that I am adding, but that is unfinished.  Until I loose interest in it it will probably improve.  However, adding features is more part of the life of a programmer than polishing old features; making something better that seems good enough is not always the priority it should be.  If you do not like it, mostly keep it to yourself unless it is accompanied by an offer to improve it.  I do not need ideas, I need time.  That said if you think you have a helpful comment contact me, my page will tell you how: [[User:Russ_hensel]]&lt;br /&gt;
&lt;br /&gt;
= Design =&lt;br /&gt;
&lt;br /&gt;
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 ).&lt;br /&gt;
&lt;br /&gt;
see: [[Python Smart Terminal Technical]]&lt;br /&gt;
&lt;br /&gt;
= Customizing/Extending =&lt;br /&gt;
&lt;br /&gt;
Simple customization may be done simply by changing the parameter file, see: [[Smart Terminal Parameter Examples]]  If you want to add code that can be done by messing with any of the source code ( not recommended ) or by programming an extension, see:  [[Python Smart Terminal Technical]] and [[Writing You Own Extensions to SmartTerminal]]&lt;br /&gt;
&lt;br /&gt;
= Additional Info =&lt;br /&gt;
&lt;br /&gt;
*Click on the category smart terminal below ( and perhaps the others as well )&lt;br /&gt;
*For a graphing ( plotting ) application that is a companion to this see [[Python Smart Terminal Graph]]&lt;br /&gt;
*[[Writing You Own Extensions to SmartTerminal]]&lt;br /&gt;
*[[Debugging the Smart Terminal]] &lt;br /&gt;
*[[Smart Terminal as Smart Data Logger]]  obsolete, gone, may come back.&lt;br /&gt;
*[[Smart Terminal GUI]]&lt;br /&gt;
*[[GreenHouse Monitor Program]]&lt;br /&gt;
*[[Smart Terminal Parameter Examples]]&lt;br /&gt;
*[[Python Desk Top Applications]]&lt;br /&gt;
*[ https://github.com/russ-hensel/python_smart_terminal python_smart_terminal at git hub]&lt;br /&gt;
*[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.&lt;br /&gt;
&lt;br /&gt;
[[Category:Python Projects]] [[category:Python]]  [[Category:Arduino/RaspberryPi]] [[Category:SmartTerminal]] [[Category:Serial Communications]]&lt;/div&gt;</summary>
		<author><name>Russ hensel</name></author>
		
	</entry>
	<entry>
		<id>http://www.opencircuits.com/index.php?title=Python_Smart_Terminal&amp;diff=88218</id>
		<title>Python Smart Terminal</title>
		<link rel="alternate" type="text/html" href="http://www.opencircuits.com/index.php?title=Python_Smart_Terminal&amp;diff=88218"/>
		<updated>2022-08-28T15:24:46Z</updated>

		<summary type="html">&lt;p&gt;Russ hensel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Why this Terminal =&lt;br /&gt;
&lt;br /&gt;
This terminal has a variety of uses, most are focused on interaction with&lt;br /&gt;
micro controller projects where ASCII data is exchanged, typically with messages&lt;br /&gt;
terminated with a newline or carrige return ( typical for most Arduino projects).&lt;br /&gt;
&lt;br /&gt;
It is also intended for those with a minimal understanding of Python ( required skill&lt;br /&gt;
ranges from the vary basic to familiarity with multi-threaded applications ).&lt;br /&gt;
&lt;br /&gt;
Its repository includes several examples of projects where the interaction is&lt;br /&gt;
either with a PC ( windows, mac, or Linux ) or a raspberry pi ( Linux ).&lt;br /&gt;
&lt;br /&gt;
Applications may be set up so control of the Arduino is manual, or entirely&lt;br /&gt;
automated.&lt;br /&gt;
&lt;br /&gt;
If this is the case there are many ways to use it:&lt;br /&gt;
&lt;br /&gt;
    * Base Case&lt;br /&gt;
        Use as a replacement for an arduino serial monitor.&lt;br /&gt;
        For this case there is not much point unless you use it&lt;br /&gt;
        as a stepping stone to more advanced use.&lt;br /&gt;
        One nice feature is multiple places for user input, each&lt;br /&gt;
        of which is remembed untill changed.&lt;br /&gt;
        ( note: I do not have a graphing module for this case though&lt;br /&gt;
        one could be added. )&lt;br /&gt;
&lt;br /&gt;
    * Base Case Plus&lt;br /&gt;
        Typically the microcontroller is used with a small number of command&lt;br /&gt;
        strings, typically just a few letters, and in complicated cases more&lt;br /&gt;
        complicated strings.  The terminal can be set up with these preloaded&lt;br /&gt;
        and with a button that &amp;quot;documents&amp;quot; their use.  This can be very nice for&lt;br /&gt;
        debugging or manually controlled projects.&lt;br /&gt;
&lt;br /&gt;
    * Automatic modes&lt;br /&gt;
        The automatic mode implements the &amp;quot;Base Case Plus&amp;quot; but there is additional&lt;br /&gt;
        code running in another thread that makes the entire operation automatic&lt;br /&gt;
        and is intened for projects that juse &amp;quot;run&amp;quot;.  In my case all these projects&lt;br /&gt;
        are used with a raspberry pi plus arduino.  This typically gives the&lt;br /&gt;
        project&lt;br /&gt;
            - high speed response in the arduino code ( micro second )&lt;br /&gt;
            - internet access wifi and cat5&lt;br /&gt;
            - bluetooth support&lt;br /&gt;
            - Python and other high level program support&lt;br /&gt;
            - Graphical interface support&lt;br /&gt;
            - HTTP server support&lt;br /&gt;
            - Email access&lt;br /&gt;
            - Remote terminal suport -- either Desktop GUI or ssh terminal&lt;br /&gt;
&lt;br /&gt;
        I have exaple code for these applications included in the repository&lt;br /&gt;
        that I have completed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Goal =&lt;br /&gt;
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]]&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
This program is designed to be:&lt;br /&gt;
*Easily configurable through a configuration file parameters.py&lt;br /&gt;
*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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
See the graphical user interface here ( with screen shot ): [[Smart Terminal GUI]]&lt;br /&gt;
&lt;br /&gt;
This application is also part of a family of applications see the category below: Python Projects.&lt;br /&gt;
&lt;br /&gt;
This is an article started by Russ Hensel, see &amp;quot;http://www.opencircuits.com/index.php?title=Russ_hensel#About My Articles&amp;quot; About My Articles for a bit of info.&lt;br /&gt;
&lt;br /&gt;
'''Who should use this program and How:'''&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;	&lt;br /&gt;
|Who&lt;br /&gt;
|What&lt;br /&gt;
|How&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|Person with little programming experience, no interest in Python.  Looking for download and install.&lt;br /&gt;
|Probably should use another program.&lt;br /&gt;
|Not well suited to use this, I do not plan to fix this.&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|Programming microcontrollers in text based language, willing to install or has Python installed.&lt;br /&gt;
|Run the basic program.  Customize in fairly minor ways.&lt;br /&gt;
|Edit the parameter file to configure the terminal.  Could use processing extensions written by others.&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|Modest Python experience&lt;br /&gt;
|Modify all over the place, monitor equipment, save data to database ......&lt;br /&gt;
|Program should be well documented with an API, sample extensions.  Code changes localized ( now ) to one class plus the parameter file.&lt;br /&gt;
&amp;lt;!--------------------------------&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|ddd&lt;br /&gt;
|eee&lt;br /&gt;
|fff&lt;br /&gt;
&amp;lt;!--------------------------------&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;!--------------------------------&lt;br /&gt;
&amp;lt;!--------------------------------&lt;br /&gt;
&amp;lt;!--------------------------------&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= What/Why =&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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 can 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.  &lt;br /&gt;
&lt;br /&gt;
Currently the terminal waits for a carriage return ( or line fead ) 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. &lt;br /&gt;
&lt;br /&gt;
So what are the features?&lt;br /&gt;
&lt;br /&gt;
* Free open source&lt;br /&gt;
* Runs across OSs Linux ( inc '''Raspberry Pi''' ), Mac or Windows &lt;br /&gt;
* Python&lt;br /&gt;
* &amp;quot;RS232&amp;quot; all standard baud rates etc.&lt;br /&gt;
* Easily adjusted serial communications parameters&lt;br /&gt;
* Multiple, preloaded with data entry fields.&lt;br /&gt;
* Clear ( erase ) receive area for removal of clutter.&lt;br /&gt;
* Copy all or part of receive area.&lt;br /&gt;
* Programmable&lt;br /&gt;
* I have extensions to work with specific arduino programs.  These:  Run a clock, Monitor a Green House, Monitor a root cellar, Monitor a Well.&lt;br /&gt;
* Database Interface ( now MYSQL can connect across the network )&lt;br /&gt;
* Email interface.&lt;br /&gt;
* Easily Modified or Replaceable GUI&lt;br /&gt;
* Parameter file for wide range of modifications of program behavior.&lt;br /&gt;
* Easy to run multiple instances with different parameters.&lt;br /&gt;
* Uses standard Python logging class.&lt;br /&gt;
* Includes some advanced data logging features in addition to database data logging.&lt;br /&gt;
* For more on the features see [[SmartTerminal Features]]&lt;br /&gt;
&lt;br /&gt;
Limits:&lt;br /&gt;
&lt;br /&gt;
* Polls the comm port at 10 to 100 hz.  So full lines ( ending with carriage return &amp;lt;cr&amp;gt; ) cannot come in too fast.  This is theory I have not pushed the terminal.&lt;br /&gt;
* One instance of the program per com port at a time, but easy to run multiple instances.&lt;br /&gt;
&lt;br /&gt;
What would you like to see in the program or documentation? Email me.&lt;br /&gt;
&lt;br /&gt;
A much earlier version of this terminal was described in my instructable [[http://www.instructables.com/id/Python-Terminal-for-Cheap-Pi-Arduino-Connection/ Python Terminal for Cheap Pi Arduino Connection]]  It may have some information that is useful, but the program has grown a lot since then.&lt;br /&gt;
&lt;br /&gt;
= Installation =&lt;br /&gt;
This program is intended for those who at least occasionally develop in Python.  I expect that they already run some things in Python and will just add this as an additional project.  There is no install program you just download the files, place where you keep your projects and run.  A bit more later in this section.&lt;br /&gt;
&lt;br /&gt;
== My Environment/Your Environment ==&lt;br /&gt;
&lt;br /&gt;
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'''&lt;br /&gt;
  &lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Download ==&lt;br /&gt;
&lt;br /&gt;
Code at GitHub, see [[https://github.com/russ-hensel/python_smart_terminal Code at GitHub]] ( it is Python and you can run directly from the source ) Email me if you have issues ( use this link [[User:Russ_hensel]] ).&lt;br /&gt;
You will get a zip file, unzip it and you should get:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
     .... whatever --|&lt;br /&gt;
                     |&lt;br /&gt;
                     |-- smart_terminal --| -&amp;gt; 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 )&lt;br /&gt;
                                          |    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&lt;br /&gt;
                                          |    get your own log files ... all typically named xxx.py_log &lt;br /&gt;
                                          | -- images -&amp;gt; image files, mostly screen shots, icons... or what ever, not important for the code.&lt;br /&gt;
                                          | -- sounds -&amp;gt; wav files used for the deer me extension, my attempt to scare deer.&lt;br /&gt;
                                          | -- wiki_etc -&amp;gt; various files documenting program, including at least some of the material from this wiki &lt;br /&gt;
&lt;br /&gt;
Put them in your system making &amp;quot;....whatever&amp;quot; anything convenient for your Python ( that is move the files to where you keep your Python source ).  &lt;br /&gt;
&lt;br /&gt;
Note that there may be a certain amount of left over, dead code, in the directory I am cleaning out bit by bit, someday it may be nice and neat.  For now if you want to tinker look at the design info below first.&lt;br /&gt;
&lt;br /&gt;
== Run ==&lt;br /&gt;
&lt;br /&gt;
Run it until it stops complaining about dependencies ( in the console ), after that ( and perhaps even before ) the GUI should come up.  You are installed.&lt;br /&gt;
&lt;br /&gt;
I have run the program on both Windows 10 and Rasperian on a RPi.  It should work in most OS's.  Let me know about issues.&lt;br /&gt;
&lt;br /&gt;
Some parts of the program think that mySql is available.  It should run fine without it ( there will be a message or two in the console ), untill you try to use the database then it is not so gracious.  Straight ahead use as a terminal does not use the database.&lt;br /&gt;
&lt;br /&gt;
= Configure to Run =&lt;br /&gt;
&lt;br /&gt;
== Basic ==&lt;br /&gt;
&lt;br /&gt;
Basic configuration of comm parameters like port, baud rate .... is all done in a file called parameters.py.  It seemed easier to simply use a Python text file instead of some other format like an ini file.  Pretty much all the file does is set instance variables in itself.  It is used by the program controller ( smart_terminal.SmartTerminal ) to create an instance of Parameters and then the values can be used.  Save the original ( parameters.py, maybe I will include a backup maybe not ) in case you mess it up too much.&lt;br /&gt;
&lt;br /&gt;
I have made yet another pass to clean up and comment the code in parameters.  Let me know if you have issues.  You should understand some values are being phased out but may still have some implementation and some may be coming in and have little or no implementation.  The comments should let you identify these situations.&lt;br /&gt;
&lt;br /&gt;
Parameters starts out with some &amp;quot;meta&amp;quot; parameters.  These are defined early in the creation of the objects and may effect other values.  In any case you can always define a value twice, the last one always wins.  The most important meta parameter is mode, you should not change it from self.mode = &amp;quot;Terminal&amp;quot; unless you understand the implications or do not mind going on a ride.&lt;br /&gt;
&lt;br /&gt;
All the com port values are defined in pretty much one place, find it ( say search on &amp;quot;baud&amp;quot; ) an change it to what you need.&lt;br /&gt;
&lt;br /&gt;
== Command Line Arguments ==&lt;br /&gt;
&lt;br /&gt;
If you run with the command line parameters=paramaters_b then after the regular parameters file runs, then the system looks for parameters_b.py and uses that to override values that you might want to tweak ( or completely redo.  There are two examples in the directory follow the pattern in them and you should be fine ).&lt;br /&gt;
&lt;br /&gt;
This can be especially useful if you want to run two copies connected to different ports and possibly running in different modes.  In this case it is also nice to change ( its in parameters ) the '''icon''' and '''color''' for each instance of the program.  You can write or use the little bat file to start them ( although this leaves a dos console hanging around )  Command line arguments can also be placed in shortcuts.  In either case they may take some tweaking to run in/from your file locations.&lt;br /&gt;
&lt;br /&gt;
The above mostly applies to Windows, but the program run fine with Linux ( including the Raspberry Pi ) and I suppose the Mac.  Of course the .bat file and shortcuts will not work, but similar facilities exist in the other OSs.&lt;br /&gt;
&lt;br /&gt;
== Running It ==&lt;br /&gt;
&lt;br /&gt;
When you run it it should open a windows a lot like the picture [[Smart Terminal GUI]].  Errors may show up in your Python console or the log file ( look in parameters.py for the name of the log file, typically self.pylogging_fn      = &amp;quot;smart_terminal.py_log&amp;quot; ).  The most likely errors will point to missing Python modules like pyserial.  You should install with pip ( or conda if using Spyder ).  Let me know how it goes.&lt;br /&gt;
&lt;br /&gt;
Normally the terminal does not open the com port until you press the &amp;lt;Open&amp;gt; button.  The parameters are displayed in the GUI if you do not like them ( for example when you press the &amp;lt;open&amp;gt; button the port open status changes to &amp;quot;open failed&amp;quot;, not the desired &amp;quot;open&amp;quot; ) you can shutdown, edit parameters.py and restart.  There is a simpler way.&lt;br /&gt;
&lt;br /&gt;
*First configure parameters.py to know the name of a text editor on your system. For mine this is one of: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
self.ex_editor   =  r&amp;quot;leafpad&amp;quot;    # linux and pi&lt;br /&gt;
&lt;br /&gt;
self.ex_editor   =  r&amp;quot;D:\apps\Notepad++\notepad++.exe&amp;quot; # for windows.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is set up to auto switch between the two os to make copying the whole program back and forth between the windows and linux a bit easier.&lt;br /&gt;
&lt;br /&gt;
*Now when you run it the button &amp;lt;Edit Parms&amp;gt; should let you edit the parameters.py file.  Edit it and save.&lt;br /&gt;
&lt;br /&gt;
*Hit the &amp;lt;Restart&amp;gt; button.  In a flash the program should restart with the new parameters.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
..... more here soon ......&lt;br /&gt;
&lt;br /&gt;
= Notes on the Code =&lt;br /&gt;
&lt;br /&gt;
In some ways I am proud of the code, it was sometimes a slog, and I had to learn a lot of Python to get it going.  On the other hand it kind of sucks, it has lots of dead code, ass backwards was of doing things, poor naming...... There is also a good bit of code on features that I am adding, but that is unfinished.  Until I loose interest in it it will probably improve.  However, adding features is more part of the life of a programmer than polishing old features; making something better that seems good enough is not always the priority it should be.  If you do not like it, mostly keep it to yourself unless it is accompanied by an offer to improve it.  I do not need ideas, I need time.  That said if you think you have a helpful comment contact me, my page will tell you how: [[User:Russ_hensel]]&lt;br /&gt;
&lt;br /&gt;
= Design =&lt;br /&gt;
&lt;br /&gt;
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 ).&lt;br /&gt;
&lt;br /&gt;
see: [[Python Smart Terminal Technical]]&lt;br /&gt;
&lt;br /&gt;
= Customizing/Extending =&lt;br /&gt;
&lt;br /&gt;
Simple customization may be done simply by changing the parameter file, see: [[Smart Terminal Parameter Examples]]  If you want to add code that can be done by messing with any of the source code ( not recommended ) or by programming an extension, see:  [[Python Smart Terminal Technical]] and [[Writing You Own Extensions to SmartTerminal]]&lt;br /&gt;
&lt;br /&gt;
= Additional Info =&lt;br /&gt;
&lt;br /&gt;
*Click on the category smart terminal below ( and perhaps the others as well )&lt;br /&gt;
*For a graphing ( plotting ) application that is a companion to this see [[Python Smart Terminal Graph]]&lt;br /&gt;
*[[Writing You Own Extensions to SmartTerminal]]&lt;br /&gt;
*[[Debugging the Smart Terminal]] &lt;br /&gt;
*[[Smart Terminal as Smart Data Logger]]  obsolete, gone, may come back.&lt;br /&gt;
*[[Smart Terminal GUI]]&lt;br /&gt;
*[[GreenHouse Monitor Program]]&lt;br /&gt;
*[[Smart Terminal Parameter Examples]]&lt;br /&gt;
*[[Python Desk Top Applications]]&lt;br /&gt;
*[ https://github.com/russ-hensel/python_smart_terminal python_smart_terminal at git hub]&lt;br /&gt;
*[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.&lt;br /&gt;
&lt;br /&gt;
[[Category:Python Projects]] [[category:Python]]  [[Category:Arduino/RaspberryPi]] [[Category:SmartTerminal]] [[Category:Serial Communications]]&lt;/div&gt;</summary>
		<author><name>Russ hensel</name></author>
		
	</entry>
	<entry>
		<id>http://www.opencircuits.com/index.php?title=SmartTerminal_Features&amp;diff=88216</id>
		<title>SmartTerminal Features</title>
		<link rel="alternate" type="text/html" href="http://www.opencircuits.com/index.php?title=SmartTerminal_Features&amp;diff=88216"/>
		<updated>2022-08-25T16:34:53Z</updated>

		<summary type="html">&lt;p&gt;Russ hensel: /* Send Suffix */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= General =&lt;br /&gt;
&lt;br /&gt;
Some [[Category:Draft]] of the features are fairly obvious from the GUI ( see [[Smart Terminal GUI]] ) some are a bit more hidden.  In any case this page will document some of the features in more detail.  Seems I have not gotten around to this so stay tuned or email me.  As of Sept 2018 I am working on this to monitor my well.  but in 2022 this is still a draft.&lt;br /&gt;
&lt;br /&gt;
= Source Code =&lt;br /&gt;
&lt;br /&gt;
Application is free open source.  I update github from time to time, but email me to see if I have some new improved stuff, I work on it from time to time in episodes.  Code is now Python 3.5, waiting for Raspberry Pi to fully go to 3.6 so I can use f strings.  Compared to most github projects I have fairly large amounts of documentation ( mostly at this site ).&lt;br /&gt;
&lt;br /&gt;
= GUI =&lt;br /&gt;
uses Tkinter&lt;br /&gt;
&lt;br /&gt;
== Modify GUI from Parameters ==&lt;br /&gt;
see: '''[[Smart Terminal Parameter Examples]]''' and '''[[Writing You Own Extensions to SmartTerminal]]'''&lt;br /&gt;
&lt;br /&gt;
= Access to Parameters and Log File =&lt;br /&gt;
&lt;br /&gt;
The application must of course know what/where its parameter and log file are.  So it can also help you look at and edit the files.  For this to work you need an editing program installed on your computer.  For my windows computer this is Notepad++ ( &amp;quot;D:\apps\Notepad++\notepad++.exe&amp;quot; ).  Then in parameters you need to set the parameter something like this:  '''self.ex_editor = r&amp;quot;D:\apps\Notepad++\notepad++.exe'''&amp;quot;.  Smart terminal will then open the appropriate files from the buttons on the GUI.    &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= A Second Thread =&lt;br /&gt;
&lt;br /&gt;
When a GUI application does something that takes a fair amount of time ( several seconds or more ) the application can become unresponsive until that task is over.  For this reason the SmartTermainl runs a second thread for long running background tasks.&lt;br /&gt;
&lt;br /&gt;
= Send Suffix =&lt;br /&gt;
It is assumed that messages end with a special character, this character may be set in the parameter file.&lt;br /&gt;
&lt;br /&gt;
= Port Enumeration =&lt;br /&gt;
&lt;br /&gt;
= Port Detection and Connection =&lt;br /&gt;
&lt;br /&gt;
= GUI Extensions =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Processing Extensions =&lt;br /&gt;
&lt;br /&gt;
These are features beyond terminal features.&lt;br /&gt;
&lt;br /&gt;
* Data scaling and filtering&lt;br /&gt;
* Database interface&lt;br /&gt;
* Python Logging&lt;br /&gt;
* Email Interface &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Application Extensions =&lt;br /&gt;
&lt;br /&gt;
I have written 4 Application as extension to the SmartTerminal that are intended to run on a Raspberry Pi in conjunction with an Arduino.  These are in addition to the basic, parameter driven Smart terminal.&lt;br /&gt;
&lt;br /&gt;
*  A servo motor based clock&lt;br /&gt;
&lt;br /&gt;
*  An environmental monitor for a Green House features multiple temperature sensors, and a humidity sensor.  Filters data then logs to a Marina Db ( Open sourced MySql ).  Has email interface for extreme values.  Companion applications:  arduino component, Python Graphing component, Application to check raspberry pi status remotely.&lt;br /&gt;
&lt;br /&gt;
*  Environmental monitor similar to the above, but for a Root Cellar.&lt;br /&gt;
&lt;br /&gt;
*  Environmental monitor similar to the above, but for a Well.&lt;br /&gt;
&lt;br /&gt;
= draft material will be deleted =&lt;br /&gt;
&lt;br /&gt;
* Free open source&lt;br /&gt;
* Runs across OSs Linux ( inc '''Raspberry Pi''' ), Mac or Windows &lt;br /&gt;
* Python&lt;br /&gt;
* &amp;quot;RS232&amp;quot; all standard baud rates etc.&lt;br /&gt;
* Easily adjusted serial communications parameters&lt;br /&gt;
* Multiple, preloaded with data entry fields.&lt;br /&gt;
* Clear ( erase ) receive area for removal of clutter.&lt;br /&gt;
* Copy all or part of receive area.&lt;br /&gt;
* Programmable&lt;br /&gt;
* I have extensions to work with specific arduino programs.  These:  Run a clock, Monitor a Green House, Monitor a root cellar, Monitor a Well.&lt;br /&gt;
* Database Interface ( now MYSQL can connect across the network )&lt;br /&gt;
* Email interface.&lt;br /&gt;
* Easily Modified or Replaceable GUI&lt;br /&gt;
* Parameter file for wide range of modifications of program behavior.&lt;br /&gt;
* Easy to run multiple instances with different parameters.&lt;br /&gt;
* Uses standard Python logging class.&lt;br /&gt;
* Includes some advanced data logging features in addition to database data logging.&lt;br /&gt;
* For more on the features see [[SmartTerminal Features]]&lt;br /&gt;
&lt;br /&gt;
Limits:&lt;br /&gt;
&lt;br /&gt;
* Polls the comm port at 10 to 100 hz.  So full lines ( ending with carriage return &amp;lt;cr&amp;gt; ) cannot come in too fast.  This is theory I have not pushed the terminal.&lt;br /&gt;
* One instance of the program per com port at a time, but easy to run multiple instances.&lt;br /&gt;
&lt;br /&gt;
[[Category:Arduino/RaspberryPi]] [[Category:SmartTerminal]]&lt;/div&gt;</summary>
		<author><name>Russ hensel</name></author>
		
	</entry>
	<entry>
		<id>http://www.opencircuits.com/index.php?title=SmartTerminal_Features&amp;diff=88215</id>
		<title>SmartTerminal Features</title>
		<link rel="alternate" type="text/html" href="http://www.opencircuits.com/index.php?title=SmartTerminal_Features&amp;diff=88215"/>
		<updated>2022-08-25T16:33:57Z</updated>

		<summary type="html">&lt;p&gt;Russ hensel: /* Modify GUI from Parameters */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= General =&lt;br /&gt;
&lt;br /&gt;
Some [[Category:Draft]] of the features are fairly obvious from the GUI ( see [[Smart Terminal GUI]] ) some are a bit more hidden.  In any case this page will document some of the features in more detail.  Seems I have not gotten around to this so stay tuned or email me.  As of Sept 2018 I am working on this to monitor my well.  but in 2022 this is still a draft.&lt;br /&gt;
&lt;br /&gt;
= Source Code =&lt;br /&gt;
&lt;br /&gt;
Application is free open source.  I update github from time to time, but email me to see if I have some new improved stuff, I work on it from time to time in episodes.  Code is now Python 3.5, waiting for Raspberry Pi to fully go to 3.6 so I can use f strings.  Compared to most github projects I have fairly large amounts of documentation ( mostly at this site ).&lt;br /&gt;
&lt;br /&gt;
= GUI =&lt;br /&gt;
uses Tkinter&lt;br /&gt;
&lt;br /&gt;
== Modify GUI from Parameters ==&lt;br /&gt;
see: '''[[Smart Terminal Parameter Examples]]''' and '''[[Writing You Own Extensions to SmartTerminal]]'''&lt;br /&gt;
&lt;br /&gt;
= Access to Parameters and Log File =&lt;br /&gt;
&lt;br /&gt;
The application must of course know what/where its parameter and log file are.  So it can also help you look at and edit the files.  For this to work you need an editing program installed on your computer.  For my windows computer this is Notepad++ ( &amp;quot;D:\apps\Notepad++\notepad++.exe&amp;quot; ).  Then in parameters you need to set the parameter something like this:  '''self.ex_editor = r&amp;quot;D:\apps\Notepad++\notepad++.exe'''&amp;quot;.  Smart terminal will then open the appropriate files from the buttons on the GUI.    &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= A Second Thread =&lt;br /&gt;
&lt;br /&gt;
When a GUI application does something that takes a fair amount of time ( several seconds or more ) the application can become unresponsive until that task is over.  For this reason the SmartTermainl runs a second thread for long running background tasks.&lt;br /&gt;
&lt;br /&gt;
= Send Suffix =&lt;br /&gt;
&lt;br /&gt;
= Port Enumeration =&lt;br /&gt;
&lt;br /&gt;
= Port Detection and Connection =&lt;br /&gt;
&lt;br /&gt;
= GUI Extensions =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Processing Extensions =&lt;br /&gt;
&lt;br /&gt;
These are features beyond terminal features.&lt;br /&gt;
&lt;br /&gt;
* Data scaling and filtering&lt;br /&gt;
* Database interface&lt;br /&gt;
* Python Logging&lt;br /&gt;
* Email Interface &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Application Extensions =&lt;br /&gt;
&lt;br /&gt;
I have written 4 Application as extension to the SmartTerminal that are intended to run on a Raspberry Pi in conjunction with an Arduino.  These are in addition to the basic, parameter driven Smart terminal.&lt;br /&gt;
&lt;br /&gt;
*  A servo motor based clock&lt;br /&gt;
&lt;br /&gt;
*  An environmental monitor for a Green House features multiple temperature sensors, and a humidity sensor.  Filters data then logs to a Marina Db ( Open sourced MySql ).  Has email interface for extreme values.  Companion applications:  arduino component, Python Graphing component, Application to check raspberry pi status remotely.&lt;br /&gt;
&lt;br /&gt;
*  Environmental monitor similar to the above, but for a Root Cellar.&lt;br /&gt;
&lt;br /&gt;
*  Environmental monitor similar to the above, but for a Well.&lt;br /&gt;
&lt;br /&gt;
= draft material will be deleted =&lt;br /&gt;
&lt;br /&gt;
* Free open source&lt;br /&gt;
* Runs across OSs Linux ( inc '''Raspberry Pi''' ), Mac or Windows &lt;br /&gt;
* Python&lt;br /&gt;
* &amp;quot;RS232&amp;quot; all standard baud rates etc.&lt;br /&gt;
* Easily adjusted serial communications parameters&lt;br /&gt;
* Multiple, preloaded with data entry fields.&lt;br /&gt;
* Clear ( erase ) receive area for removal of clutter.&lt;br /&gt;
* Copy all or part of receive area.&lt;br /&gt;
* Programmable&lt;br /&gt;
* I have extensions to work with specific arduino programs.  These:  Run a clock, Monitor a Green House, Monitor a root cellar, Monitor a Well.&lt;br /&gt;
* Database Interface ( now MYSQL can connect across the network )&lt;br /&gt;
* Email interface.&lt;br /&gt;
* Easily Modified or Replaceable GUI&lt;br /&gt;
* Parameter file for wide range of modifications of program behavior.&lt;br /&gt;
* Easy to run multiple instances with different parameters.&lt;br /&gt;
* Uses standard Python logging class.&lt;br /&gt;
* Includes some advanced data logging features in addition to database data logging.&lt;br /&gt;
* For more on the features see [[SmartTerminal Features]]&lt;br /&gt;
&lt;br /&gt;
Limits:&lt;br /&gt;
&lt;br /&gt;
* Polls the comm port at 10 to 100 hz.  So full lines ( ending with carriage return &amp;lt;cr&amp;gt; ) cannot come in too fast.  This is theory I have not pushed the terminal.&lt;br /&gt;
* One instance of the program per com port at a time, but easy to run multiple instances.&lt;br /&gt;
&lt;br /&gt;
[[Category:Arduino/RaspberryPi]] [[Category:SmartTerminal]]&lt;/div&gt;</summary>
		<author><name>Russ hensel</name></author>
		
	</entry>
	<entry>
		<id>http://www.opencircuits.com/index.php?title=SmartTerminal_Features&amp;diff=88214</id>
		<title>SmartTerminal Features</title>
		<link rel="alternate" type="text/html" href="http://www.opencircuits.com/index.php?title=SmartTerminal_Features&amp;diff=88214"/>
		<updated>2022-08-25T16:33:34Z</updated>

		<summary type="html">&lt;p&gt;Russ hensel: /* Appearance */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= General =&lt;br /&gt;
&lt;br /&gt;
Some [[Category:Draft]] of the features are fairly obvious from the GUI ( see [[Smart Terminal GUI]] ) some are a bit more hidden.  In any case this page will document some of the features in more detail.  Seems I have not gotten around to this so stay tuned or email me.  As of Sept 2018 I am working on this to monitor my well.  but in 2022 this is still a draft.&lt;br /&gt;
&lt;br /&gt;
= Source Code =&lt;br /&gt;
&lt;br /&gt;
Application is free open source.  I update github from time to time, but email me to see if I have some new improved stuff, I work on it from time to time in episodes.  Code is now Python 3.5, waiting for Raspberry Pi to fully go to 3.6 so I can use f strings.  Compared to most github projects I have fairly large amounts of documentation ( mostly at this site ).&lt;br /&gt;
&lt;br /&gt;
= GUI =&lt;br /&gt;
uses Tkinter&lt;br /&gt;
&lt;br /&gt;
= Modify GUI from Parameters =&lt;br /&gt;
see: '''[[Smart Terminal Parameter Examples]]''' and '''[[Writing You Own Extensions to SmartTerminal]]'''&lt;br /&gt;
&lt;br /&gt;
= Access to Parameters and Log File =&lt;br /&gt;
&lt;br /&gt;
The application must of course know what/where its parameter and log file are.  So it can also help you look at and edit the files.  For this to work you need an editing program installed on your computer.  For my windows computer this is Notepad++ ( &amp;quot;D:\apps\Notepad++\notepad++.exe&amp;quot; ).  Then in parameters you need to set the parameter something like this:  '''self.ex_editor = r&amp;quot;D:\apps\Notepad++\notepad++.exe'''&amp;quot;.  Smart terminal will then open the appropriate files from the buttons on the GUI.    &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= A Second Thread =&lt;br /&gt;
&lt;br /&gt;
When a GUI application does something that takes a fair amount of time ( several seconds or more ) the application can become unresponsive until that task is over.  For this reason the SmartTermainl runs a second thread for long running background tasks.&lt;br /&gt;
&lt;br /&gt;
= Send Suffix =&lt;br /&gt;
&lt;br /&gt;
= Port Enumeration =&lt;br /&gt;
&lt;br /&gt;
= Port Detection and Connection =&lt;br /&gt;
&lt;br /&gt;
= GUI Extensions =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Processing Extensions =&lt;br /&gt;
&lt;br /&gt;
These are features beyond terminal features.&lt;br /&gt;
&lt;br /&gt;
* Data scaling and filtering&lt;br /&gt;
* Database interface&lt;br /&gt;
* Python Logging&lt;br /&gt;
* Email Interface &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Application Extensions =&lt;br /&gt;
&lt;br /&gt;
I have written 4 Application as extension to the SmartTerminal that are intended to run on a Raspberry Pi in conjunction with an Arduino.  These are in addition to the basic, parameter driven Smart terminal.&lt;br /&gt;
&lt;br /&gt;
*  A servo motor based clock&lt;br /&gt;
&lt;br /&gt;
*  An environmental monitor for a Green House features multiple temperature sensors, and a humidity sensor.  Filters data then logs to a Marina Db ( Open sourced MySql ).  Has email interface for extreme values.  Companion applications:  arduino component, Python Graphing component, Application to check raspberry pi status remotely.&lt;br /&gt;
&lt;br /&gt;
*  Environmental monitor similar to the above, but for a Root Cellar.&lt;br /&gt;
&lt;br /&gt;
*  Environmental monitor similar to the above, but for a Well.&lt;br /&gt;
&lt;br /&gt;
= draft material will be deleted =&lt;br /&gt;
&lt;br /&gt;
* Free open source&lt;br /&gt;
* Runs across OSs Linux ( inc '''Raspberry Pi''' ), Mac or Windows &lt;br /&gt;
* Python&lt;br /&gt;
* &amp;quot;RS232&amp;quot; all standard baud rates etc.&lt;br /&gt;
* Easily adjusted serial communications parameters&lt;br /&gt;
* Multiple, preloaded with data entry fields.&lt;br /&gt;
* Clear ( erase ) receive area for removal of clutter.&lt;br /&gt;
* Copy all or part of receive area.&lt;br /&gt;
* Programmable&lt;br /&gt;
* I have extensions to work with specific arduino programs.  These:  Run a clock, Monitor a Green House, Monitor a root cellar, Monitor a Well.&lt;br /&gt;
* Database Interface ( now MYSQL can connect across the network )&lt;br /&gt;
* Email interface.&lt;br /&gt;
* Easily Modified or Replaceable GUI&lt;br /&gt;
* Parameter file for wide range of modifications of program behavior.&lt;br /&gt;
* Easy to run multiple instances with different parameters.&lt;br /&gt;
* Uses standard Python logging class.&lt;br /&gt;
* Includes some advanced data logging features in addition to database data logging.&lt;br /&gt;
* For more on the features see [[SmartTerminal Features]]&lt;br /&gt;
&lt;br /&gt;
Limits:&lt;br /&gt;
&lt;br /&gt;
* Polls the comm port at 10 to 100 hz.  So full lines ( ending with carriage return &amp;lt;cr&amp;gt; ) cannot come in too fast.  This is theory I have not pushed the terminal.&lt;br /&gt;
* One instance of the program per com port at a time, but easy to run multiple instances.&lt;br /&gt;
&lt;br /&gt;
[[Category:Arduino/RaspberryPi]] [[Category:SmartTerminal]]&lt;/div&gt;</summary>
		<author><name>Russ hensel</name></author>
		
	</entry>
	<entry>
		<id>http://www.opencircuits.com/index.php?title=SmartTerminal_Features&amp;diff=88213</id>
		<title>SmartTerminal Features</title>
		<link rel="alternate" type="text/html" href="http://www.opencircuits.com/index.php?title=SmartTerminal_Features&amp;diff=88213"/>
		<updated>2022-08-25T16:32:54Z</updated>

		<summary type="html">&lt;p&gt;Russ hensel: /* Modify GUI from Parameters */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= General =&lt;br /&gt;
&lt;br /&gt;
Some [[Category:Draft]] of the features are fairly obvious from the GUI ( see [[Smart Terminal GUI]] ) some are a bit more hidden.  In any case this page will document some of the features in more detail.  Seems I have not gotten around to this so stay tuned or email me.  As of Sept 2018 I am working on this to monitor my well.  but in 2022 this is still a draft.&lt;br /&gt;
&lt;br /&gt;
= Source Code =&lt;br /&gt;
&lt;br /&gt;
Application is free open source.  I update github from time to time, but email me to see if I have some new improved stuff, I work on it from time to time in episodes.  Code is now Python 3.5, waiting for Raspberry Pi to fully go to 3.6 so I can use f strings.  Compared to most github projects I have fairly large amounts of documentation ( mostly at this site ).&lt;br /&gt;
&lt;br /&gt;
= Appearance =&lt;br /&gt;
&lt;br /&gt;
= Modify GUI from Parameters =&lt;br /&gt;
see: '''[[Smart Terminal Parameter Examples]]''' and '''[[Writing You Own Extensions to SmartTerminal]]'''&lt;br /&gt;
&lt;br /&gt;
= Access to Parameters and Log File =&lt;br /&gt;
&lt;br /&gt;
The application must of course know what/where its parameter and log file are.  So it can also help you look at and edit the files.  For this to work you need an editing program installed on your computer.  For my windows computer this is Notepad++ ( &amp;quot;D:\apps\Notepad++\notepad++.exe&amp;quot; ).  Then in parameters you need to set the parameter something like this:  '''self.ex_editor = r&amp;quot;D:\apps\Notepad++\notepad++.exe'''&amp;quot;.  Smart terminal will then open the appropriate files from the buttons on the GUI.    &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= A Second Thread =&lt;br /&gt;
&lt;br /&gt;
When a GUI application does something that takes a fair amount of time ( several seconds or more ) the application can become unresponsive until that task is over.  For this reason the SmartTermainl runs a second thread for long running background tasks.&lt;br /&gt;
&lt;br /&gt;
= Send Suffix =&lt;br /&gt;
&lt;br /&gt;
= Port Enumeration =&lt;br /&gt;
&lt;br /&gt;
= Port Detection and Connection =&lt;br /&gt;
&lt;br /&gt;
= GUI Extensions =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Processing Extensions =&lt;br /&gt;
&lt;br /&gt;
These are features beyond terminal features.&lt;br /&gt;
&lt;br /&gt;
* Data scaling and filtering&lt;br /&gt;
* Database interface&lt;br /&gt;
* Python Logging&lt;br /&gt;
* Email Interface &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Application Extensions =&lt;br /&gt;
&lt;br /&gt;
I have written 4 Application as extension to the SmartTerminal that are intended to run on a Raspberry Pi in conjunction with an Arduino.  These are in addition to the basic, parameter driven Smart terminal.&lt;br /&gt;
&lt;br /&gt;
*  A servo motor based clock&lt;br /&gt;
&lt;br /&gt;
*  An environmental monitor for a Green House features multiple temperature sensors, and a humidity sensor.  Filters data then logs to a Marina Db ( Open sourced MySql ).  Has email interface for extreme values.  Companion applications:  arduino component, Python Graphing component, Application to check raspberry pi status remotely.&lt;br /&gt;
&lt;br /&gt;
*  Environmental monitor similar to the above, but for a Root Cellar.&lt;br /&gt;
&lt;br /&gt;
*  Environmental monitor similar to the above, but for a Well.&lt;br /&gt;
&lt;br /&gt;
= draft material will be deleted =&lt;br /&gt;
&lt;br /&gt;
* Free open source&lt;br /&gt;
* Runs across OSs Linux ( inc '''Raspberry Pi''' ), Mac or Windows &lt;br /&gt;
* Python&lt;br /&gt;
* &amp;quot;RS232&amp;quot; all standard baud rates etc.&lt;br /&gt;
* Easily adjusted serial communications parameters&lt;br /&gt;
* Multiple, preloaded with data entry fields.&lt;br /&gt;
* Clear ( erase ) receive area for removal of clutter.&lt;br /&gt;
* Copy all or part of receive area.&lt;br /&gt;
* Programmable&lt;br /&gt;
* I have extensions to work with specific arduino programs.  These:  Run a clock, Monitor a Green House, Monitor a root cellar, Monitor a Well.&lt;br /&gt;
* Database Interface ( now MYSQL can connect across the network )&lt;br /&gt;
* Email interface.&lt;br /&gt;
* Easily Modified or Replaceable GUI&lt;br /&gt;
* Parameter file for wide range of modifications of program behavior.&lt;br /&gt;
* Easy to run multiple instances with different parameters.&lt;br /&gt;
* Uses standard Python logging class.&lt;br /&gt;
* Includes some advanced data logging features in addition to database data logging.&lt;br /&gt;
* For more on the features see [[SmartTerminal Features]]&lt;br /&gt;
&lt;br /&gt;
Limits:&lt;br /&gt;
&lt;br /&gt;
* Polls the comm port at 10 to 100 hz.  So full lines ( ending with carriage return &amp;lt;cr&amp;gt; ) cannot come in too fast.  This is theory I have not pushed the terminal.&lt;br /&gt;
* One instance of the program per com port at a time, but easy to run multiple instances.&lt;br /&gt;
&lt;br /&gt;
[[Category:Arduino/RaspberryPi]] [[Category:SmartTerminal]]&lt;/div&gt;</summary>
		<author><name>Russ hensel</name></author>
		
	</entry>
	<entry>
		<id>http://www.opencircuits.com/index.php?title=GreenHouse_Monitor_Program&amp;diff=88211</id>
		<title>GreenHouse Monitor Program</title>
		<link rel="alternate" type="text/html" href="http://www.opencircuits.com/index.php?title=GreenHouse_Monitor_Program&amp;diff=88211"/>
		<updated>2022-08-25T16:30:11Z</updated>

		<summary type="html">&lt;p&gt;Russ hensel: /* What */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= What =&lt;br /&gt;
This project uses the Python Smart Terminal program to communicate with an arduino and monitor, record, and graph conditions in the green house. The main page for the application is at: '''[[Python Smart Terminal]]''' and it has a category page at '''[[https://opencircuits.com/index.php?title=Category:SmartTerminal Category:SmartTerminal]]''' ).   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is really 2 programs: 1) an arduino program intended to monitor the environment in a green house and 2) its PC side ( often for a Raspberry Pi ) written in Python.  The Arduino has a simple command driven interface.  It is designed to run with [[Python Smart Terminal]] and an extension to it which is added when the terminal is set to the mode = GreenHouse.  Documentation on the construction of a Smart Terminal extension to support the green house monitor and save its data to a csv file are also part of this project and the documentation here.  Another adaptation for the SmartTerminal is described in [[SmartTerminal for Controlino]]&lt;br /&gt;
&lt;br /&gt;
Note that since this was written the SmartTerminal has been updated and its operation and parameter set up have been upgraded and in some ways simplified.  I will be updating this documentation ( hopefully soon Feb 2018 -- did not hapen  ).  Another update the python side of the Green House Monitor used to be ext_process_gh.py but has now been absorbed into ( and is a mode ) in ext_process_env_monitor.py.  This documentation will perhaps be revised at some point to reflect that change.&lt;br /&gt;
&lt;br /&gt;
This is an article started by Russ Hensel, see &amp;quot;http://www.opencircuits.com/index.php?title=Russ_hensel#About My Articles&amp;quot; '''About My Articles''' for a bit of info.&lt;br /&gt;
&lt;br /&gt;
= Source Code =&lt;br /&gt;
Still working on where I will keep the source.  It is open source, email me in the meantime: [[User:Russ_hensel]]  The code is pretty straight forward, the heavy lifting is all left to the  [[Python Smart Terminal]].  There is nothing very fancy or special about the arduino program, get the source, read it.  Email me if there are issuses.  Also look at this wiki's category SmartTerminal (link at bottom of this page).&lt;br /&gt;
&lt;br /&gt;
= Arduino GreenHouse Commands =&lt;br /&gt;
Commands are single letter strings, in some cases followed by numbers.  All end with a &amp;lt;cr&amp;gt;.  All envoke responses all of which also end with &amp;lt;cr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;	&lt;br /&gt;
|Command Purpose&lt;br /&gt;
|Send&lt;br /&gt;
|Example Response&lt;br /&gt;
|Comment&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|Get version of arduino software&lt;br /&gt;
|v&lt;br /&gt;
|GreenHouse Monitor v3 2017 01 24.01&lt;br /&gt;
|Of course exact string changes with version.  This string is used by the SmartTerminal to verify the arduino connection.&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
&amp;lt;!--------------------------------&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|Aquire Data&lt;br /&gt;
|a&lt;br /&gt;
|ok&lt;br /&gt;
|Data is held in arduino memory, access with further commands.&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|Aquire the data.&lt;br /&gt;
|a&lt;br /&gt;
|ok&lt;br /&gt;
|Data is buffered in the arduino&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|Get the Temperature&lt;br /&gt;
|t&lt;br /&gt;
|33.0 60.0&lt;br /&gt;
|In this version there are 2 sensors, data separated by spaces.&lt;br /&gt;
&amp;lt;!--------------------------------&amp;gt;&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|Get the Humidity&lt;br /&gt;
|h&lt;br /&gt;
|43.0 55.0&lt;br /&gt;
|In this version there are 2 sensors.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Smart Terminal Extension =&lt;br /&gt;
&lt;br /&gt;
In general when you want to make an extension you should find one that is similar to the one you want, copy it, then tweak the code.  This description will not quite do that because the extension ( and arduino program ) are already written.&lt;br /&gt;
&lt;br /&gt;
== Copy Some Code ==&lt;br /&gt;
&lt;br /&gt;
All the extensions that are written are in modules with names of the form xxx_processing.  Look at the file headers .... and pick one to copy.  If you run this copy it should start up without too much trouble.  But how do you get the code to execute? Say your module ( file ) is my_processing.py and the class name ( which you will probably change when you make the copy ) is MyProcessing.  You do not run your module, you run SmartTerminal.  The trick is to first make some changes to the parameter file.  What you need is to make sure that at the end of creating a Parameter class the final setting reflect something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     self.ext_processing_module      = &amp;quot;my_processing&amp;quot;&lt;br /&gt;
     self.ext_processing_class       = &amp;quot;MYProcessing&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
are the setting that are made last.  More documentation the on the parameters is found in [[Smart Terminal Parameter Examples]].&lt;br /&gt;
&lt;br /&gt;
== SmartTerminal Code Explanation ==&lt;br /&gt;
&lt;br /&gt;
I will explain the green house code, use this explanation to build your own code.  This code is gh_csv_processing.py The really fine details are in the code comments, this documentation is at a higher level.  To activate the code have your parameter file ( this is automatic in the intermediate file by setting mode = &amp;quot;GreenHouseCSV&amp;quot; )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    self.ext_processing_module      = &amp;quot;gh_csv_processing&amp;quot;&lt;br /&gt;
    self.ext_processing_class       = &amp;quot;GHCSVProcessing&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== What Is the Point ===&lt;br /&gt;
&lt;br /&gt;
It is always nice to know when code is being explained what the code is supposed to do.  So here it is.&lt;br /&gt;
&lt;br /&gt;
The idea is that the arduino will be set up in an environment like a green house and its job is to measure and report on variables like temperature and humidity.  The job of the smart terminal is to control that data acquisition and log it to a csv file.&lt;br /&gt;
&lt;br /&gt;
=== Details ===&lt;br /&gt;
&lt;br /&gt;
*The smart terminal need not be used in its smart mode, all the dumb terminal stuff still works and let you issue commands to the arduino and inspect the results.  &lt;br /&gt;
*In addition the smart function that are added include:&lt;br /&gt;
&lt;br /&gt;
** Automatic probe of comm ports to find the arduino.&lt;br /&gt;
** Opening the comm port and logging the data to a csv file.&lt;br /&gt;
&lt;br /&gt;
Lets get an overview of the methods ( for the detail read the code, and to actually understand all this you will eventually need to '''read the code''' ):&lt;br /&gt;
&lt;br /&gt;
* __init__()  builds the class, gathers references to other objects in the application, and finally defines some instance variables for data processing later&lt;br /&gt;
* add_gui()   builds gui components and returns a reference to the GUI components, for Tkinter this is a frame, for Kivy it will probably be a layout.&lt;br /&gt;
&lt;br /&gt;
Now a complexity of the application is that it is running in 2 different threads.  When the application starts up it has a single thread that after a bit of time creates the gui and runs its main method.  I call that the GUI thread.  The GUI thread starts another thread, ( the class SmartTerminalHelper ) which has its own methods and attributes.  In a multi threaded application you have to be careful what calls what.  Calls between the threads are particularly tricky once both are running.  For the more difficult issues of this type communication between the threads is managed by pushing data into queues which are thread safe and allow the threads to communicate safely with each other.  All this is in the code.  The GHCSVProcessing class is a bit complicated since parts of it run in one thread, parts in the other.  How do you tell what is what.  There are two ways one is to reason it out, one is to read the comments, this discussion should help. Init is called from the GUI thread which is the one that is &amp;quot;in charge&amp;quot; of the application.  It also calls __add_gui__ which since it adds to the GUI will create objects that are also executed in the GUI thread.  All the functions in the class are commented so you know what class they should be called from ( run in )&lt;br /&gt;
&lt;br /&gt;
==== Additional Functions that Run in the GIU ====&lt;br /&gt;
Both of these are call back function called from the GUI we have created in add_gui, so they run in the GUI thread.  However both want to call functions in the helper thread.  There code is very simple, each one pushes its request into a queue which is processed by the helper thread when it get to it.&lt;br /&gt;
&lt;br /&gt;
*cb_find_and_monitor_arduino()&lt;br /&gt;
*cb_end_helper( )&lt;br /&gt;
&lt;br /&gt;
==== Rest of Functions Run in Helper ====&lt;br /&gt;
&lt;br /&gt;
*find_and_monitor_arduino( )  This is the most important function in this class. Typically it is an infinite loop unless it encounters an unrecoverable error, or the GUI asks it to stop. It has the following functions:&lt;br /&gt;
&lt;br /&gt;
** find work through the comm ports to find ones that ope.&lt;br /&gt;
** validate the port&lt;br /&gt;
** ask the arduino for data and save the data to a csv file&lt;br /&gt;
** keep displaying the received data in the GUI&lt;br /&gt;
** watch out to see if the GUI wants to interrupt ( and stop ) this routine.&lt;br /&gt;
&lt;br /&gt;
Supporting functions for the above are:&lt;br /&gt;
&lt;br /&gt;
*set_time()              saves the time of data acquisition for saving to the csv file&lt;br /&gt;
*process_temp_line()     takes a string ( one line ) of temperature and parses out the numbers on it ( as floats ) for saving to the csv file&lt;br /&gt;
*process_humid_line()    like process_temp_line() but for humidity&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Deeper Dive into find_and_monitor_arduino( ) ==&lt;br /&gt;
&lt;br /&gt;
The functions in the GUI thread, including this one, are responsible for the receive function of the terminal when they are active.  They also need to see if the GUI needs to interrupt them.  To do this they will often poll the com port and check the queue_to_helper.  Now most of the time they are more or less sleeping waiting for the next time to acquire data.  They should not use time.sleep() as that will stop their polling.  Instead they call: check_queue_for( a_time ) in the HelperThread instance which acts like sleep() + the required polling.  All the functions called here should call this method often to keep the receive and interrupt alive.  ( there is a method for the helper to pass the receive processing back to the GUI thread, see the code for the details )  Other than this pooling the coding here is pretty straight forward.&lt;br /&gt;
&lt;br /&gt;
* to find the arduino there is a method in the HelperThread instance that takes care of it, a couple of parameters control the details.&lt;br /&gt;
* set_time() is called to record the time of data acquisition&lt;br /&gt;
* the string requesting data acquisition is sent to the arduino&lt;br /&gt;
* the string requesting the temperature data is sent to the arduino, the received string is parsed by process_temp_line()&lt;br /&gt;
* the same process is repeated for the humidity.&lt;br /&gt;
* a function is called in the HelperThread instance to save the data to the csv file ( controlled in part by the parameters ).&lt;br /&gt;
* the function sleeps until it is time to repeat the cycle.&lt;br /&gt;
&lt;br /&gt;
== Interrupt and Error Management in the Helper Thread ==&lt;br /&gt;
&lt;br /&gt;
This is proving to be one of the more difficult aspects of the program, an I am still working on it.  I have however decided upon an approach which seems promising.  The plan, and what is implemented so far is to use various exceptions ( or exceptions with instance variables ) to unwind the code back to some recovery point.&lt;br /&gt;
&lt;br /&gt;
The code for interrupting the helper thread is currently working as intended.  When the queue_to_helper is detected as being non empty during a helper function ( except the main polling one ) an exception is thrown which is caught back in HelperThread.polling.  ( interrupt is not used in the sense of suspending then returning to an activity, the function that is interrupted is over )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:SmartTerminal]] [[Category:Arduino/RaspberryPi]]&lt;/div&gt;</summary>
		<author><name>Russ hensel</name></author>
		
	</entry>
	<entry>
		<id>http://www.opencircuits.com/index.php?title=Smart_Terminal_GUI&amp;diff=88210</id>
		<title>Smart Terminal GUI</title>
		<link rel="alternate" type="text/html" href="http://www.opencircuits.com/index.php?title=Smart_Terminal_GUI&amp;diff=88210"/>
		<updated>2022-08-25T16:26:56Z</updated>

		<summary type="html">&lt;p&gt;Russ hensel: /* Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Overview =&lt;br /&gt;
The GUI or graphical user interface is the key to using the SmartTerminal ( the main page for the application is at: '''[[Python Smart Terminal]]''' and it has a category page at '''[[https://opencircuits.com/index.php?title=Category:SmartTerminal Category:SmartTerminal]]''' ).  In addition, but not discussed here, you can use the command line and the parameter file ( see:''' [[Smart Terminal Parameter Examples]]''' ).  This page is the documentation for the GUI.&lt;br /&gt;
&lt;br /&gt;
= Screen Shot =&lt;br /&gt;
&lt;br /&gt;
This is what it looks like, details on each part below.  Still working on it, mostly to clean up the details. Note that this screen shot was taken during a debugging session and has some artifacts that will soon disappear, then a new screen shot will be placed here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:ScreenShot 1.png | 1000x2500px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-----------&lt;br /&gt;
[[File:Screen_shot.png | 1000x2500px]]&lt;br /&gt;
[[File:Screen_shot.png | 500x500px]]&lt;br /&gt;
 — Resizes the image to fit within the given width and height in pixels;&lt;br /&gt;
upright — R]]&lt;br /&gt;
&lt;br /&gt;
{width}x{height}px — Resizes the image to fit within the given width and height in pixels;&lt;br /&gt;
upright — R&lt;br /&gt;
this cannot bee seen &lt;br /&gt;
-------------&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= What Does What: The Controls =&lt;br /&gt;
&lt;br /&gt;
Control is mostly through buttons, sometimes supplemented by text fields.  Outside of the GUI there is also a parameter file which controls start up and item like communications setting.  The large rectangle at the bottom left, a text area, is where data sent, received, and some information messages are displayed.  It is referred to as the receive area.&lt;br /&gt;
&lt;br /&gt;
Working from top to bottom:&lt;br /&gt;
&lt;br /&gt;
== At the Top ==&lt;br /&gt;
* &amp;lt;Window title&amp;gt; Program name and some additional info including version, mode,  and the name of any &amp;quot;extra&amp;quot; parameter file ( see [[Smart Terminal Parameter Examples]] ).&lt;br /&gt;
* &amp;lt;ID Color Band &amp;gt;The green band under the title is an optional component, its height and color is set in the parameter file.  It is normally useful only if you are running 2 instances of the terminal and want a quick way to tell them apart. &lt;br /&gt;
&lt;br /&gt;
==Top Row of Labels ==&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;Double Row of Labels, Starting with the Communications&amp;gt;&amp;gt; &amp;gt;  Managed by the parameter file ( see [[Smart Terminal Parameter Examples]] ).&lt;br /&gt;
**&amp;lt;Port:xxx&amp;gt; Status of comm port, open, closed or failed to open.&lt;br /&gt;
**&amp;lt;Type:xxx&amp;gt; Type of comm port, so far only RS232&lt;br /&gt;
**&amp;lt;PortID:xxx&amp;gt; Name of port used by the operating system.  This may be changed if some of the &amp;quot;auto open&amp;quot; features are used.&lt;br /&gt;
**&amp;lt;Baud:xxx&amp;gt;     Baud Rate of comm port.&lt;br /&gt;
**&amp;lt;StopBits:xxx&amp;gt; Number of stop bits for the comm port&lt;br /&gt;
**&amp;lt;Parity:xxx&amp;gt;   Parity of comm port.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;Additional Labels in First Row, Starting with the Database&amp;gt;&amp;gt; &amp;gt;  Labels show status of the database connection ( not always used ).  Managed by the parameter file.&lt;br /&gt;
**&amp;lt;Status:xxx&amp;gt;  Open or closed connection to the database&lt;br /&gt;
**&amp;lt;ConnectName:xxx&amp;gt; Name given to the connection in the parameter file.&lt;br /&gt;
**&amp;lt;Host:xxx&amp;gt;     Host name used by the database&lt;br /&gt;
**&amp;lt;DB:xxx&amp;gt;      Database name&lt;br /&gt;
**&amp;lt;User:xxx&amp;gt;    Database user&lt;br /&gt;
&lt;br /&gt;
== Next Button Row ==&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;Open Button&amp;gt; Opens the communications port ( if configuration in parameter file(s) allow ) Parameters show to the right, port status to right of button.&lt;br /&gt;
* &amp;lt;Close Button&amp;gt; Close the communications port. No error if it is not open. Parameters show to the right, port status to right of button.&lt;br /&gt;
* &amp;lt;Parameters to right of open and close buttons&amp;gt; Parameters from the parameter file(s), not editable on the GUI.&lt;br /&gt;
* &amp;lt;Edit Log&amp;gt; opens an editor on the system ( needs to be configured in parameter file self.ex_editor = &amp;lt;name of executable or link&amp;gt; ) to view the python logging file for the app.&lt;br /&gt;
* &amp;lt;Edit Parms &amp;gt; opens an editor on the system to edit the parameters.py file. See &amp;lt;Edit Log&amp;gt;.&lt;br /&gt;
* &amp;lt;Edit Parms X &amp;gt; opens an editor on the system to edit the extended parameter file if used on the command line. Not visible if no extended parameter file used. See &amp;lt;Edit Log&amp;gt;.&lt;br /&gt;
* &amp;lt;SendParms&amp;gt; takes the contents of the send buttons and displays them in the receive area in the same format as required by the parameter file to reproduce the current configuration.&lt;br /&gt;
* &amp;lt;Ports&amp;gt; List the available ports in the receive area, working under windows until upgraded from 7 to 10, Linux ??&lt;br /&gt;
* &amp;lt;Restart&amp;gt; Restarts the application ( usually fast ) using new values ( if any ) in the parameter file(s).&lt;br /&gt;
* &amp;lt;Test&amp;gt; May not be present, for debugging, not generally useful or predictable, you would need to look through the code to see what it might be doing, press at your own risk.&lt;br /&gt;
&lt;br /&gt;
== Buttons from Extensions ==&lt;br /&gt;
If you have extended the terminal with an xxx_processing module, its GUI will appear here.  In this screen shot we see the GUI from the greenhouse extension ( note this is the mode in the window title ).  The actual labels are something still in flux, the functions are more fixed.&lt;br /&gt;
&lt;br /&gt;
** &amp;lt;Helper: Find and Monitor Arduino &amp;gt; starts auto run mode of terminal if so configured, this is still alpha and in any case will not have much success unless connected to a compatible serial device ( typically an Arduino ).&lt;br /&gt;
** &amp;lt;Helper: Find Arduino &amp;gt; T&lt;br /&gt;
** &amp;lt;Interrupt Helper&amp;gt; stops auto run mode of terminal. Also still alpha, but generally harmless.&lt;br /&gt;
&lt;br /&gt;
== Send Area ==&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;Send Buttons&amp;gt; and &amp;lt;Text Entry&amp;gt; to right of each button. Each button sends the text to the right of the button, text is not erased after transmission.  Lots of parameters in the parameter file determine the details:&lt;br /&gt;
** Number of send buttons&lt;br /&gt;
** Text of each button ( default Send )&lt;br /&gt;
** Text of the data to be send may or may not be protected based on parameter settings&lt;br /&gt;
The setup shown here is customized for a particular arduino program, the greenhouse monitor.&lt;br /&gt;
&lt;br /&gt;
== Receive Area ==&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;Column of Buttons and Text Panel&amp;gt;  The Panel shows terminal activity and some other info ( like Ports above ) the buttons act on this data in some way.  You can type in the text panel, to no particular effect, perhaps could use this to make notes.  Text is partly erased from time to time depending on settings in parameter file(s)  The data in the recieve area falls into three classes, each with a unique prefix ( which is set in the parameters.py file ):&lt;br /&gt;
** Sent:         &amp;quot;&amp;gt;&amp;gt;&amp;gt; &amp;quot; 		&lt;br /&gt;
** Received:     &amp;quot;&amp;lt;&amp;lt;&amp;lt; &amp;quot;&lt;br /&gt;
** Information: 	    &amp;quot;!!! &amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Other controls:&lt;br /&gt;
** &amp;lt;Clear&amp;gt; Clears text panel.&lt;br /&gt;
** &amp;lt;Copy Sel&amp;gt; Copies all selected text.  Use the mouse to select text.&lt;br /&gt;
** &amp;lt;Copy All&amp;gt; Copies all text selected or not.&lt;br /&gt;
** &amp;lt;A Scroll&amp;gt; When checked text panel automatically scrolls to the most recent data, else not.  This can help you read earlier material when still receiving new data.&lt;br /&gt;
&lt;br /&gt;
[[Category:SmartTerminal]] [[Category:Arduino/RaspberryPi]][[category:Python]] [[category:Python Projects]]&lt;/div&gt;</summary>
		<author><name>Russ hensel</name></author>
		
	</entry>
	<entry>
		<id>http://www.opencircuits.com/index.php?title=Chemical_Etchants&amp;diff=87793</id>
		<title>Chemical Etchants</title>
		<link rel="alternate" type="text/html" href="http://www.opencircuits.com/index.php?title=Chemical_Etchants&amp;diff=87793"/>
		<updated>2022-02-14T21:59:35Z</updated>

		<summary type="html">&lt;p&gt;Russ hensel: Replaced content with &amp;quot;removed spam, working to restore page&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;removed spam, working to restore page&lt;/div&gt;</summary>
		<author><name>Russ hensel</name></author>
		
	</entry>
	<entry>
		<id>http://www.opencircuits.com/index.php?title=Command_Assistant_Help_File&amp;diff=87733</id>
		<title>Command Assistant Help File</title>
		<link rel="alternate" type="text/html" href="http://www.opencircuits.com/index.php?title=Command_Assistant_Help_File&amp;diff=87733"/>
		<updated>2022-01-31T15:59:47Z</updated>

		<summary type="html">&lt;p&gt;Russ hensel: /* Use */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is the Help &amp;quot;file&amp;quot; for the Python Application whose main page is: *'''[ tbd ]'''&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Help file for Command Assistant application ( Documentation for Verxxx ).  You can also get a lot of information about how the program works by looking at the GUI and its explanation:  '''[[Command Assistant GUI Images]]'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Application Features = &lt;br /&gt;
&lt;br /&gt;
*Issue Linux commands including starting GUI applications.&lt;br /&gt;
*Runs as a GUI application.&lt;br /&gt;
*Highly configurable.&lt;br /&gt;
*Built to be extensible&lt;br /&gt;
&lt;br /&gt;
= Use =&lt;br /&gt;
Note: the application is still a moving target, details are in flux.&lt;br /&gt;
&lt;br /&gt;
The application is designed to help you find and issue Linux commands to get some computer task done.&lt;br /&gt;
( if you also open the app, or the page for the Graphical User Interface (GUI) the following will be easier to follow )&lt;br /&gt;
&lt;br /&gt;
The general workflow is:&lt;br /&gt;
&lt;br /&gt;
* In the key word field enter one or more key words for your task like &amp;quot;list files&amp;quot; an hit enter or press select.  &amp;quot;List files&amp;quot; will select the CommandLs set of commands.&lt;br /&gt;
&lt;br /&gt;
* To activate a selected command click on it ( the first command will be automatically selected, particularly useful when only one command is selected).  This will build a GUI area, mid window, just to run this set of commands.&lt;br /&gt;
&lt;br /&gt;
* In the most general case the command to be issued will consist of 3 parts:&lt;br /&gt;
** A base command ( like &amp;quot;ls&amp;quot; ).&lt;br /&gt;
** A field for options to the command ( like ..... )&lt;br /&gt;
** A filed for further options to the command ( like a file prototype &amp;quot;*.py&amp;quot; )&lt;br /&gt;
* When you have filled out the 3 parts you can:&lt;br /&gt;
** Press &amp;lt;Run It&amp;gt;    Which will open a terminal, run the command, and leave the terminal open so you can choose to continue to use it ( or not ).&lt;br /&gt;
** Press &amp;lt;Preview&amp;gt;   Previews the command in the &amp;quot;message area&amp;quot; at the bottom of the window.&lt;br /&gt;
** Press &amp;lt;Script&amp;gt;    Writes the command to a shell script an opens in an editor&lt;br /&gt;
** Press &amp;lt;Web Help&amp;gt;  Open a Linux Cheat Sheet, possibly positioned to the relevant place on the page.&lt;br /&gt;
** Press &amp;lt;Txt Help&amp;gt;  Get help from a text file on some details of the command set.&lt;br /&gt;
&lt;br /&gt;
Note that:&lt;br /&gt;
* Each of the three part of the command can end with a command ( starting with a # ).  These comments are generally stripped when the command is run.&lt;br /&gt;
* When a command is build additional material may be added to maintain a default directory or keep the terminal open.&lt;br /&gt;
&lt;br /&gt;
= Download and Install = &lt;br /&gt;
&lt;br /&gt;
There is really no install program.  Currently the application is intended for those who have a fair familitry familiarity with Python coding and can just insert the downloaded code into their development environment and run it. You should also have a general idea of how to use the Linux Command Line. Code at *'''[https://gitlab.com/russhensel/cmd_assist Russell Hensel / cmd_assist · GitLab ]'''.  For most of you it will not run due to dependency problems.  You will need to add them.  Pretty much read the error messages and install the missing code.  I use Anaconda Spyder so my preferred tool is conda ( conda install pyHS100 ).  If conda does not work or you do not use it use pip.   &lt;br /&gt;
&lt;br /&gt;
Much of the application is configurable through the parameter.py file, but the default should give you an application that runs,  &lt;br /&gt;
&lt;br /&gt;
With the edited parameter file saved, restart the application.     Not working?  Double check or email me.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Application ==&lt;br /&gt;
&lt;br /&gt;
Some operations work the same way in both applications&lt;br /&gt;
*Install: see section above.&lt;br /&gt;
*Debug:  see section below.&lt;br /&gt;
*Edit the parameter file:  *Change Parameters: Use the application button &amp;lt; Edit Parms &amp;gt; ( after configuring for your editor ) or any text editor suitable for Python ( no tabs ) on the file parameters.py.  See also: The section below, [[Configuration Files For Python]] and [[tbd]]  &lt;br /&gt;
*Edit the log file:  This is a standard python logging file.  Useful for debugging and general tracking of the application.  You can set the level of the logging using the parameter file.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
*Quick Restart of the application:  As perhaps after a parameter change.  Use the &amp;lt; Restart &amp;gt; button.  See also: [[tbd]]&lt;br /&gt;
 &lt;br /&gt;
*Get Help: Press the &amp;lt;Help&amp;gt; button.  Depending on how it is setup in parameters.py you may see this page.&lt;br /&gt;
*Work with text in message area:  See buttons to the left of the area.&lt;br /&gt;
&lt;br /&gt;
=  How to Use the Parameter File = &lt;br /&gt;
&lt;br /&gt;
See: [[Configuration Files For Python]]&lt;br /&gt;
You need a text editor suitable for .py files to manage the parameter file ( parameters.py )&lt;br /&gt;
This includes most text editors.  I particularity like:&lt;br /&gt;
&lt;br /&gt;
*notepad &lt;br /&gt;
*geany&lt;br /&gt;
&lt;br /&gt;
You can also use the editor that comes in many python development environments, the simplest of&lt;br /&gt;
which may be Idle.  But there are many many others.  If you are reading this you probably have&lt;br /&gt;
some experience.&lt;br /&gt;
&lt;br /&gt;
Once you configure an editor in parameters.py you can edit from the &amp;lt;Edit Parms&amp;gt; in the GUI ( see below )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When editing there are couple of gotchas to watch out for.&lt;br /&gt;
* Python cares about capitalization, use the capitalization indicated in the default files and the example code.&lt;br /&gt;
* Python also cares a lot about how lines are indented.  Do not change the indentation from the sample files, and always indent using spaces ( not tabs. most text editors will use spaces automatically for .py files, even if you use the tab key )&lt;br /&gt;
&lt;br /&gt;
Editing of the parameters.py file&lt;br /&gt;
&lt;br /&gt;
*Edit so the program finds your devices.&lt;br /&gt;
**See above in Download and Install&lt;br /&gt;
*Enable your favorite editor to work with the application.&lt;br /&gt;
**self.ex_editor          =  r&amp;quot;D:\apps\Notepad++\notepad++.exe&amp;quot;   # use r&amp;quot; or the backslashes will not work, or you can use forward slashes instead they may be wrong but they work.&lt;br /&gt;
*Lots of other settings:&lt;br /&gt;
**Read the comments in parameters.py and change as desired.  If a setting does not work let me know.&lt;br /&gt;
*If you mess up.&lt;br /&gt;
**Re download and get back to the original file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-----------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
this cannot bee seen &lt;br /&gt;
-------------&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The GUI ==&lt;br /&gt;
&lt;br /&gt;
see: [[tbd]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Debugging = &lt;br /&gt;
&lt;br /&gt;
There are several application outputs that may be useful for debugging.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Watch the GUI&lt;br /&gt;
* Check the Python console.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
* Look at the python log file ( use the GUI button  Edit Log  ( specify your editor in xxxfirst )) or use your editor on the default name of the log file   xxx.py_log.&lt;br /&gt;
&lt;br /&gt;
Most issues will probably be missing libraries, parameters.py issues, or just bugs in my code (email me ).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Links =&lt;br /&gt;
&lt;br /&gt;
*[[tbd]] main page for this project &lt;br /&gt;
* see categories below as well&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
[[Category:Python CommandAssist]] [[category:Python]] [[category:Python Projects]]&lt;/div&gt;</summary>
		<author><name>Russ hensel</name></author>
		
	</entry>
	<entry>
		<id>http://www.opencircuits.com/index.php?title=Command_Assistant_Help_File&amp;diff=87732</id>
		<title>Command Assistant Help File</title>
		<link rel="alternate" type="text/html" href="http://www.opencircuits.com/index.php?title=Command_Assistant_Help_File&amp;diff=87732"/>
		<updated>2022-01-31T15:57:24Z</updated>

		<summary type="html">&lt;p&gt;Russ hensel: /* Use */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is the Help &amp;quot;file&amp;quot; for the Python Application whose main page is: *'''[ tbd ]'''&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Help file for Command Assistant application ( Documentation for Verxxx ).  You can also get a lot of information about how the program works by looking at the GUI and its explanation:  '''[[Command Assistant GUI Images]]'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Application Features = &lt;br /&gt;
&lt;br /&gt;
*Issue Linux commands including starting GUI applications.&lt;br /&gt;
*Runs as a GUI application.&lt;br /&gt;
*Highly configurable.&lt;br /&gt;
*Built to be extensible&lt;br /&gt;
&lt;br /&gt;
= Use =&lt;br /&gt;
Note: the application is still a moving target, details are in flux.&lt;br /&gt;
&lt;br /&gt;
The application is designed to help you find and issue Linux commands to get some computer task done.&lt;br /&gt;
( if you also open the app, or the page for the Graphical User Interface (GUI) the following will be easier to follow )&lt;br /&gt;
&lt;br /&gt;
The general workflow is:&lt;br /&gt;
&lt;br /&gt;
* In the key word field enter one or more key words for your task like &amp;quot;list files&amp;quot; an hit enter or press select.  &amp;quot;List files&amp;quot; will select the CommandLs set of commands.&lt;br /&gt;
&lt;br /&gt;
* To activate a selected command click on it ( the first command will be automatically selected, particularly useful when only one command is selected).  This will build a GUI area, mid window, just to run this set of commands.&lt;br /&gt;
&lt;br /&gt;
* In the most general case the command to be issued will consist of 3 parts:&lt;br /&gt;
** A base command ( like &amp;quot;ls&amp;quot; ).&lt;br /&gt;
** A field for options to the command ( like ..... )&lt;br /&gt;
** A filed for further options to the command ( like a file prototype &amp;quot;*.py&amp;quot; )&lt;br /&gt;
* When you have filled out the 3 parts you can:&lt;br /&gt;
** Press &amp;lt;Run It&amp;gt;    Which will open a terminal, run the command, and leave the terminal open so you can choose to continue to use it ( or not ).&lt;br /&gt;
** Press &amp;lt;Preview&amp;gt;   Previews the command in the &amp;quot;message area&amp;quot; at the bottom of the window.&lt;br /&gt;
** Press &amp;lt;Script&amp;gt;    Writes the command to a shell script an opens in an editor&lt;br /&gt;
** Press &amp;lt;Web Help&amp;gt;  Open a Linux Cheat Sheet, possibly positioned to the relevant place on the page.&lt;br /&gt;
** Press &amp;lt;Txt Help&amp;gt;  Get help from a text file on some details of the command set.&lt;br /&gt;
&lt;br /&gt;
= Download and Install = &lt;br /&gt;
&lt;br /&gt;
There is really no install program.  Currently the application is intended for those who have a fair familitry familiarity with Python coding and can just insert the downloaded code into their development environment and run it. You should also have a general idea of how to use the Linux Command Line. Code at *'''[https://gitlab.com/russhensel/cmd_assist Russell Hensel / cmd_assist · GitLab ]'''.  For most of you it will not run due to dependency problems.  You will need to add them.  Pretty much read the error messages and install the missing code.  I use Anaconda Spyder so my preferred tool is conda ( conda install pyHS100 ).  If conda does not work or you do not use it use pip.   &lt;br /&gt;
&lt;br /&gt;
Much of the application is configurable through the parameter.py file, but the default should give you an application that runs,  &lt;br /&gt;
&lt;br /&gt;
With the edited parameter file saved, restart the application.     Not working?  Double check or email me.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Application ==&lt;br /&gt;
&lt;br /&gt;
Some operations work the same way in both applications&lt;br /&gt;
*Install: see section above.&lt;br /&gt;
*Debug:  see section below.&lt;br /&gt;
*Edit the parameter file:  *Change Parameters: Use the application button &amp;lt; Edit Parms &amp;gt; ( after configuring for your editor ) or any text editor suitable for Python ( no tabs ) on the file parameters.py.  See also: The section below, [[Configuration Files For Python]] and [[tbd]]  &lt;br /&gt;
*Edit the log file:  This is a standard python logging file.  Useful for debugging and general tracking of the application.  You can set the level of the logging using the parameter file.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
*Quick Restart of the application:  As perhaps after a parameter change.  Use the &amp;lt; Restart &amp;gt; button.  See also: [[tbd]]&lt;br /&gt;
 &lt;br /&gt;
*Get Help: Press the &amp;lt;Help&amp;gt; button.  Depending on how it is setup in parameters.py you may see this page.&lt;br /&gt;
*Work with text in message area:  See buttons to the left of the area.&lt;br /&gt;
&lt;br /&gt;
=  How to Use the Parameter File = &lt;br /&gt;
&lt;br /&gt;
See: [[Configuration Files For Python]]&lt;br /&gt;
You need a text editor suitable for .py files to manage the parameter file ( parameters.py )&lt;br /&gt;
This includes most text editors.  I particularity like:&lt;br /&gt;
&lt;br /&gt;
*notepad &lt;br /&gt;
*geany&lt;br /&gt;
&lt;br /&gt;
You can also use the editor that comes in many python development environments, the simplest of&lt;br /&gt;
which may be Idle.  But there are many many others.  If you are reading this you probably have&lt;br /&gt;
some experience.&lt;br /&gt;
&lt;br /&gt;
Once you configure an editor in parameters.py you can edit from the &amp;lt;Edit Parms&amp;gt; in the GUI ( see below )&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When editing there are couple of gotchas to watch out for.&lt;br /&gt;
* Python cares about capitalization, use the capitalization indicated in the default files and the example code.&lt;br /&gt;
* Python also cares a lot about how lines are indented.  Do not change the indentation from the sample files, and always indent using spaces ( not tabs. most text editors will use spaces automatically for .py files, even if you use the tab key )&lt;br /&gt;
&lt;br /&gt;
Editing of the parameters.py file&lt;br /&gt;
&lt;br /&gt;
*Edit so the program finds your devices.&lt;br /&gt;
**See above in Download and Install&lt;br /&gt;
*Enable your favorite editor to work with the application.&lt;br /&gt;
**self.ex_editor          =  r&amp;quot;D:\apps\Notepad++\notepad++.exe&amp;quot;   # use r&amp;quot; or the backslashes will not work, or you can use forward slashes instead they may be wrong but they work.&lt;br /&gt;
*Lots of other settings:&lt;br /&gt;
**Read the comments in parameters.py and change as desired.  If a setting does not work let me know.&lt;br /&gt;
*If you mess up.&lt;br /&gt;
**Re download and get back to the original file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-----------&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
this cannot bee seen &lt;br /&gt;
-------------&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The GUI ==&lt;br /&gt;
&lt;br /&gt;
see: [[tbd]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Debugging = &lt;br /&gt;
&lt;br /&gt;
There are several application outputs that may be useful for debugging.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Watch the GUI&lt;br /&gt;
* Check the Python console.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
* Look at the python log file ( use the GUI button  Edit Log  ( specify your editor in xxxfirst )) or use your editor on the default name of the log file   xxx.py_log.&lt;br /&gt;
&lt;br /&gt;
Most issues will probably be missing libraries, parameters.py issues, or just bugs in my code (email me ).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Links =&lt;br /&gt;
&lt;br /&gt;
*[[tbd]] main page for this project &lt;br /&gt;
* see categories below as well&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
[[Category:Python CommandAssist]] [[category:Python]] [[category:Python Projects]]&lt;/div&gt;</summary>
		<author><name>Russ hensel</name></author>
		
	</entry>
</feed>