Light Probe – More Woodworking

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.

 

That’s it for now.

Installing Kali on a Raspberry Pi Zero W

Overview

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. 😉

Materials Needed
Process
  1. Format the card with the flasher utility
  2. Write the ISO to the card with Etcher.
  3. Boot up the pi.
References

Arduino to Raspberry – A convert?

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.

I’m on Twitter. 

Light Probe – Base Unit Complete

The Light Probe Base

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:

  1. Measured the servo, and plotted out where it needed to go on the board.
  2. Cut a circle using my table saw and a guide my circle jig.
  3. Routed out the hole for the servo with a Dremel.
  4. Cleaned up the hole with a tiny file.
  5. Carved out a groove for the cables with a round chisel and hammer
  6. Cut the two 8 cm basswood pieces
  7. Pre-drilled two 1/16″ holes for the wood screws.
  8. Counter sunk the holes deep enough so the screw heads are recessed.
  9. Placed in the servo.
  10. 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…

I’m on Twitter. 

Light Probe – Small Adjustments

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.

Latest build here.
Latest source code is on GitHub.
I’m on Twitter. 

Light Probe – Time For A (Mega) Upgrade

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.

Latest build here.
Latest source code is on GitHub.
I’m on Twitter. 

Light Probe – Added an LCD Display

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!

Latest Hardware Pic

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).

Latest build here.
Latest source code is on GitHub.
I’m on Twitter. 

Light Probe – Hello CLI Tab!

Short and sweet because it’s almost time to start work for the day…

Light Probe CLI

Got the CLI tab working. Ended up changing the results from a textbox to a listbox. Thinking I might later add the ability to double click an item in that window to execute it as a command…

References:

  • https://stackoverflow.com/questions/18988170/making-a-net-textbox-work-fifo-style
  • https://stackoverflow.com/questions/4140723/how-to-remove-new-line-characters-from-a-string

Latest build here.
Latest source code is on GitHub.
I’m on Twitter.