Bytebox

0 views
Skip to first unread message

Lorin Mandaloniz

unread,
Aug 4, 2024, 12:08:09 PM8/4/24
to nodkofiper
The idea for the bytebox came shortly after discovering the blinkstick. After scrambling for ideas to justify the purchase I decided on something simple. Making it temperature controlled, displaying colour to represent the current room temperature.
A few lines of code added to the main script and it was all setup to move on from the Red/Blue LEDs on the breadboard to the blink stick. Initially it was setup for 3 temperatures to show Cold (Blue), Optimal (Green) and Warm (Red).
After a little while of tweaking the code and adjusting the ranges slightly one thing that I decided I wanted was dynamic colour shifting based on temperatre as the dramatic shift between the 3 colours would be sudden and distracting.
At first I expanded from 3 to 8 colours and used the blinkstick APIs Morph function which gently shifts from its current colour to the next defined colour. This worked fine and gave a colour changing effect which was less sudden.
However even with this I felt only having 8 colours for a range between 10 and 30 degrees Celsius wasnt an accurate colour representation so I needed to go back to the drawing board and rethink the way colour changes.
Each pixel on the horizontal line represents a temperature starting at the left side (blue) which is 10C and moves through to the right in 0.1C increments. The function for handling this takes a temperature value and matches this to its index number which is directly linked to the pixel value on the H axis. The pix function of the PIL library then fetches the RGB value of the pixel and returns this. The RGB value is then sent to the Blinkstick and is displayed on the coloured cube.
The idea to include a 7 Segment display came fairly late on into the project but I had always wanted to use one so I decided to include it and use it to display the exact room temperature (Even with a tonne of new colours displayed it was still nice to see the exact temp!)
Once all the code was written and the hardware prototyped and fully tested it came time to solder it all together. This would be the first time soldering and knowing I would need to solder the 40 pin header to the Pi Zero ( even more daunting knowing how hard they were to get a hold of, and still are!). I started out soldering some odd bits of wire to a copper PCB I picked up at Maplins.
After a little while I tired of the practice soldering and wanted to jump into the real thing so I soldered the pins to the BMP180 temperature sensor and the 7 Segment Display and all was disaster free!
Next stage was finding a suitable housing for the project, initially I had planned to fit it all into a perspex cube. I had checked out the various options for this including making my own and having one 3D printed. But both options turned out to be fairly expensive. Eventually I decided to house the project in a box frame with a frosted glass front.
This was completed however I don't have any images as it didn't stay assembled for long. I wasnt happy with the final outcome. The Blinkstick square I was using was mounted too close to the glass panel and the light from this wasn't properly defused and only illuminated a small section. To combat this I decided to rethink the lighting and look for a deeper box frame.
Sorry for the blurry image but as you can see from this it gave a much more even distribution of light. At this stage I was happy with the light arrangement but the frame still wasn't perfect, it was only 22mm deep and whilst this was enough to fit everything in, it was a little too snug for my liking.
3a8082e126
Reply all
Reply to author
Forward
0 new messages