Laser Pegs are cool. Arduino boards are cool. So I decided to mix them together. Video 1 and video 2 are small demonstrations of how they can work together.
I will eventually take proper pictures and fully document the project. The short version is:
1x Arduino Uno
1x 2N4401NPN transistor
1x Laser Pegs triangular power base (for the plug)
Several pin-tipped wires
Open up the power base and use a soldering iron to remove one plug from the board. The middle pin is positive (+) and the outer wall is negative (-). Solder wires to the plug so you can plug it into a breadboard. For video 1 I powered the pegs straight from the Arduino, but I recommend and plan to follow the video 2 method of using a transistor too keep from pulling too much power through the Arduino.
Using the Keypad.h library and a 74HC595 shift-register I can now count to 15 in binary. Maybe I can count higher when I get some more LED’s.
The code to run this was mashed together from the following two links:
Arduino Uno: https://www.adafruit.com/products/50
Step one toward joining the Homebrew CPU club has been taken. What I made was a breadboard Arduino based off this design. It took me about a day to build because I kept wiring it up to my Uno incorrectly, but it finally worked.
It’s running a test program that counts up and flashes a light for 1/10th a second every two seconds. Tiny but proof it works. :)
One of my first microcontroller experiments. This uses a Parallax BASIC Stamp 1 Project Board and a discontinued Geosafari Digital Recording Lab. the PBASIC program switches states of a variable when the button is pressed, which turns the LED on or off.
PBASIC code forthcoming.
Still not much time for big, personal projects. However, I have been snatching time here and there for a few, small things.
The Wally Framework, which is still being polished so don’t download it yet. This is a generalized version of the framework I’ve been using for web projects at work this past year. It’s developed in-house, because as good advice as it normally is to use others’ code, I wanted to understand how our LMS worked from top-to-bottom. I also didn’t want to get locked into version n of a framework, have n+1 come with a whole new API, and be left with a largely abandoned code base I’d have to learn from the bottom up.
Racket-learning, my catch-all repository for experiments in Racket. The past couple of weeks I’ve finally been getting into Racket…not like the other times when I’d install it, dabble a few hours, and forget it. Though I doubt I’ll ever be a professional Schemer, I enjoying getting my mind to think in sync with Racket.
Tic-Tac-Toe, a silly diversion during a dull training session which taught me some finer points about WPF. Though I planned to add a single-player feature at the time, some reading of tic-tac-toe game theory…or the lack there of…dissuaded me.
My last post was about how I was late to the Github party, but since then I’ve been using it for most of my personal projects and a few work-related ones. I haven’t had to roll anything back yet, but knowing I can is kind of nice.
Finally started uploading some code to my Github account. Right now it’s one unfinished wrapper and a small client I use at work ever since something more official and Enterpise-y broke. I’m quite late to the Github party, so I suppose that means some new SVC software will start trending soon. Har har.
Work for the past few months has been pretty hectic, hence the lack of updates here. I’ve done a ton of cool stuff, including redoing the E-Learning system at work with my own full stack MVC framework. Learned a lot, learned some things not to do, but it has eaten up a ton of my life. Hopefully as the summer gets here things will slow down enough for me to redesign the site a bit.
I’ve known Perl had libraries like Net::SSH2 and (my preferred, but abandoned) Net::SSH::Perl for a while, but I never used them before a few weeks ago. We needed a script to check the disk use on our Zimbra server. Since I have a thing about running non-standard scripts on what’s essentially an appliance, I chose to have my script shell in to get the df. Since then, and since playing around with it some, I’ve just been kind of gobsmacked at the potential this opens up for script writing.
It feels a bit silly being this gobsmacked, because I’ve coded libraries that use PHP to FTP, written Perl scripts that talk to SMTP servers, and written countless lines of code that generate and consume web services. Making one computer talking to another is what I do. It’s nothing new.
Something about this just feels I’ve stumbled onto Excalibur.
Much to my surprise, it turns out the triangular (technically hexagonal) power base for Laser Pegs will pretty much fit within 16×16 LEGO plate.
Armed with this knowledge, I constructed the above holder so that I could better embed Laser Peg constructs within LEGO (or other brick) structures. You can download the instructions for building the base by clicking here.
Work and side work has been keeping me pretty busy these days, so there’s not much new on the personal project front. Thanks to these I’ve learned a bit more about the WordPress Plug-In API, which is always interesting.
I’m hoping to get some time off this summer so I can get back to seriously learning Scala and Go. I’ve got a VPS with both of them installed, and just waiting to have time to tinker.