Cheap 360 Degree Camera

How much would you pay for a 360 degree camera? How about $15 if you already have a Raspberry Pi and a Pi camera hanging around? If you don’t, you’ll have to add that minimal cost into the build. [Gigafide] noticed how a spherical mirror, made to see around corners, showed an all-around view if you took a picture of it from below. He snagged a panoramic lens made for an iPhone and stripped it for its optics. Some custom software and a little work resulted in a usable 360 degree camera.

SimpleCV (a light version of OpenCV) provides the algorithms to unwrap the frames and you can take video with the setup (see the video below). Mounting the optics took some 3D printing and the Pi operates as a hot spot to send the video out.

Continue reading “Cheap 360 Degree Camera”

Orka Controls The (Pi) World

If you deploy a lot of Raspberry Pi computers, you might find it inconvenient to log into each one to perform different tasks. Orka, an open source project by [Karthik K], is a server that runs on a desktop PC (Windows, Linux, or Mac) and can control multiple Orka clients (that can run on a Pi, or a desktop PC). We understand that [Karthik K] is looking for Mac testers, by the way.

From the server, you can execute commands and create tasks. You can also receive notification when a client PC reaches a threshold (for example, over temperature or too much CPU or RAM usage). You can open a shell on a client and do other operations.

Continue reading “Orka Controls The (Pi) World”

Galaga Cabinet Is Out Of This World

Like many of us, [Alex] spent a large part of his childhood feeding coin after coin into one arcade game or another. Galaga is one of his all-time favorites, and he has wanted to build a Galaga cabinet for a long time. Once his workshop was ready for the job, it was time to cross it off the list.

The cabinet is built to 4/5 scale. This is a great size because he gets the stability and feel of a full-size machine, but it’s much easier to move it around. As you might expect, there’s Pi in the cabinet.  The display is an old TV that [Alex] found in a Dumpster. And although it works great, it would go into standby instead of powering off along with everything else. To get around this, [Alex] built an automatic remote control with an IR LED and an Arduino Diecimila. After a five-second wait, it sends the power-on code to the TV and switches the input. The TV is supposed to be in portrait mode for Galaga, but this proved to be a challenge. Changing the orientation at the Pi level resulted in poor performance and choppy sound, so he changed it at the game execution level.

We are continually impressed by the diversity of [Alex]’s builds and the care that goes into them. Who could forget his beautiful sidewalk graffiti machine or the time he showed us how to photograph stuff that’s not there? Make the jump to see a brief demonstration followed by a two-part build video.

Continue reading “Galaga Cabinet Is Out Of This World”

Hackaday Prize Entry: Making A Book Reader That Can Survive Kindergarten

[atomicthomas] is a dedicated teacher. One only has to look at the work he’s been putting into book readers for for the past sixteen years. With hardware like the Pi Zero threatening cheap computers just over the supply chain horizon, he’s begun to set his sights higher.

It all started with headphones and audio tapes. For all of us who got to use tapes and school headphones, we know the flaws with this plan. Nothing lasted the sticky and violent hands of children for long. When video recordings of book became available, DVD players suffered similar fates.

So, he began to rip his tapes and DVDs to his computer. However, the mouse has a warning about small parts on it for a reason, and didn’t last long either. So, he built a computer with arcade buttons and a Raspberry Pi. This one ran a heavily simplified version of a media manager and worked well. Even the special needs children had no problem navigating. A second exploration with an iMac and a Nintendo controller worked even better. Apparently all five year olds instinctively understand how to use a Nintendo controller.

Using the user test data, in his most recent iteration he’s working on a sub-twenty-dollar reading computer in a Nintendo controller. It’s not the most technically in depth hack we’ve ever covered, but it certainly ranks up there for harsh environments.

Raspberry Pi, Send Me A Letter

The abundance of small networked boards running Linux — like the Raspberry Pi — is a boon for developers. It is easy enough to put a small cheap computer on the network. The fact that Linux has a lot of software is a double-edged sword. On the one hand, it is a good bet that anything you want to do has been done. On the other hand, some of the solutions are a bit large for a tiny embedded system.

Take, for example, e-mail. Historically, Linux hosts operate as mail transfer agents that can send and receive mail for all their users and possibly even relay mail to others. In today’s world, that’s usually overkill, but the capability is there. It is possible to install big mail transfer agents into a Raspberry Pi. The question is: should you?

What Do You Want?

The answer, of course, depends on what you want to do. If you have a dedicated board sending out text and maybe even files using an external mail server (like, say, Gmail), then the answer is no. You don’t need a piece of software listening for incoming connections, sorting through multiple users, and so on.

Luckily, there are some simple solutions if you know how to set up and configure them. The key is to avoid the big mail programs that do everything you don’t need.

Mail Front Ends

Let’s tackle sending mail first. If you try to grab the mailutils package, you’ll see it drags along a lot of stuff including mysql. Keep in mind, none of this will actually send mail. It just gives you some tools to get mail ready to send.

Luckily, the bsd-mailx package has a lot less overhead and will do the job. Look at the man page to see what options you have with mailx; you can do things like attach files, set a subject, and specify addresses.

It is a little difficult to set up for Gmail, though, thanks to Google’s security. You’ll need the certutil tool from the libnss3-tools package. You’ll need to create a certificate store, import Google’s certificate, and then set up a lot of options to mailx. I don’t suggest it. If you insist, though, you can find directions on the Web.

