Saturday, July 21, 2012

Holy oscilloscope, Batman!

I bought an analog Hewlett-Packard oscilloscope today. It was designed in the 70s, built in 1985, and decommissioned by the US Navy in 1993. Still going strong apparently. It's about two feet long (which is not evident in the picture, but it does not fit on my recliner). I don't have any test leads yet, but this is one of the two tools I needed to start working on switch-mode power supplies. It also makes me feel like I'm back in my Circuits I class with lab equipment that rarely worked. Hopefully this will go better!

Sunday, July 1, 2012

Outlet Control Pictures


I took some pictures while I was making a permanent enclosure for my web-controlled power outlets. These are going in the kitchen and are attached to the old Gateway that plays my fridge music and serves up my tunes. I made it work in a way that each plug on the outlet can be independently controlled.

 

 Oh, and I used a ton of hot glue to seal everything up...

 



I took 12V DC control wiring from the IDE drives' power wires and ran it out of the front of the computer.



Very professional!




New update relating to my lamp: I was successfully able to install a webcam and set it up to monitor the lamp. This is more of a temporary solution until I can learn Python.

Any way! I installed a program called "streamer" which can do many things, including take a JPEG picture from a webcam. Then I wrote a script to run this program every second.

#!/bin/sh
while [ true ] do 
 streamer -s 640x480 -f jpeg -o /var/www/images/snapshot.jpeg 
 sleep 1
done

The picture gets rewritten every time it runs. That way the web server doesn't need to think about which picture to show. Now I need to execute this program as root at boot time. I added a line to the /etc/init.d/rc.local file:

/home/bryan/streamer &

Hooray! This method obviously takes quite a bit more system resources. If this was something that people would look at all the time, maybe it would be a good method, but I'll maybe use this once a week, so hopefully when I learn Python I'll figure out a way to execute the "streamer" program once when the page is requested.