In the summer of 2011 I made a pledge to a kick starter project for an Open Source light. After a little under 2 years the programmable flashlight has started to ship. I just recived mine and the wait was worth it. The quality of the flashlight is amazing. It feels great in your hand. The only thing I would change in its design is where the on off switch is located. I would have prefer it to be located near the front of the flashlight instead of the bottom but that would cause other problems.
The core of the the HexBright can be removed completely from the flashlight. This will allow for updating and repairing as time goes on.
My biggest challenge was figuring out how to upload a new program on Linux. The process is really simple but finding the instructions on how to setup a development environment was a bit of a challenge.
Install arduino or sudo apt-get install arduino
Create the directory /home/
Put boards.txt in that directory
Under Tools->Board select Hexbright
Now you can open on of the samples and upload it to your flashlight.
The default firmware has 4 modes low, medium, high and blink. I have tried a few others. The process is very easy.
I would highly recommend this flashlight. Even if you are never going to change the program in it. It's build quality is impressive and on high I think you could blind someone. I am looking forward to using it on a camping trip this summer. You can get one here
I have been working on a project that is indexing a large amount of data. I ran into a wall with MySQL. With in an hour of running it went from around 2-3secs every 1000 rows inserted to 40secs and continued to raise. At the decline in speed I would be dead by the time it finished indexing the data I need it to. I did a search and found Postgresql. With a few tweaks to my code I was able to get postgresql to process 10,000 records in about 6-15secs. It seems to float back and forth between these times. With the switch I ran into an new problem one I had not had with MySQL possibly because I had not processed enough data but I think it was a Postgresql problem. I would get the error
psycopg2.DataError: invalid byte sequence for encoding "UTF8": 0x8f
HINT: This error can also happen if the byte sequence does not match the encoding expected by the server, which is controlled by "client_encoding".
After some reading I found that this was a problem in an attempt to convert a special character to UTF8. Since I didn’t need the special characters I proceed to strip them out from the data.
Python: for c in subject: if ord(c)>127 or ord(c)<9: c="_" subject2=subject2+c
This lowered the frequency of this happening but every once and a while I would get the error message again. For the longest time I wasn’t able to figure out why. It turns out I had failed to account for the escape character '\' if only the error message came back as error invalid byte sequence for encoding "UTF8": 0x8f … \8934 … I may have figured this one out sooner. Beside for this one problem working with protgresql has been a pleasant experience.
I have been thinking of making a display like this for a few years and after seeing the Marquee LED Display on slashdot.org I finally had a nice starting point.
The idea was to create a display that will play one of my favored games Tetris. I went with a 10x16 grid for my display. The reason for this is it would leave me with 2 pins free for future add-ons to the program.
Stuff need for project:
First successful test of the display and display driver
Tetris code now working with the display
Nerdkit moved on to project board with display
Went up to Lindeman Lake this weekend. The weather was amazing. Took up a small inflatable raft and learned a valuable lesson. Spend the extra 20 bucks for the 2 paddle set, it is worth it.
Check out my pics here.
Hello, and welcome to my home page. Have put up a few programming projects that I have worked on over the years and some other stuff. This page will not be updated often. Feel free to e-mail me at firstname.lastname@example.org.