#signalbar
Explore tagged Tumblr posts
reversebias · 3 months ago
Text
Barcodes and Signal Recovery
▌▌▖▌▖▘▌▖▖▖▌▖▘▖▖▖▌▘▘▖▖▖▌▖▖▖▘▖▖▌▖▖▘▌▌▌
Last week I ran across an interesting project that caught my attention called dollcode by a GitHub user by the name of v01dlabs.
Of it's own, it's an exceptionally straightforward project: encode numbers and strings using a ternary code based on some simple Unicode characters ▌▖▘. I've long had a fascination with the way barcodes are read and the signal processing that goes with it, so I dug in to the working logistics.
Unfortunately, as I fiddled with it and tried to understand how one might decode it, it became increasingly clear that there were some limitations to the coding being used. For example, the encoding for "x" is "▌▌▌▌‍" and the encoding for the number 120 is also "▌▌▌▌". Similarly, the encoding p is "▘▘▘▘‍", which, if you don't know how tall the barcode is, looks exactly the same as the encoding for "(" which is "▖▖▖▖‍".
So given the seed and some knowledge about signal recovery, I decided to set out to make my own variation of the dollcode signaling method.
In my design, which I ended up calling signalbar, I added several features to constrain the coding, and improve its recovery with flexible optical media (printed paper) as the primary consideration.
Rather than encode data directly, a 4-to-3 encoding would be used; 4 bits of information using 3 trits.
The minimum unit of transfer would be a nibble. This is convenient in the 4-to-3 encoding, but also means that sending data smaller than 4 bits would require the cooperation of a higher level protocol.
Each symbol would actually come from one of three symbol tables based on the last bit of the previous symbol. This would allow for error detection and make use of the unused codes.
Two ▌ trits in a row would never appear outside of control symbols. This would make detecting control signals very easy.
Framing symbols would be added that could be used to detect the beginning and end of transmission. These symbols would be the same in all three encoding tables to simplify implementation. The start symbol would begin with a ▌▌ and the stop symbol would end with ▌▌, ensuring that the edges of the frame would always be max height and even if read backwards would immediately trigger the ▌▌ control sequence detection.
Symbols would be chosen such that no arrangement of the symbols could possibly create an infinitely long run, and symbols would be chosen in a way to minimize the maximum run length. This would aid in both clock recovery and detecting the code height on paper that wasn't flat since you could guarantee that you would see symbols of different sizes in a known and short window.
There are several things I think might be useful, such as frame length encoding and check codes, but those logistics are being left to higher level protocols. This implementation is mostly about the encoder/decoder hardware; so anything beyond what that is beyond the scope of this project for now.
With that said, the signalbar repo itself ended up being a powerful opportunity to do some work with GitHub Actions (I had been using Gitlab CI/CD up till now, and Jenkins before that) so that was interesting, and with some more time, I may add some explicit tests to verify the function of the module. But even without tests, it was a great way to bring pylint and mypy to bear, and made refining the code very nice.
However, this was largely just an amusement since I hadn't done a lot of personal programming over the last few years thanks to work. I don't know if I'll go far enough with this project to truly finish it up. dollcode, and now signalbar, are interesting, but I wouldn't particularly regard either as especially useful; just a neat way of exercising the ol' braincells. Nevertheless, I recommend you go check it out; there are some useful ways to think about signaling that are trapped up in the specific implementation that this toy example should make fairly clear (such as how 8b10b encoding solves the self-clocking issue.)
With that said, I have stuff in the pipeline that is more useful, but that writeup will have to wait for a different day.
0 notes
forwardbiaspony · 3 months ago
Text
▌▌▖▌▘▌▖▘▖▖▌▖▘▌▘▖▌▖▖▖▘▖▌▖▘▘▌▖▌▖▘▖▌▖▌▘▖▘▘▖▖▌▘▌▘▖▌▖▖▌▖▖▌▖▘▌▖▖▌▘▖▖▌▖▖▌▘▌▘▖▌▘▖▌▘▖▌▖▖▖▘▖▌▘▖▘▖▖▌▖▌▘▖▖▌▖▘▌▘▖▌▖▘▖▖▖▌▖▘▘▌▖▌▖▖▌▘▖▖▌▖▖▘▌▌▌
twitch_live
I promised some warning? Who said I promised a warning about a stream? We're goin' now! Come join me as I write some software because someone WAS WRONG ON THE INTERNET!
1 note · View note
wetalktrade · 5 years ago
Photo
Tumblr media
The entry point is a matter of life and death in trading. So, here are some tips to extend your life in Forex.
1 note · View note
phillysdon04 · 6 years ago
Photo
Tumblr media
[question] Is there a signalbar and wifi widget for xenhtml? via /r/iOSthemes http://bit.ly/2xfu6Xo
0 notes