Graphing Calculator Dual Boots With Pi Zero

The nearly limitless array of consumer gadgets hackers have shoved the Raspberry Pi into should really come as no surprise. The Pi is cheap, well documented, and in the case of the Pi Zero, incredibly compact. It’s like the thing is begging to get grafted into toys, game systems, or anything else that could use a penguin-flavored infusion.

But this particular project takes it to the next level. Rather than just cramming the Pi and a cheap LCD into his Numworks graphing calculator, [Zardam] integrated it into the device so well that you’d swear it was a feature from the factory. By exploiting the fact that the calculator has some convenient solder pads connected to its SPI bus, he was able to create an application which switches the display between the Pi and the calculator at will. With just a press of a button, he’s able to switch between using the stock calculator software and having full access to the internal Pi Zero.

In a very detailed write-up on his site, [Zardam] explains the process of getting the Pi Zero to output video over SPI. The first part of the battle was re-configuring the GPIO pins and DMA controller. After that, there was the small issue of writing a Linux SPI framebuffer driver. Luckily he was able to find some work done previously by [Sprite_TM] which helped him get on the right track. His final driver is able to push 320×240 video at 50 FPS via GPIO, more than enough to kick back with some DOOM.

With video sorted out, he still needed a way to interface the calculator’s keyboard with the Pi. For this, he added a function in his calculator application that echoed the keys pressed to the calculator’s UART port. This is connected to the Pi, where a daemon is listening for key presses. The daemon then generates the appropriate keycodes for the kernel via uinput. [Zardam] acknowledges this part of the system could do with some refinement, but judging by the video after the break, it works well enough for a first version.

We’ve seen the Pi Zero get transplanted into everything from a 56K modem to the venerated Game Boy, and figured nothing would surprise us at this point. But we’ve got to say, this is one of the cleanest and most practical builds we’ve seen yet.

[Thanks to EdS for the tip]

Continue reading “Graphing Calculator Dual Boots With Pi Zero”

Pi Zero Gives Telescope Hands Free Focus

It seems like [Jason Bowling] never gets tired of finding new ways to combine the Raspberry Pi with his love of the cosmos. This time he’s come up with a very straightforward way of focusing his Celestron 127SLT with everyone’s favorite Linux SBC. He found the focus mechanism on the scope to be a bit fiddly, and operating it by hand was becoming a chore. With the Pi Zero and a stepper motor, he’s now able to focus the telescope with more accuracy and repeatability than clumsy human fingers will be able to replicate.

On this particular type of telescope, the focus knob is a small knob on the back of the scope (rather than on the eyepiece), which just so happens to be the perfect size to slide a 15mm bore pulley over. With a pulley on the focus knob, he just needed to mount a stepper motor with matching toothed pulley next to it and find a small enough belt to link them together. Through the magic of Amazon and McMaster-Carr he was able to find all the parts without having to make anything himself, beyond the bent piece of aluminum he’s using as a stepper mount.

To control the stepper, [Jason] is using an EasyDriver connected up to the Pi’s GPIO, which along with a 5V regulator (which appears to be a UBEC from the RC world) is held in a tidy weather proof box mounted to the telescope’s tripod. The regulator is necessary because the whole setup is powered by a 12V portable “jump start” battery pack for portability. Handy when you’re stargazing in the middle of a field somewhere.

[Jason] promises a future blog post where he details how he used Flask to create a web-based control for the hardware, which we’ll be keeping an eye out for. In the meantime, he reports that his automated focus system is working perfectly and keeps the image stable in the eyepiece even while moving (something he was never able to do by hand).

Last year this same scope had a Raspberry Pi camera mounted to it to deliver some very impressive pictures without breaking the bank. We’re interested in seeing how [Jason] ties these systems together going forward.

Cramming A Pi Zero Into A Cheap Handheld Game

At this point, we’ve seen the Raspberry Pi jammed into what amounts to every retro game system, handheld or otherwise, that was ever released. While they’re always fun builds, invariably somebody will come along who is upset that the original hardware had to be gutted to create it. It seems as if with each post, a classic gaming aficionado out there has his or her heart broken just a bit more. Will no one put an end to the senseless slaughter of Game Boys?

