Got into the shop and (crudely) built out the next part of the light arm. I have a seemingly endless supply of scrap 3/4″ plywood laying around, so that’s what I used. Made the lower part of the rotating mechanism 10 cm square then rounded the corners for effect. The vertical part of the rotating mechanism is a simple 10cm by 12 cm. I recessed the servo just like last time. Finally, I attached a 1/2″ x 1/2″ piece of scrap basswood to the vertical axis servo. Ugly as sin, but it works well enough.
Here you can see the unit disassembled into its two pieces. To assemble it I just slide the servo horn onto the shaft.
Here’s the unit assembled. the top portion spins on the X axis and the arm spins on the Y axis. I’m going to attach the photo resistors to a mechanism at the end of the arm.
I love my little Pi Zero W’s, and I love Kali. So why not combine the two? So here’s a post about Installing Kali Linux on a Raspberry Pi Zero W. I’ve done this before, and it’s reasonably well documented elsewhere, but I hate googling for all the pieces each time I do this so I figured I’d make a blog post documenting it all for the future so I’ve got all the links in one place
FWIW, I do most of my daily driving on Windows because that’s what I use at work. Hence this will be written for a Windows PC. It’s also high level because honestly, this is easy and if you’re goal is to install Kali on an rpi0w, you probably don’t need much hand holding. 😉
Raspberry Pi Zero W
Micro SD Card (8GB or bigger)
Accessories for Raspberry Pi Zero (Micro USB to full size USB, Micro HDMI to HDMi, Micro USB power supply, etc.)
So I recently learned just how easy it is to do GPIO on the raspberry pi. So I tried it. I already had several zero W’s, but none with headers. So during my last trip to Micro Center I picked one up with the headers. I put Raspian on it and was ready to go. After some quick Googling I found an example. Got that running and can now interact with GPIO in Python… Total time spent about 15 minutes… Can’t beat that.
All that said, I see this as being useful for overlapping, but not identical purposes to Arduino. I think they will work together nicely for me in the future.
Finally got to the workshop! Built the base unit for the probe. Nothing sexy, but very much functional. It’s a 10 cm round piece of 3/4″ birch furniture grade plywood. (Scraps from a past project). Below it are two strips of 1/2″ basswood cut to 8 cm and screwed on with countersunk 1″ wood screws. Only took about 20 minutes start to finish.
The build went like this:
Measured the servo, and plotted out where it needed to go on the board.
Cut a circle using my table saw and a guide my circle jig.
Routed out the hole for the servo with a Dremel.
Cleaned up the hole with a tiny file.
Carved out a groove for the cables with a round chisel and hammer
Cut the two 8 cm basswood pieces
Pre-drilled two 1/16″ holes for the wood screws.
Counter sunk the holes deep enough so the screw heads are recessed.
Placed in the servo.
It’s snug enough that I don’t really need to use the screw mounts for what I’m doing.
Like I said, not sexy. But it’s very stable, does the job, and cost me nothing but time. All said and done. I like it.
Version 2 might have the base plate carved into the Pyrrh1c logo…
Spent a few hours addressing some odds and ends today. Got the “enter” key working from CLI entry textbox. It now actually runs the command when you hit enter, then clears the entry textbox. I also added a CLI command to display the LCD Address. SHOW-LCDADDRESS is working as expected.
I made the LCD settings variables. (address, total rows, total columns). This was done just as a best practice to facilitate easier use of different LCD’s later.
The functions in the Arduino code were moved around into a more logical sequence. Doesn’t affect code flow, but does affect readability.
So as this project has grown I’ve started to see memory warnings in the IDE. “Low memory available, stability problems may occur.” Didn’t think too much about it until today when I kept running into weird issues where stable code just wouldn’t run correctly. For example, the printNextline() would only print half the output of the line (WTF?) and the parseAndExecuteCommands(). After spending an embarrassingly long time picking through the code looking for the problem I decided to actually the shiny new Mega 2560 I bought the first time I saw the command and put that baby into production.
Learned the Mega is not a straight pin-for-pin match of the Uno. Mega has a SDA/SDC pins (Sweet), and for whatever reason the LCD2004 has a difference address on the Mega than on the Uno. 0x37 and 0x3f respectively. That said, after I got the conversion done it’s running smoothly again.
Still haven’t been able to get into the shop to build out the frame for the the arm yet. However, that doesn’t mean I’ve been idle!
Decided to take the opportunity to start adding the LCD display I wanted. I grabbed a spare display I had lying around and get started. Found some good articles over on Robojax and got it set up.
I have it set up so that ever N’th time the arduino sends a serial line transmission of the current values it updates the LCD. This means the LCD isn’t as current as the serial monitor, but I found the refresh rate of the LCD was too slow to keep up. I plan to add more functionality to fine tune this via the C# app and the CLI, but for this morning just getting it running was good enough for me. I’d like to add “Enable-LcdUpdate”, “Disable-LcdUpdate”, and “Set-LcdInterval” commands. Possibly an option to choose what is displayed as well (servo’s vs sensors or something like that).