Purely Functional Selfies: Thermal Printer Speaks Haskell

[Dan] recently got a cheap POS thermal printer to chooch remotely over ESP32. Having conquered that project, he decided to see what else he could get the printer to do. Why not use it to print pictures? Sure, it’s been done, but not with Haskell. And yeah, the pictures will be grainy and weird-ish and limited to black and white, but hey, we love black and white around here as much as the idea of doing something simply because you can.

In the first project, [Dan] had to figure out how to talk to the printer since the RS422 cable it came with didn’t seem to work. He bought a TTL-to-RS485 adapter, but then realized he could use TTL directly and wired up a ESP32/OLED dev board to it. During the course of turning it into a photo booth, he had to switch to a bigger screen with a better refresh rate.

Unfortunately, [Dan] was unable to use Haskell by itself. He blames this on the cobwebs in the Haskell ecosystem, something that isn’t a problem for languages like Python that celebrate wide usage and support. [Dan] wrote a Python script that handles image capturing, display, and listening for touch activity on the screen, but Haskell ultimately controls the printer. Check out [Dan]’s demo after the break.

This project may have been trying at times, but at least [Dan] didn’t have to give it a brain transplant to get it to do what he wanted.

Continue reading “Purely Functional Selfies: Thermal Printer Speaks Haskell”

Pi Replaces Keiko-chan

[Tobias Kuhn] and a handful of colleagues at his workplace built Crystal Signal Pi, a Raspberry Pi based low-cost alternative for a notification device that provides visual, audio and network warnings about server problems. [Tobias] works for a Japanese company where it is critical for their servers to keep humming nicely all the time. Any emergencies or error conditions must be broadcast immediately so the technicians can fix it ASAP. Network enabled warning light stalks are used to provide these alerts. A local company produces a series of indicator and hazard warning lights which are colloquially called as Keiko-chan. These are similar to the hazard warning tower lights commonly fixed on machines on factory floors or many kinds of vehicles such as fork lifts. The Kieko-chans add a few bells and whistles making them more suitable for use in the server data centre — a Gigabit LAN port for wired networks and a USB port for WiFi modules. So, besides visual and audio warnings, it can also transmit messages over the network to alert the maintenance folks. Using this commercial solution should not have been a problem were it not for their rather hefty price tag of almost $500 per pop.

So [Tobias] decided to build his own warning lights based around the Raspberry Pi. After two rounds of prototypes, a simple HAT was designed that could be plugged in to a Pi. Details of the hardware are sketchy, but it’s simple enough to figure out. The part list consists of a PLCC-6 style RGB LED, three transistors to drive the three LED pins, a voltage regulator with a couple of electrolytic capacitors and a large push button. A simple acrylic case, and an acrylic cylinder mounted on top of the RGB LED creates a nice edge lit effect for the indicator.

The code for the Crystal Pi is hosted on Github, and includes handy scripts to make installation easy. Once installed, the Crystal Pi can be accessed and controlled either through a web-based GUI or via the API. There are some more interesting features already implemented or scheduled for later, so do check out the blog and the repository for more. Check out the video below to see the Crystal Pi in action.

Continue reading “Pi Replaces Keiko-chan”

Rage Against The Dying Of The Light With A Raspi Night Vision Camera

One of the most interesting things about hacking is the difference between the vision we have at the beginning and the reality of we’ve built at the end. What began as a simple plan to build a night vision VR headset turned into a five-month adventure for [facelessloser] that culminated in this great-looking camera. He thought it would be easy, but almost every aspect presented some kind of challenge. The important thing is that he kept at it.

One of the major issues [facelessloser] encountered was power. He found that the Pi (Zero W), the screen, and the IR LEDs draw between 1.5 and 2A altogether. He was able to solve this one by using the charging board from a 2A power bank paired with a 1200mAh Li-Po built for the high draw required by vaping. If not for space issues, he might have used a 18650 or two.

Another challenge he faced was storing the video and images. He’d considered setting up the Pi as an access point to view them from a phone browser, but ultimately extended a USB port with an OTG cable to use flash drives. With a bit of Python he can watch for the drive to mount and then write to it. If the flash drive suddenly disappears, the Pi starts saving to the SD card.

There are two videos after the break, a walk through and a night vision demo. You’ll see a bit of a lag happening in the demo video—that’s because [facelessloser] is running the feed through PyGame first. No matter what nightlife you want to peep, it might be nice to add automated zoom with a rangefinder or get a closer look with some PiNoculars.

Continue reading “Rage Against The Dying Of The Light With A Raspi Night Vision Camera”

Bringing MATLAB To A Vacuum Near You

The essence of hacking is modifying something to do a different function. Many of us learned as kids, though, that turning the family TV into an oscilloscope often got you into trouble.

These days, TVs are flat and don’t have high voltage inside, but there’s always the family robot, often known as a Roomba. Besides providing feline transportation, these little pancake-shaped robots also clean floors.

