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 – A Research Project

I’ve decided to finally build the self-tuning Wi-Fi antenna I’ve been dreaming about for a few years now.  I figured it would make sense to start with something a tad easier, but with transferable skills and code. Hence I’m building an arm that orients itself toward light.  It will accomplish this with 4 photoresistors and some math. (I may eventually trim it back to 3 photoresistors). They’re broken down into Upper Left, Upper Right, Lower Left, and Lower Right.  Basically the code flow goes like this:

    1. Read all the sensors
    2. If the left and right sensors are reading equal strength make no lateral adjustments, otherwise move toward the stronger signal.
    3. Same concept for vertical sensors.
    4. Rinse lather repeat until everything is reading the same values and you are (hopefully) oriented towards the light source.

To go with this hardware, I’m writing a UI in WPF/XAML (because I know it, don’t judge me!) It’s fun, and quick to set up. So far it’s giving me live readouts of the sensor values. This is accomplished using a simple set of fixed length values passed via Serial.  I’m currently primarily using USB cable, but I do have a bluetooth module ready to go once I get things polished up a bit.

For now the code is UGLY!!!! I know this. Don’t care. Will refactor is later as I get things working. For now it’s all about getting things to actually function.

Details and source code can be found on Github at https://github.com/pyrrh1c/Light-Probe.