Python would be better with brackets

{Python} There. I fixed it.

But really I’m talking about the scripting language. Python requires code lines to be separated onto new lines and then groups code lines based on a set of tabs or spaces before the line.

Better programming languages use semicolons to separate the code lines and brackets to group code. This is better because code is built from other code. If you ever create a large program or set of programs, you’ll know that it is necessary and expedient to copy useful bits of code around. This copying is incredibly easy in bracketed languages in any word processor, it just works. And in smarter development environment editors, the editor software can easily identify the bracket situation and automatically correct the format accordingly.

However, in python, when you go to copy a code group, chances are that you’ll have to go through each line and reconfigure the leading tabs and spaces. Indeed, the only way to avoid this hassle is to use special word processors that have built in functions for managing indents, and that still likely won’t work if spaces or combinations of tabs and spaces are being used.

Others have recognized this problem and developed plug ins, but I’d argue that it is a little silly not to have a native bracketed structure.

But neither python nor the bracketed languages provide a solution for deep nesting readability. To fix this issue, I’d take a lesson from html and permit optional tags when opening a bracket block, that, when assigned, must be added at the closing bracket. Something like {:count-loop codeline;codeline2; count-loop:}.

Nvidia Jetson Nano

I got a hold of a Jetson nano dev kit for a project for work. It’s got a lot of similarities to the raspberry pi, as far as initial setup. One loads the OS image on a memory card and hooks up monitor, keyboard, mouse, and ethernet, and the Jetson Nano becomes a single board computer, except it has a Tegra X1 SoC with a quad core CPU and 128 core GPU.

The Nano standard OS from NVIDIA is Ubuntu, which is debian based and has a familiar feel for me, which will be handy as I begin python scripting with the TensorFlow library.

All in all my first impression of the device is pleased and optimistic, and with the price being what it is for all the computing and graphics power I get, I wonder if I might be looking at NVIDIA products for my single board computing needs in the future. One drawback: the Jetson Nano dev kit lacks a builtin wifi radio, but then, so did the early raspberry Pi’s.

Egg welt

Looks like the egg struck me with it’s long side. Sheriff’s deputy says he can’t do anything because I wasn’t memorizing the make, model, and license plate of every oncoming car on the 3 lane northbound side of Watt Ave. This rings false, given the intersection camera pointed towards the Watt and Whitney bus stop where I was hit, and additional cameras at subsequent intersections northbound from there on Watt. (The incident occurred around 9:30pm on 9/21.) It’s assault, of course, and there are no circumstances in which I wouldn’t want charges pressed for this. The question is what measures can I take to protect myself?

Ardbox PLC

The Ardbox PLC is a din rail compact industrial controller built around an arduino Leonardo by Industrial Shields. This type of device provides a convenient bridge between the free to use and open source arduino development capability and 24V industrial controls. It’s similar to what I hope to achieve with my esp32 PLC, though I think I’ve come up and will come up more interesting additional capabilities.

The price of this solution is hard to beat for its range of capability. As a connected device, the Ardbox is quite limited (though by no means useless), but as an independent single machine controller, it excels, and it doesn’t require expensive proprietary development software. Don’t get me wrong, that proprietary software can be extremely useful for developing large machines which rely upon network attached sensors and other controllers. But for a simple, pantry sized machine with hardwired sensors and drivers, the Ardbox provides a good cheap way to get it done, which is always highly desirable.

One drawback of the Ardbox is a lack of programming security. It’s ease of development and programming translates to a need for physical security of the device to insure preservation of the program as is where such is critical for safe operation of a machine.

Broadcom ACHS-7123

While taking my BOM to Mouser to plan a parts order, I found that one of my preferred board mount current sensors, the Tamura L18P030S05R isn’t currently available in low quantities.  Fortunately, there is an equivalent hall effect type current sensor that comes in a smaller, cheaper smd component, the Broadcom ACHS-7123.  I prefer this technology over shunt type current sensors, as I think that they are, overall, cheaper, more accurate, and smaller, and this “new to me” Broadcom chip is a fine example of that.

Using My Analog Signal Multiplier As a Platform

If you take a close look at my PIC based signal multiplier, it becomes apparent how easily that same design can be used for multiple DC analog (0-5)V signal manipulations, logic, and transforms.  The chip consists of two protected DC analog (0-5)V signal inputs, and one PPTC protected DC analog output (0.4-4.6)V which is determined in the microprocessor programming by the duty cycle of the PWM output.  Because the output is put through a power op-amp follower, the output signal has some decent power behind it.  Thus, by modifying the PIC program, the device has a much wider range of possible uses that would otherwise require complicated and component intensive circuits to implement.

So the next time you’re thinking of building an analog circuit with 3+ opamps, you might consider this little guy, instead.  You can contact me for a custom solution at


Operating System Shuffle

I got some software that I’d figured would be easier to run straight out of a windows operating system, rather than through an emulator, so I decided to try to rig up my debian machine with a windows dual boot. So I get the windows 10 iso and write it to a usb key to act as an install disk, something which I had done to install debian on this laptop in the first place. But now, it’s not working. I can’t get bios to find the usb efi file. I don’t want to go out and buy blank dvds, so I rigged up a virtual machine with VirtualBox in debian. On the first try I used a virtual hard disk (vhd) type of too large a fixed size. I didn’t have the space to have VBoxManage convert the thing to into raw format for dd onto the hard drive, and qemu-nbd doesn’t support vhd. So I gotta delete that image, start over with a vdi format virtual disk of a smaller size. This works alright, but for some reason my windows 10 iso isn’t working anymore, says it can’t find drivers. So I download a fresh windows 10 iso and get installed on the new smaller virtual disk. Hopefully, I’ll be able to dd it onto a spare partition I got, grub-update, and I’ll have a working dual boot machine, but if it won’t work, I’ll still have the VirtualBox in debian which can provide full windows experience at a reduced speed.

Alas, the boot configuration files from the VirtualBox vdi won’t work on the hard drive, and editing them is problematic. It can probably be done with the right grub drive mapping and chainloading, but a promising alternative is to use grub loopback to mount the windows 10 iso straight from a location on the hard drive, which I have this evening found to work very well for linux install disks but getting the windows disk to work with ntldr or chainloader remains illusive. In the meantime, there’s always the option of just burning a dvd, but in the meantime I can still work in the virtual windows machine.