If you don’t want to evict the cat and still get a robust domestic robot platform for experimentation, about $200 will get you a Roomba made to be hacked — the iRobot Create 2. [Gstatum] has a tutorial for using a Raspberry Pi and MATLAB to get one quickly running and even doing basic object recognition using the Pi’s camera.

The code even interfaces with Twitter. The impressive part is the code fits on about a page. This isn’t, however, completely autonomous. It uses a connected phone’s sensor’s so that the phone’s orientation controls the robot’s motion, but the robot does use sensors to prevent driving into walls or falling off a cliff. It also can detect being picked up and uses the Pi’s camera to detect a green flag.

Continue reading “Bringing MATLAB To A Vacuum Near You”

Python Keeps A Gecko Happy: Terrarium Automation With Raspberry Pi

For better or worse, pets often serve as inspiration and test subjects for hardware hacks: smarten up that hamster wheel, tweet the squirrel hunting adventures from a dog’s point of view, or automate and remote control a reptile enclosure. [TheYOSH], a gecko breeder from the Netherlands, chose the latter and wrote TerrariumPi for the Raspberry Pi to control and monitor his exotic companion’s home through a convenient web interface.

The right ecosystem is crucial to the health and happiness of any animal that isn’t native to its involuntarily chosen surroundings. Simulating temperature, humidity and lighting of its natural habitat should therefore be the number one priority for any pet owner. The more that simulation process is reliably automated, the less anyone needs to worry.

TerrariumPi supports all the common temperature/humidity sensors and relay boards you will find for the Raspberry Pi out of the box, and can utilize heating and cooling, watering and spraying, as well as lighting based on fixed time intervals or sensor feedback. It even supports location based sunrise and sunset simulation — your critter might just think it never left Madagascar, New Caledonia or Brazil. All the configuration and monitoring happens in the browser, as demonstrated in [TheYOSH]’s live system with public read access (in Dutch).

It only seems natural that Python was the language of choice for a reptile-related system. On the other hand, it doesn’t have to be strictly used for reptiles or even terrariums; TerrariumPi will take care of aquariums and any other type of vivarium equally well. After all, we have seen the Raspberry Pi handling greenhouses and automating mushroom cultivation before.

Distributed Air Quality Monitoring Via Taxi Fleet

When [James] moved to Lima, Peru, he brought his jogging habit with him. His morning jaunts to the coast involve crossing a few busy streets that are often occupied by old, smoke-belching diesel trucks. [James] noticed that his throat would tickle a bit when he got back home. A recent study linking air pollution to dementia risk made him wonder how cities could monitor air quality on a street-by-street basis, rather than relying on a few scattered stations. Lima has a lot of taxis, so why wire them up with sensors and monitor the air quality in real-time?

This taxi data logger’s chief purpose is collect airborne particulate counts and illustrate the pollution level with a Google Maps overlay. [James] used a light-scattering particle sensor and a Raspi 3 to send the data to the cloud via Android Things. Since the Pi only has one native UART, [James] used it for the particle sensor and connected the data-heavy GPS module through an FTDI serial adapter. There’s also a GPS to locate the cab and a temperature/humidity/pressure sensor to get a fuller environmental picture.

Take a ride past the break to go on the walk through, and stick around for the testing video if you want to drive around Lima for a bit. Interested in monitoring your own personal air quality? Here’s a DIY version that uses a dust sensor.

Continue reading “Distributed Air Quality Monitoring Via Taxi Fleet”

FatPiBoy: Respin Game Boy With A Pop-Out Controller

Have you ever found yourself wishing you had a clone of the Game Boy, except it was actually twice as wide, and instead of holding it in your hands you pop a tiny separate controller out of the middle and play it that way? No? Well, neither have we. But that didn’t stop [Christian Reinbacher] from designing and building exactly that, and by the looks of the finished product, we have to say he might be onto something.

To be fair, the charmingly-named FatPiBoy is not really meant to be played like the GameBoy of yesteryear. It’s more like a game console with built in display; you prop the console up on something, and then remove the controller from the system and play that way.

The controller itself is a commercial product, the 8bitdo Zero, but [Christian] based the rest of the system on parts intended for the Adafruit PiGRRL. For the battery, [Christian] used a 4,500 mAh pack that was originally from his Nexus 7 tablet; a tip to keep in mind next time you’re looking for a big and cheap lithium-ion battery.

[Christian] notes that the case design isn’t perfect. There’s currently no external access to the Pi’s USB ports, and the recess for the 8bitdo Zero could be a few millimeters deeper. Still, we think he did an excellent job finishing the case and giving it a professional look; the case and controller look like nearly a perfect match.

This isn’t the first time we’ve seen a Raspberry Pi put on a GameBoy costume, but the FatPiBoy does bring something new to the table with its removable controller. Of course, if you think the controller [Christian] selected for this build is a bit too small, you can always substitute your own