I have recently flashed my first device with ESPHome. It was Sonoff Basic.
When you know what to do the process of flashing is simple:
Each part of this process can be described with a lot of details, but now I'm speaking only about the wires. Actually not about the wires, but about their color.
There are 4 wires from the flasher to the device:
I want to use the same wire colors every time I flash a device. When the colors are the same it is easier to flash and it is more error prone.
I would be happy to follow some standard about wire colors, but, as far as I know, there is no standard that tells what colors to use for all 4 wires, so I had to invent my own standard that I'm going to use.
So, here is what I'm using:
Choosing these colors was simple. The same colors are often used on a breadboards:
(but not all breadboards are using this two colors)
And black and red is often used in all sorts of blocks for the batteries:
Choosing the colors for the power and ground was easy, but there are no common colors for tx/rx. At first I have decided to use greed and white colors (this reminded me of ethernet plugs), But it turned out that I haven't got white wires. So I used green and yellow.
Here is a picture of wires that I have:
That there is no standard for wire colors for tx and rx, but there is one more difficulty with such wires. From the flasher device tx is connected to rx on the device (and vice versa). To reflect this in a wire I've decided to create the wire that consists of 2 colors. I took one green and one yellow wire, cut both in the middle and soldered them together:
Here is how the flasher is connected to the device with my set of wires:
And here is a Sonoff Basic pinout:
When I was searching for the correct colors for the wires I've asked a question in some chat about ESPHome. I've got a joke as an answer for my question. I was recommended to use all the wires with the same color black:
It looks really great, but it is totally impractical: it is very hard to say what pin from the flasher is connected to what pin on the device:
So, here are the wire colors I use when I flash devices:
The colors of power and ground wires are pretty simple to remember. Colors for tx/rx wires is harder to remember. I have invented the following mnemonic rule to simplify the process of remembering colors. The data moved from tx (transmit) to rx (receive). It is moving from green to yellow, exactly as those 2 colors are situated on the wavelength graph:
9 january 2020