As it so happens, not all hardware modders are such unconscionable brutes. [Starfire] recently sent his latest creation into the tip line, and it’s designed specifically to address the classic gaming massacre in which Hackaday has so shamefully been a collaborator.  His build sacrifices a portable Genesis built by AtGames, and turns it into a Raspberry Pi Zero portable running RetroPie.

Opening up the back panel of his portable Pi shows an incredible amount of hardware smashed into the tiny package. Beyond the obvious Pi Zero, there’s a iUniker 2.8-inch LCD, a 2,200 mAh battery, a two-port USB hub, a Teensy microcontroller, a USB sound card, an audio amplifier, a LiPo charging module, and a boost converter. [Starfire] measured peak power consumption to be 500 mA, which should give about a 3.5 hour run time on the 2,200 mAh battery.

This is all the more impressive when you realize the original AtGames PCB is still in the system, albeit with the center cut out for the Pi’s LCD to fit in. Rather than having to figure out a new way to handle input, [Starfire] simply connected the existing inputs to the digital pins on the Teensy and used some code to convert that into USB HID for the Pi. A few case modifications were necessary, namely the removal of the battery compartment from the back panel and covering up the original SD card slot and ports; but otherwise the finished product looks completely stock.

If you don’t mind tearing into a real Game Boy to make your portable Pi, you can check out a few of the stand out examples which we’ve covered here in the past.

Continue reading “Cramming A Pi Zero Into A Cheap Handheld Game”

Color Changing Clock Gets A Pi Zero Heart

Hackaday reader [Don] dropped by the tip line recently to let us know about the latest version of his color-changing LCD clock project. This is his second version of the hardware which makes some pretty big improvements over the original, including moving from the Pi B to the Pi Zero and an internal simplification of the wiring. He mentions the next revision of the project will focus on Google Home integration, which should be interesting to see.

As a father of two pre-school age children, he was looking for a way to help his kids understand the concept of time and scheduled activities. Colors and shapes come fairly easy to children of this age, but time and how it relates to the day is a bit more difficult for them especially as their comprehension of numbers is still developing. [Don] reasoned that even if they couldn’t read the numbers on the clock yet, if he had the display change colors to indicate different periods of the day (sleep, play, cleanup, etc), it would not only keep them on schedule, but reinforce the meaning of the numbers on the screen.

ShiftBrite installed in the projector.

The project was made infinitely easier by a lucky find at a local retailer. For $10 he got a kid-friendly looking clock that utilized a simple projector to backlight the LCD display. This meant [Don] would just need to swap out the stock lighting module for a controllable RGB LED, and the hardware modifications would essentially be complete.

Even the Pi Zero fits perfectly inside the case of the clock, the only modification necessary was cutting a little hole in the back for the Pi’s micro USB port. His earlier version used an external Pi B connected to the clock via CAT5, so getting it all integrated into the one device is a huge improvement, especially when little kids are involved. Moving the Pi and its 5 V pins into the clock itself also allowed [Don] to drop the voltage regulator required previously.

With the basic hardware for a color changing LCD clock together, the rest of the project was just a matter of software. After some research, [Don] came across RPi-ShiftBrite by [Hive13] and made his own fork which added some features necessary for his project, namely the ability to quickly set the ShiftBrite to a specific color on the command line. To schedule the color changes, he used the very slick minicron: a web-based tool to create and monitor Linux cron jobs.

The Pi itself does not actually interface with the clock, and with no onboard RTC it’s necessary to keep it updated with NTP or else the times will become desynchronized. It can be necessary to sync the Pi’s clock to the Internet as often as every hour to make sure the colors shift at the appropriate times. The addition of a RTC module like the DS1307 could alleviate this issue and might be something to consider for a future revision.

All told, a fantastic project and something we’ll be sure to keep our eyes on as it progresses. We’ve seen our share of unique Raspberry Pi powered clocks, and even a few color changing ones, but this approach is easily the most straight-forward we’ve seen.

Continue reading “Color Changing Clock Gets A Pi Zero Heart”

Evil Hotspot Costume Makes Valuable Connections

