A Raspberry Pi Rain Man In The Making

We see a lot of Raspberry Pis used to play games, but this is something entirely different from the latest RetroPie build. This Raspberry Pi is learning how to read playing cards, with the goal of becoming the ultimate card counting blackjack player.

If [Taxi-guy] hasn’t named his project Rain Man, we humbly suggest that he does so. Because a Pi that can count into a six-deck shoe would be quite a thing, even though it would never be allowed anywhere near a casino. Hurdle number one in counting cards is reading them, and [Taxi-guy] has done a solid job of leveraging the power of OpenCV on a Pi 3 for the task. His description in the video below is very detailed, but the approach is simple: find the cards in a PiCam image of the playing field using a combination of thresholding and contouring. Then, with the cards isolated, compare the rank and suit in the upper left corner of the rotated card image to prototype images to identify the card. The Pi provides enough horsepower to quickly identify an arbitrary number of non-overlapping cards; we assume [Taxi-guy] will have to address overlapping cards and decks that use different fonts at some point.

We’re keen to see this Pi playing blackjack someday. As he’s coding that up, he may want to look at algorithmic approaches to blackjack strategies, and the real odds of beating the house.

Continue reading “A Raspberry Pi Rain Man In The Making”

Untether From Your Location With A VPN

By now, most of us know the perks of using a VPN: they make private one’s online activity (at least from your ISP’s point of view, probably), and they can also make it appear as if you are in a different locale than you physically are. This is especially important for trying to watch events such as the Olympics which might air different things at different times in different countries. It’s also starting to be an issue with services like Netflix which allow content in some areas but not others.

While VPNs can help solve this problem, it can be tedious to set them up for specific purposes like this if you have to do it often. Luckily, [clashtherage] has created a router with a Raspberry Pi that takes care of all of the complicated VPN routing automatically. In much the same way that another RPi router we’ve seen eliminates ads from all of your internet traffic, this one takes all of your traffic and sends it to a locale of your choosing. (In theory one could use both at the same time.)

Obviously this creates issues for Netflix as a company, and indeed a number of services (like craigslist, for example) are starting to block access to their sites if they detect that a VPN is being used. Of course, this only leads to an arms race of VPNs being blocked, and them finding ways around the obstacles, and on and on. If only IPv6 was finally implemented, we might have a solution for all of these issues.

Terrible Cluster Of PIs

When we first saw [Ajlitt’s] Hackaday.io project Terrible Cluster we thought, perhaps, he meant terrible in the sense of the third definition:

3. exciting terror, awe, or great fear; dreadful; awful. (Dictionary.com)

After looking at the subtitle, though, we realized he just meant terrible. The subtitle, by the way, is: 5 Raspberry PI Zeros. One custom USB hub. Endless disappointment.

There are four Raspberry Pi Zero boards that actually compute and one Raspberry Pi Zero W serves as a head node and network router. The total cost is about $100 and half of that is in SD cards. There’s a custom USB backplane and even a 3D-printed case.

At first, using five tiny computers in a cluster might not seem like a big deal. Benchmarking shows the cluster (with a little coaxing) could reach 1.281 GFLOPS, with an average draw of 4.962W. That isn’t going to win any world records. However, the educational possibilities of building a $100 cluster that fits in the palm of your hand is interesting. Besides, it is simply a cute build.

We’ve seen much larger Pi clusters, of course. You might be better off with some desktop CPUs, but — honestly — not much better.

Running The SNES Classic Mini Emulator On The Raspberry Pi

Unless you’ve been living under a rock, you’d be familiar with Nintendo’s hugely popular Classic Mini consoles. Starting with the NES, and now followed with the SNES, the consoles ship in a cute, miniature enclosure and emulate Nintendo classics using the horsepower of modern ARM chips. These consoles use an emulator that has been created especially for the purpose by Nintendo, in house – and [Morris] [krom] wanted to see if he could take the emulator on the SNES Classic Mini and run it on the Raspberry Pi.

Yes, there are already SNES emulators on the Raspberry Pi. But anyone interested in the nuts and bolts of emulation can see the clear interest in the tricks and techniques Nintendo are using to achieve the feat. In particular, Nintendo engineers have the benefit of access to internal documentation that can make the job a lot easier, particularly when dealing with edge cases.

[krom] has been kind enough to share the full instructions necessary to recreate this feat. One stumbling block was the difference in hardware between the Raspberry Pi and the SNES Classic Mini – the Pi using a Broadcom GPU instead of the SNES’s Mali hardware. However, a workaround was simple enough – swapping out some libraries was all that was required. It also gives some interesting insight – it looks like the SNES Classic Mini relies on the SDL libraries to run.

While emulation of the SNES has been a largely solved problem for quite some time, it’s great to see more work going on in the field. In particular, the official Nintendo emulation is reported to be particularly adept at running games that rely on the SuperFX chip.

For another take on SNES emulation, try out your old Mario games on the HoloLens.

Thanks [Morris] for the tip!

Hotline Helps Toddler Keep In Touch With Mom And Dad

Even though the age for first carrying a smartphone seems to be decreasing, there’s a practical lower minimum age at which a kid can reliably use one to make a call. So how do you make sure your tot can reach out and touch mommy or daddy? This toddler-friendly Raspberry Pi hotline is a good start.

With a long trip to Hawaii pending and a toddler staying behind, [kuhnto] wanted a way to make communication as simple as possible. In the days of pervasive landlines, that would have been as simple as a feature phone with a couple of numbers on speed dial buttons. With nothing but cell phones to rely on, [kuhnto] turned to a Raspberry Pi running PBX software and a command line SIP client for making calls over a Google Voice line. The user interface is as simple as can be – a handset and two lighted buttons on a wall-mounted box. All Junior needs to do is pick up the handset and push green to talk to Daddy, blue for Mommy. Something similar might even be useful for elder care.

Kudos to [kuhnto] for thinking through the interface issues to come up with a successful build. We’ve seen other UIs simplified for kids before, such as this button-free jukebox or this special-needs media player.

[via r/DIY]

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?

 

Earth Rovers Explore Our Own Planet

While Mars is currently under close scrutiny by NASA and other space agencies, there is still a lot of exploring to do here on Earth. But if you would like to explore a corner of our own planet in the same way NASA that explores Mars, it’s possible to send your own rover to a place and have it send back pictures and data for you, rather than go there yourself. This is what [Norbert Heinz]’s Earth Explorer robots do, and anyone can drive any of the robots to explore whatever locations they happen to be in.

A major goal of the Earth Explorer robot is to be easy to ship. This is a smaller version of the same problem the Mars rovers have: how to get the most into a robot while having as little mass as possible. The weight is kept to under 500g, and the length, width, and height to no more than 90cm combined. This is easy to do with some toy cars modified to carry a Raspberry Pi, a camera, and some radios and sensors. After that, the robots only need an interesting place to go and an Internet connection to communicate with Mission Control.

[Norbert] is currently looking for volunteers to host some of these robots, so if you’re interested head on over to the project page and get started. If you’d just like to drive the robots, though, you can also get your rover fix there as well. It’s an interesting project that will both get people interested in exploring Earth and in robotics all at the same time. And, if you’d like to take the rover concept beyond simple exploration, there are other machines that can take care of the same planet they explore.

Continue reading “Earth Rovers Explore Our Own Planet”