SSMTP

By default, programs like mailx and other Linux mail commands rely on a backend (often sendmail). Not only does that drag around too much overhead, it is also a full mail system, sending and receiving and relaying–overkill for our little Pi computers.

Luckily, SSMTP is available which only sends mail and is relatively lightweight. You need a configuration file to point it to your mail server. For Gmail, it would look like this:

#
# Config file for sSMTP sendmail
#
# The person who gets all mail for userids < 1000
# Make this empty to disable rewriting.
root=postmaster

# The place where the mail goes. The actual machine name is required no 
# MX records are consulted. Commonly mailhosts are named mail.domain.com
mailhub=smtp.gmail.com:587

# Where will the mail seem to come from?
rewriteDomain=yourdomain.com

# The full hostname
hostname=yourhostname
AuthUser=YourGmailUserID
AuthPass=YourGmailPassword
UseTLS=Yes
UseSTARTTLS=YES
# Are users allowed to set their own From: address?
# YES - Allow the user to specify their own From: address
# NO - Use the system generated From: address
FromLineOverride=YES

You can use a mail agent like mailx or you can just use ssmtp directly:

ssmtp someone@somewhere.com

Enter a message on the standard input and end it with a Control+D (standard end of file for Linux).

Google Authentication

There’s only one catch. If you are using Gmail, you’ll find that Google wants you to use stronger authentication. If you are using two-factor (that is, Google Authenticator), this isn’t going to work at all. You’ll need to generate an app password. Even if you aren’t, you will probably need to relax Google’s fear of spammers on your account. You need to turn on the “Access for less secure apps” setting. If you don’t want to do this on your primary e-mail account, considering making an account that you only use for sending data from the Pi.

Sending Files

Depending on the mail software you use, there are a few ways you can attach a file. However, the mpack program makes it very easy:

mpack -a -s 'Data File' datafile.csv me@hackaday.com

The above command will send datafile.csv as an attachment with the subject “Data File.” Pretty simple.

Receiving Mail

What if you want to reverse the process and receive mail on the Pi? There is a program called fetchmail that can grab e-mails from an IMAP or POP3 server. It is possible to make it only read the first unread message and send it to a script or program of your choosing.

You have to build a configuration file (or use the fetchmailconf program to build it). For example, here’s a simple .fetchmailrc file:

poll imap.gmail.com
protocol IMAP
user "user@gmail.com" with password "yourpassword" mda "/home/pi/mailscript.sh"
folder 'INBOX'
fetchlimit 1
keep
ssl

You can leave the “keep” line out if you don’t mind fetchmail deleting the mail after processing. The file should be in your home directory (unless you specify with the -f option) and it needs to not be readable and writable by other users (e.g., chmod 600 .fetchmailrc). According to the fetchmail FAQ, there are some issues with Gmail, so you might want to consider some of the suggestions provided. However, for simple tasks like this, you should be able to work it all out.

In particular, the mailscript.sh file is where you can process the e-mail. You might, for example, look for certain keyword commands and take some action (perhaps replying using ssmtp).

Special Delivery

You might not think of the Raspberry Pi as an e-mail machine. However, the fact that it is a pretty vanilla Linux setup means you can use all sorts of interesting tools meant for bigger computers. You just have to know they exist.

Hackaday Prize Entry: FPGAs For The Raspberry Pi Zero

The Raspberry Pi is the Arduino of 2016, and that means shields, hats, add-ons, and other fun toys that can be plugged right into the GPIO pins of a Pi. For this year’s Hackaday Prize, [Valentin] is combining the Pi with the next age of homebrew computation. He’s developed the Flea Ohm, an FPGA backpack or hat for the Pi Zero.

The Flea Ohm is based on Lattice’s ECP5 FPGA featuring 24k LUTs and 112kB BRAM. That’s enough for some relatively interesting applications, but the real fun comes from the added 32MB or 128MB of SDRAM, a micro SD card slot, USB + PS/2 host port and an LVDS output.

The combination of Raspberry Pis and FPGAs are extremely interesting and seem to be one of the best FPGA learning platforms anyone can imagine. Another Hackaday Prize entry, the ZinqBerry does a similar trick, but instead of a Pi hat, the ZinqBerry drops a Xilinx Zynq with an FPGA and ARM Cortex A9 core onto a board with Ethernet, HDMI, and USB.

If it’s a Flea or a Zinq, the age of FPGA’d Raspberry Pis is quickly approaching, and hopefully we’ll see them as finalists in the Hackaday Prize. You can check out a video of the Flea Ohm below.

Continue reading “Hackaday Prize Entry: FPGAs For The Raspberry Pi Zero”

Oculus Pi

[WayneKeenan] wrote a proof-of-concept virtual reality system that used a Raspberry Pi and an Oculus Rift. It was about a thousand lines of Python and with a battery pack it was even portable. The problem was that the Pi was struggling to create the 3D views.

[Wayne] recently revisited the demo and found that just about everything has gotten better: the Pi 3 is faster, and the Python libraries have become better. He spent some time building a library — VR Zero — and then recreated the original demo in 80 more lines of Python. You can see a video, below.

Continue reading “Oculus Pi”