This year for Hallowe’en, [Scott] went out dressed as a Comcast xfinity hotspot. Funny, yes, but there’s a deeper meaning here. [Scott] really went as a walking PSA that illustrates the dangers of making assumptions about the relative safety of WiFi networks based solely on their broadcast names.

[Scott] could have gone chaotic evil with this setup, but he didn’t. No one could actually get on the Internet through him. Inside the “hotspot” are a Wi-Fi adapter and a Pi Zero running a captive portal. It broadcasts the default ‘XFINITY’ and ‘xfinitywifi’ SSIDs, plus a bunch of other common network names. Whenever anyone tries to connect, or worse, their phone automatically connects, they’ll hear a sad tuba cadence. This comes courtesy of a multi-sound effects box that’s controlled by the Pi through a relay board.

Meanwhile, the mark’s device is redirected to an internally-hosted “xfinity” login page. Anyone who actually goes on to enter their login credentials is treated to a classic horror film scream sample while the evil hotspot quietly stores their name and password and displays them on an e-ink display for all to see — a walking e-ink wall of sheep. Check out the demo after the break.

[Scott]’s evil hotspot is powered by a huge battery that can run it for 24 hours. Here’s a wind- and solar-powered WAP we covered several years ago.

Continue reading “Evil Hotspot Costume Makes Valuable Connections”

Simultaneous AP & Client On The Pi Zero W

The Raspberry Pi Zero W is a great platform for IoT projects, with a smattering of GPIO and onboard WiFi. However, security is an important consideration when it comes to the Internet of Things and it can be beneficial to keep your IoT devices on a separate network for safety’s sake. [Albert] wanted to do this all on board the Pi Zero W, and figured out how to get it acting as an access point and a client all at the same time.

[Albert] starts off with a fresh install of Raspbian Stretch, and sets the Pi up in OTG mode. This allows access to the Pi over a USB serial terminal. This is great for productivity when working on headless networking projects, as it can be frustrating trying to work with an SSH session that keeps dropping out when you change settings.

After creating a second named device (ap0) to go along with the one created automatically by the kernal (wlan0), DNSmasq is installed to act as a DHCP server for the AP. Hostapd is then installed to control the AP settings. Following this, like anything in Linux, a flurry of configuration files are edited to get everything humming along and starting up automatically after a reboot. For some reason, things don’t start up smoothly, so [Albert] has a cron job that fires 30 seconds after bootup and toggles the interfaces off and on again, and that’s done the trick.

It’s a useful hack, as it allows the Pi Zero to act as a hub for IoT devices, while also creating a bridge between them and the internet. Traffic can be managed to stop random internet users flicking your lights on and off and overspeeding your dishwasher.

We’ve seen the Pi Zero used for just about everything under the sun so far. If you’re just starting your own IoT build, perhaps you’d like to use the Pi Zero as a streaming camera?

 

Hackaday Prize Entry: Visioneer Sensor HUD

Only about two percent of the blind or visually impaired work with guide animals and assistive canes have their own limitations. There are wearable devices out there that take sensor data and turn the world into something a visually impaired person can understand, but these are expensive. The Visioneer is a wearable device that was intended as a sensor package for the benefit of visually impaired persons. The key feature: it’s really inexpensive.

The Visioneer consists of a pair of sunglasses, two cameras, sensors, a Pi Zero, and bone conduction transducers for audio and vibration feedback. The Pi listens to a 3-axis accelerometer and gyroscope, a laser proximity sensor for obstacle detection within 6.5ft, and a pair of NOIR cameras. This data is processed by neural nets and OpenCV, giving the wearer motion detection and object recognition. A 2200mA battery powers it all.

When the accelerometer determines that the person is walking, the software switches into obstacle avoidance mode. However, if the wearer is standing still, the Visioneer assumes you’re looking to interact with nearby objects, leveraging object recognition software and haptic/audio cues to relay the information. It’s a great device, and unlike most commercial versions of ‘glasses-based object detection’ devices, the BOM cost on this project is only about $100. Even if you double or triple that (as you should), that’s still almost an order of magnitude of cost reduction.