Friday 30 September 2016

Lock Up Your Raspberry Pi with Google Authenticator

Raspberry Pi boards (or any of the many similar boards) are handy to leave at odd places to talk to the network and collect data, control things, or do whatever other tasks you need a tiny fanless computer to do. Of course, any time you have a computer on a network, you are inviting hackers (and not our kind of hackers) to break in.

We recently looked at how to tunnel ssh using a reverse proxy via Pagekite so you can connect to a Pi even through firewalls and at dynamic IP addresses. How do you stop a bad guy from trying to log in repeatedly until they have access? This can work on any Linux machine, but for this tutorial I’ll use Raspberry Pi as the example device. In all cases, knowing how to set up adequate ssh security is paramount for anything you drop onto a network.

Better than Password Security

Experts tell you to use a good password. However, with ssh, the best method is to disallow passwords completely. To make this work, you need to create a private and public certificate on the machine you want to use to connect. Then you copy the public key over to the Raspberry Pi. Once it is set up, your ssh client will automatically authenticate to the server. That’s great if you always log in using the same machine and you never lose your keys.

You need to create a personal key pair if you haven’t already. You can use the ssh-keygen command to do that on Linux. You can require a passphrase to unlock the key or, if you are sure only you have access to your machine, you can leave it blank.

Once you have the key it is easy to send the public key over to the server with the ssh-copy-id command. For example:

ssh-copy-id me@ssh.hackaday.com

You log in with your password one last time and the command copies your public key to the server. From then on, when you use ssh on that host, you’ll be automatically authenticated. Very handy.

Once you have keys set up, you can disable using regular passwords by editing /etc/ssh/sshd_config. You need the following settings:

ChallengeResponseAuthentication no
PasswordAuthentication no
UsePAM no

That prevents anyone from breaking in by brute force guessing of passwords. It also makes it harder to set up new users or log in from a new computer.

Save the Passwords; Use Two Types

For those reasons, it is not always a good idea to turn off passwords. A better idea is to use two-factor authentication. That requires you to enter a password and also a “one time” verification code. Where do you get that code?

There are several options, but the one I’ll use is from the Google Authenticator application. You can get the application for Apple devices, Blackberries, and–of course–Android devices. You install it in the usual way for your device. The trick is how to make the ssh server on the Pi use it.

Luckily the Raspian repos have a package called libpam-google-authenticator that will do the trick. Installing it with apt-get is only part of the trick, though. You need two things. First, you need to set up your account.

Set Up a Google Authenticator Account

To set up your account, you need to log into your Pi and issue the command google-authenticator. The program will ask you a few questions and then generate a URL that will show you a QR code. It will also provide you a numeric code. You can use either of these to set up your phone. The command will also provide you a few one-time scratch codes you need to save in case you lose your authenticator device. You need to do this for any user ID that can log in via ssh (even ones where you normally use a certificate).

Tell Your Pi to Require Two-Factor Login

The other part of the puzzle requires you to make changes to /etc/pam.d/sshd and /etc/ssh/sshd_config. The first line of /etc/pam.d/sshd should be:

auth required pam_google_authenticator.so

In /etc/ssh/sshd_config you need to make sure passwords are on:

ChallengeResponseAuthentication yes
PasswordAuthentication yes
UsePAM yes

Just make sure you don’t mess anything up. Losing the ssh server could stop you from being able to access the machine. I haven’t messed one up yet, but the advice I hear is to keep an ssh session open while you restart the ssh server (/etc/init.d/sshd restart) so if something goes wrong, you’ll still have a shell prompt open. You might also consider running:

/usr/sbin/sshd -t

This will verify your configuration before you pull the trigger.

By the way, if you already use certificates to log in, this won’t change anything for you. The certificate authentication takes priority over passwords. That does make it tricky to test your setup. You can force ssh not to use your certificate like this:

ssh -o PreferredAuthentications=password -o PubkeyAuthentication=no me@ssh.hackaday.com

Even for accounts where you use certificates, adding the two-factor log in will prevent brute force attacks on your password, so be sure to set up for all accounts you can use over ssh.

Other Protections

There are several other things you can do to help secure your ssh connection:

  • Disallow root logins (edit the PermitRootLogin line in /etc/ssh/sshd_config; you can use sudo from a normal account if you want to become root)
  • Use a non-standard ssh port (edit port in sshd_config)
  • Consider installing fail2ban which will block IP addresses that exhibit suspicious behavior
  • Disallow any users that don’t need ssh access (use AllowUsers or DenyUsers in the sshd_config file)
  • Set PermitEmptyPasswords in sshd_config to ‘no’

Not everyone will agree with disallowing root logins. However, empirically, a lot of attacks will try logging in as root since virtually every Linux system has that account. It is harder for a random attacker to know that my user ID is WetSnoopy.

There are many other techniques ranging from port knocking to locking users to their home directories. You can rate limit connection attempts on the ssh port. Only you can decide how much security is enough. After all, you lock up your cash box better than you lock up your supply closet. However, convenient and free two-factor authentication can add a high level of security to your Raspberry Pi or other Linux-based projects. If you are really concerned, by the way, you can also force two-factor for accessing sudo, as well.


Filed under: how-to, linux hacks, Original Art, Raspberry Pi, Skills

from raspberry pi – Hackaday http://ift.tt/2dt8pY7
via Hack a Day

Thursday 29 September 2016

Boombox Doorjam Plays Your Theme Song When You Step in the Ring

Although many of us may have had childhood aspirations to be a famous wrestler in the WWE, not very many of us will ever realize those dreams. You can get close, though, if you have your own epic intro music theme that plays anytime you walk into a room. Although it’s not quite the same as entering a wrestling ring, [Matt]’s latest project will have you feeling just as good whenever you enter a room to your own theme song.

The core of the build consists of a boom box with an auxiliary input. The boom box is fed sound via a Raspberry Pi which also serves as the control center for the rest of the project. It runs Node.js and receives commands via websockets from a publicly accessible control server. The Pi is also running Spotify which allows a user to select a theme song, and whenever that user’s iBeacon is within range, the Pi will play that theme song over the stereo.

The project looks like it would be easy to adapt to any other stereo if you’re looking to build your own. Most of the instructions and code you’ll need are available on the project’s website, too. And, if you’re a fan of music playing whenever you open a door of some sort, this unique project is clearly the gold standard. It might even make Stone Cold Steve Austin jealous.


Filed under: musical hacks

from raspberry pi – Hackaday http://ift.tt/2dv0NVQ
via Hack a Day

Wednesday 28 September 2016

Raspberry Pi Adds A Digital Dash To Your Car

Looking for a way to make your older car more hi-tech? Why not add a fancy digital display? This hack from [Greg Matthews] does just that, using a Raspberry Pi, an ODB-II reader and an LCD screen to create a digital dash that can run alongside (or in front of ) your old-school analog dials.

[Greg’s] hack uses a Raspberry Pi Foundation display, which includes a touch screen, so you don’t need a mouse or other controls. Node.js displays the speed, RPM, and engine temperature (check engine lights and other warnings are planned additions) through a webpage displayed using Chromium. The Node page is pulling info from another program on the Pi which monitors the CAN bus. It would be interesting to adapt this to use with more futuristic displays, maybe something like a pico projector and a 1-way mirror for a heads-up display.

To power the system [Greag] is using a Mausberry power supply which draws power from your car battery, but which also cleanly shuts down the Pi when the ignition is turned off so it won’t drain your battery. When you throw in an eBay sourced ODB-II reader and the Consult Dash software that [Greg] wrote to interpret and display the data from the ODB-II bus, you get a decent digital dash display. Sure, it isn’t a Tesla touchscreen, but at $170, it’s a lot cheaper. Spend more and you can easily move that 60″ from your livingroom out to your hoopty and still use a Raspberry Pi.

What kind of extras would you build into this system? Gamification of your speed? Long-term fuel averaging? Let us know in the comments.


Filed under: car hacks, Raspberry Pi

from raspberry pi – Hackaday http://ift.tt/2d91S7L
via Hack a Day

Monday 26 September 2016

Hackaday Prize Entry: Raspberry Pi Thermal Imaging

Simple RFID Door Lock System

Group entry hacks are a favorite for hacker social groups. Why use old fashioned keys when you can use newfangled electronic keys? If you are looking to build a simple RFID-based security system to secure your important stuff, this project from Resin.io is a good place to start. In it, [Joe Roberts] outlines the process of building a simple RFID-triggered mechanism for their office door.

It’s a pretty simple setup that is composed of an RFID reader, a Rasperry Pi and a Neopixel ring. When someone places an RFID card against the reader hidden behind a poster by their front door, the reader grabs the code and the Pi compares it with a list of authorized users. If the card is on the list, the Pi triggers the door lock using a signal line originally designed to work with an intercom system. If the user isn’t on the list, a laser is triggered that vaporizes the interloper… well, that’s perhaps in the next version, along with an API that will allow someone to open the door from the company chat application.

At the moment, this is a clean, simple build that uses only a few cheap components, but which could be the basis for a more sophisticated security system in the future.


Filed under: security hacks

from raspberry pi – Hackaday http://ift.tt/2cUYSuY
via Hack a Day

Hackaday Links: September 25, 2016

So you like watching stupid stuff? Here you go, a scene from Bones that tops the infamous ‘IP backtrace with Visual Basic’ or ‘four-handed keyboard’ scenes from other TV shows. Someone hacked the bones by embedding malware in a calcium fractal pattern. Also, when she uses the fire extinguisher, she doesn’t spray the base of the fire.

Raspberry Pi! You have no idea how good the term Raspberry Pi is for SEO. Even better is Raspberry Pi clusters, preferably made with Raspberry Pi Zeros. Here’s a Raspberry Pi hat for four Raspberry Pi Zeros, turning five Raspberry Pis into a complete cluster computer. To be honest and fair, if you’re looking to experiment with clusters, this probably isn’t a bad idea. The ‘cluster backplane’ is just a $2 USB hub chip, and a few MOSFETs for turning the individual Pis on and off. The Zeros are five bucks a pop, making the entire cluster cost less than two of the big-boy sized Pi 3s.

Do you think you might have too much faith in humanity? Don’t worry, this video has you covered.

Hacking on some Lattice chips? Here’s a trip to CES for you. Lattice is holding a ‘hackathon’ for anyone who is building something with their chips. The top prize is $5k, and a trip to next year’s CES in Vegas, while the top three projects just get the trip to Vegas. If you already have a project on your bench with a Lattice chip, it sounds like a great way to wait an hour for a cab at McCarran.

UPSat. What’s an upsat? Not much, how about you? The first completely open source hardware and software satellite will soon be delivered to the ISS. Built by engineers from the University of Patras and the Libre Space Foundation, the UPSat was recently delivered to Orbital ATK where it will be delivered to the ISS by a Cygnus spacecraft. From there, it will be thrown out the airlock via the NanoRacks deployment pod.

The Voyager Golden Record is a message in a bottle thrown into the cosmic ocean and a time capsule from Earth that may never be opened. Now it’s a Kickstarter. Yes, this record is effectively Now That’s What I Call Humanity volume 1, but there are some interesting technical considerations to the Voyager Golden Record. To the best of my knowledge, no one has ever tried to extract the audio and pictures from this phonographic time capsule. The pictures included in the Golden Record are especially weird, with the ‘how to decode this’ message showing something like NTSC, without a color burst, displayed on a monitor that is effectively rotated 90 degrees counterclockwise from a normal CRT TV. Want to know how to get on Hackaday? Get this Golden Record and show an image on an oscilloscope. I’d love to see it, if only because it hasn’t been done before by someone independent from the original project.


Filed under: Hackaday Columns, Hackaday links

from raspberry pi – Hackaday http://ift.tt/2cDRfJn
via Hack a Day

Wednesday 21 September 2016

How to Run a Pagekite Server to Expose Your Raspberry Pi

Last time I showed you how to expose a web service on a Raspberry Pi (or, actually, any kind of device) by using a reverse proxy from Pagekite. On your Pi, you just need a simple Python script. However, it also depends on the Pagekite server, which isn’t always convenient. There are limits to the free service, and you don’t control the entire thing. The good news is twofold: the same Python script you use to set up the client-side can also set up a server. The other good news is the entire thing is open source.

In practical terms, then, if you have a computer that is always on and has an IP address that can be found on the public internet, you can run your own Pagekite server (they call it a front end) and service your own backends.

Initial Setup

As I mentioned, you are going to need a computer visible on the Internet. Well, technically a computer that is visible to all the clients you expect to use including the backend. It needs a few tools on it, including Python, but nothing exotic. You’ll also need control of your DNS–exactly how you do that will depend on how your server is set up. In my case, I have a server sitting in a rack in a data center so I have my own DNS server (named) running on it.

The Pagekite website has installation packages for RPM and deb packages. I suggest you start by installing that on your server, using the method that matches your packaging system. This will put a new directory called /etc/pagekite.d and also installs a startup script (/etc/init.d/pagekite).

However, the default setting is to exit and not start anything up. What’s more is that the example files are set up as though the computer wants to talk to the Pagekite frontend provided (pagekite.me). If you want to run your own, you are going to have to make some changes.

Named Party

If you have a server on the Internet, there is some way to get names (like hackaday.com) into the DNS system to point to a specific IP address. In my case, I own the domain name hotsolder.com so I decided to make dyn.hotsolder.com be my Pagekite front end. I also wanted to be able to create subdomains like 3dprinter.dyn.hotsolder.com.

To do this, I needed a few configuration changes in my DNS:

dyn           IN        A 173.201.49.198 
*.dyn         IN        A 173.201.49.198

Obviously, my IP address is the one shown. All the names are relative to hotsolder.com, so there’s no need to specify that on those two lines. If your hosting company handles your DNS, you’ll have to determine how to make similar changes. Or you can tell them you need two “A” records put in and they ought to know what that means. The upshot is that your host name (dyn.hotsolder.com or anything.dyn.hotsolder.com) goes to your server (the Pagekite server in the diagram below).

Host Setup

The Pagekite package will leave two important files in /etc/pagekite.d: 10_account.rc and 20_frontends.rc. The first file is why the service won’t start. The reality is, for using the script as a frontend, you don’t need this file at all. Just in case, I commented out all the lines, but you could just as well remove it. The line that prevents it from starting is the one that reads:

abort_not_configured

The other lines set up your connection to the pagekite.me servers. We aren’t going to do that, so you can remove those lines or the whole file.

The 20_frontends.rc file is supposed to connect to the remote frontend. In this case, we want to be the front end, so here’s what I put in there:

isfrontend
ports=8080,80,443,2222
rawports=virtual
protos=http,https,raw
domain=http,https,http-8080,raw-2222:*.dyn.hotsolder.com;$$$SECRET$$$
domain=http,https,http-8080,raw-2222:dyn.hotsolder.com:$$$SECRET$$$

You can also set up a certificate file and point to it here, but if you want to do that, you can read the documentation (look for the –tl_default and –tls_endpoint options along with –fe_certname and –ca_certs). In fact, that same documentation is where you can learn about all the options like isfrontend and ports.

Client Setup

By default, the Pagekite script looks in ~/.pagekite.rc for settings. If you plan on using the Pagekite server, you are better off leaving this file alone and creating a new configuration. You can install the same package on the Pi or other client computer — remember, the same script is used on the frontend (the Internet-facing computer) and the backend (the computer running the server).

If you want to run from the command line, consider using:

pagekite --clean --optfile=/home/YOURUSERID/.pagekite.CUSTOM.rc

Obviously, you need to replace YOURUSERID and CUSTOM to suit your purposes. If you are using a package and having Pagekite start automatically, you need to look at /etc/pagekite.d. The 20_frontends.rc is where you can configure each frontend server you want to talk to.

Here’s part of my file:

webpath = dyn.hotsolder.com/8080:/:default:/tmp/httpd
webpath = http://ift.tt/2dbi1f4
frontend=dyn.hotsolder.com:443
service_on=http:dyn.hotsolder.com:localhost:builtin:@kitesecret
service_cfg=http://ift.tt/2cDhVHU
service_on=raw-2222:dyn.hotsolder.com:localhost:22:@kitesecret

The @kitesecret references a line further up (or in the 10_accounts file):

kitesecret=$$$SECRET$$$

This has to match what is set up on the frontend, of course.

Funny Business

For http requests, everything works like you would expect. The service_on and service_cfg lines set up the built-in Web server (you don’t have to use it) and the documentation says these are subject to change. Otherwise, it is pretty simple to set up things.

The issue arises when you want to do a raw port. In my case, I want to expose the ssh server on port 22 to the outside world. Of course, my public computer already has an ssh server on that port. That’s no problem. Pagekite can convert incoming traffic on port 2222 to port 22 on the backend. Kind of.

The raw ports actually come through on an http port. To make ssh work (for example) you need to proxy from port 443 with netcat. The details are in the documentation, but the short version is you need the following configuration in ~/.ssh/config:

Host dyn.hotsolder.com
   CheckHostIP no
   ProxyCommand /bin/nc -X connect -x %h:443 %h %p

The Internet of Pi

If you control every network you connect to, this probably isn’t that interesting. If you don’t mind setting up VPNs on both sides, you also don’t need this sort of thing. However, if you need to deploy solutions behind firewalls or even on dynamic IP addresses, you might find the reverse proxy approach is just what you need.

There are always other ways to solve the problem, of course. You can use a dynamic IP provider to address dynamic IPs, for example. Tunneling through unknown firewalls is a bit more difficult, though.


Filed under: Hackaday Columns, linux hacks, Network Hacks, Original Art, Raspberry Pi, Skills

from raspberry pi – Hackaday http://ift.tt/2dbhyti
via Hack a Day

Classing Up a RetroPie Arcade With a Wine Barrel

Arcade cabinets are a lot of fun, and something most of us would probably like in our homes. Unfortunately, space and decor constraints often make them impractical. Or, at least, that’s what our significant others tell us. Surely there must be a workaround, right?

Right! In this case, the workaround [sid981] came up with was to build a RetroPie arcade into a fancy looking wine barrel. The electronics are pretty much what you’d expect for a RetroPie system, and the screen is set into the top of the barrel. Control is handled by a wireless controller that can be tucked away when it’s not in use, and a glass top simultaneously protects the screen and lets guests use the barrel as a bar table.

Overall, it’s a really classy alternative to putting an arcade cabinet in the corner, and has the added benefit of doubling as a handy place to put your drinks. We’ve seen nifty builds in the past that accomplish a similar goal using coffee tables, but we think the aesthetic appeal of the wine barrel makes this a pretty awesome choice too.

[via r/diy]


Filed under: home entertainment hacks

from raspberry pi – Hackaday http://ift.tt/2cOx5gB
via Hack a Day

Tuesday 20 September 2016

Expose your Raspberry Pi on Any Network

Everyone’s talking about the Internet of Things (IoT) these days. If you are a long-time Hackaday reader, I’d imagine you are like me and thinking: “so what?” We’ve been building network-connected embedded systems for years. Back in 2003, I wrote a book called Embedded Internet Design — save your money, it is way out of date now and the hardware it describes is all obsolete. But my point is, the Internet of Things isn’t a child of this decade. Only the name is.

The big news — if you can call it that — is that the network is virtually everywhere. That means you can connect things you never would have before. It also means you get a lot of data you have to find a reason to use. Back in 2003, it wasn’t always easy to get a board on the Internet. The TINI boards I used (later named MxTNI) had an Ethernet port. But your toaster or washing machine probably didn’t have a cable next to it in those days.

Today boards like the Raspberry Pi, the Beagle Bone, and their many imitators make it easy to get a small functioning computer on the network — wired or wireless. And wireless is everywhere. If it isn’t, you can do 3G or 4G. If you are out in the sticks, you can consider satellite. All of these options are cheaper than ever before.

The Problem

There’s still one problem. Sure, the network is everywhere. But that network is decidedly slanted at letting you get to the outside world. Want to read CNN or watch Netflix? Sure. But turning your computer into a server is a little different. Most low-cost network options are asymmetrical. They download faster than they upload. You can’t do much about that except throw more money at your network provider. But also, most inexpensive options expose one IP address to the world and then do Network Address Translation (NAT) to distribute service to local devices like PCs, phones, and tablets. What’s worse is, you share that public address with others, so your IP address is subject to change on a whim.

What do you do if you want to put a Raspberry Pi, for example, on a network and expose it? If you control the whole network, it isn’t that hard. You usually use some kind of dynamic DNS service that lets the Pi (or any computer) tell a well-known server its current IP address (see figure below).

NetworkDiagram1

That well-known server answers DNS requests (the thing that converts hackaday.com into a real IP address). Now anyone can find your Pi. If you have a firewall in hardware and/or software (and it is a good bet that you do), you’ll also have to open the firewall port and tell the NAT router that you want to service traffic on the given port.

Alien Networks

That’s fine if you are at home and you control all of your network access and hardware. But suppose you don’t know for sure where your system will deploy. For example, perhaps you will use your box at different traffic intersections over a 3G modem. Or maybe you have built a smart picture frame to put in a hospital or nursing home and you want access over the institution’s WiFi.

Granted, you can handle that as a system design problem. For the hypothetical picture frame, maybe it checks a web server on the public Internet periodically for new content. Sure. You can do that. Until you need to ssh into the box to make some updates. Sometimes you just need to get to the box in question.

Solutions

There are a few options for cases like this. NeoRouter has software for many platforms that can create a virtual private network (VPN) that appears to be a new network interface where all the participants are local. If my desktop computer has a NeoRouter IP of 10.0.0.2 and my Pi has 10.0.0.9 then I can simply ssh over to that IP address. It doesn’t matter if the Pi is halfway around the world. The traffic will securely traverse the public Internet as though the two computers were directly connected with no firewalls or anything else between them.

Honestly, that sounds great, but I found it a little difficult to set up. It also isn’t terribly useful by itself. You need to run some kind of server like a Web server. You also need a NeoRouter server on the public Internet with an open port.

A Better Answer

What I wound up using was a service called Pagekite. The software is all open source and there is a reasonable amount of free use on their servers. I would go on to set the whole thing up on my own servers (I’ll talk about that next time). For right now, though, assume you are happy to use their server.

If you go to the Pagekite web site, they have a really simple “flight plan” to get you started:

curl -s http://ift.tt/t1zL4R | sudo bash
pagekite.py 80 yourname.pagekite.me

networkdiagram2-redoThat’s it. Honestly, you don’t know these guys so I wouldn’t suggest just piping something off the Internet into my root shell. However, it is safe. To be sure I actually redirected the script from curl into a temporary file, examined it, and then ran it. You may be able to install Pagekite from your repository, but it might be an older version. They also have common packages on GitHub and repos for many package systems (like deb packages and RPM).

The concept behind PageKite is that of a reverse proxy. Both the remote computer and the user find the PageKite computer via DNS (see figure below). That server acts as a go-between and since nearly all networks will allow access to a web server, there should be no firewall issues.

The last line sets up a redirect from the specified URL to your local machine on port 80. So far that isn’t much different than using NeoRouter. However, the pagekite script is kind of interesting. It can be a backend (that is, your Raspberry Pi serving up web content), or a frontend (like the server at yourname.pagekite.me). It also has a simple web server in it. So if you wanted to serve out pages from, say /home/pi/public_html you could write:

pagekite.py /home/pi/public_html yourname.pagekite.me +Indexes

There is a way to add things like this so they start when pagekite starts (read about the –add option). It all works and it works well.

You can redirect other ports, also. There is even a way to tunnel SSH traffic, although it does require a proxy set up for the SSH client. That will depend on what ssh programs you use. Although it is a bit of trouble, it is also handy since it allows you to SSH into the remote box even on restrictive work or school networks.

Pagekite will give you a chance to sign up the first time you run the script. However, you do need to be on a machine that can open a browser, so if you are using your Pi headless, you might want to set up the account first on another machine.

The free account has some limits, but it does let you set up a CNAME to redirect from your own domain name. You can also create unlimited subdomains (e.g., toaster.myiot.pagekite.me, washer.myiot.pagekite.me, and alarmsystem.myiot.pagekite.me).

On Your Own

If you don’t have a public computer and you don’t have a lot of data transfer needs, the Pagekite free plan might just work for you. I didn’t want to use their domain or be subject to their quotas, so I decided to install the frontend to my own web server. The code is open source, but the documentation for making that work is not great.

Luckily, next time, I’ll take you through the steps I took to get it all working. It isn’t that hard, but it does require a little thought, text editing, and DNS dexterity.


Filed under: Hackaday Columns, internet hacks, Original Art, Raspberry Pi, Skills

from raspberry pi – Hackaday http://ift.tt/2d8BfC0
via Hack a Day

The Cicada: A Parasite Art Piece With Commitment Issues

How often do you think deeply about the products around you? How about those you owned five years ago? Ten? The Cicada — brainchild of [Daniel Kerris] — is an art piece that aims to have the observer reflect on consumer culture, buyer’s remorse, and wanting what we cannot have.

The Cicada consists of an ultrasonic sensor feeding data to a Raspberry pi which — calculating the distance of an approaching human — either speeds up or slows down a servo motor connected to a General Electric Walkman’s cassette speed potentiometer. Upon detecting someone approaching, The Cicada begins to loop the chorus of Celine Dion’s “I Will Always Love You”. As you move closer, the tape speed slows, and there is a transition from love at first sight to nightmarish drawl as the music slows.

cicada-diagramOf course as you leave, it begins to play at normal speed again. [Kerris] hopes this will induce the observer to reflect on wanting what we can’t have — especially if it’s the ‘greener’ grass on the other side of the fence — but also about the media we consume: how we view it, how that initial state changes over time, and — at the very least — how to recycle old tech into new projects!

If you’re looking for more tech-art, The Cicada would be at home in this creepy mechanical art show.

 


Filed under: misc hacks, Raspberry Pi

from raspberry pi – Hackaday http://ift.tt/2cMqKR3
via Hack a Day

Sunday 18 September 2016

Clustering A Lot Of Raspberry Pi Zeros

It became something of a cliché a few years ago in online discussions, whenever a new single board computer was mentioned someone would pop up and say something like “Imagine a Beowulf cluster…“. Back then it was said largely in jest, but with the current generation of boards it’s a distinct possibility. Who hasn’t looked at a Raspberry Pi and idly thought about a cluster of them, or even created one!

[Electronoob] did just that, creating a variety of Raspberry Pi cluster configurations, the most impressive of which is a stack of 32 Pi Zeros mounted together with stand-offs. The plan was to network it via USB, for which he initially considered building a backplane, but was put off by the cost of vertical USB connectors and instead went for a wired approach. If there is a lesson to be learned from his experiences it is that buying very cheap USB cables is a minefield: his pile of eBay specials turned out to have significant numbers of faults. He’s now faced with a stark choice, solder  32 sets of USB pads on the base of each Zero or buy better cables.

The stack of Zeros is pretty impressive, but so what, you think. It’s still not working properly. But the Zero cluster isn’t his only work. He’s also created a set of very nicely executed Ethernet clusters using the larger Pi boards, and the way he’s mounted them on top of compact Ethernet switches sets them apart from some of the more spaghetti-like Pi clusters.

It’s true a Pi cluster won’t cut it in the world of supercomputers, you could almost certainly buy more bang for your buck without too much effort. But it does represent a very accessible way to learn about cluster computing, and you have to admit it a stack of Zeros does look rather impressive.

We’ve seen quite a few Pi clusters here since 2012, the biggest of which is probably this 120 node behemoth, complete with screens.


Filed under: Raspberry Pi

from raspberry pi – Hackaday http://ift.tt/2cVgeKs
via Hack a Day

Hackaday Prize Entry: AutoFan Saves Tired Drivers With Face Recognition

Chair Dances Like No One Is Watching

Although it might be more accurate to say that this chair dances because no one is watching, the result is still a clever project that [Igor], a maker-in-residence at the National Museum of Decorative Arts and Design in Norway, created recently. Blurring the lines between art, hack, and the ghosts from Super Mario, this chair uses an impressive array of features to “dance”, but only if no one is looking at it.

In order to get the chair to appear to dance, [Igor] added servo motors in all four legs to allow them to bend. A small non-moving dowel was placed on the inside of the leg to keep the chair from falling over during all of the action. It’s small enough that it’s not immediately noticeable from a distance, which helps maintain the illusion of a dancing chair.

From there, a Raspberry Pi 3 serves as the control center for the chair. It’s programmed in Python and runs OpenCV for face detection and uses pigpio for controlling the leg servos. There’s also a web interface for watching the camera’s output and viewing its facial recognition abilities. The web interface also allows a user to debug the program. [Igor]’s chair can process up to 3 frames per second at 800×600 pixels.

Be sure to check out the video after the break to see the chair in action. It’s an interesting piece of art, and if those dowels can support the weight of a person it would be a great addition to any home as well. If it’s not enough chair for you, though, there are some other more dangerous options out there.


Filed under: home hacks

from raspberry pi – Hackaday http://ift.tt/2cYaLyp
via Hack a Day

Saturday 17 September 2016

Hacklet 125 – DIY Laptops

In the old days of the 1970’s, the only way to get your own computer was to build one from scratch. Thanks to an army of hackers like [Woz], PC’s are no commodity objects that can be bought for a couple of hundred dollars. The magic of building your own still is there though – especially when we’re talking about portable machines. Laptops, notebooks, netbooks take quite a bit of skill to assemble. Stuffing a keyboard, screen, and battery into a small clamshell case takes a bit of planning. Our last look at DIY laptops was exactly 100 Hacklets ago, so it’s time for a refresh. This week we’re checking out some of the best DIY laptops and portable computers on Hackaday.io!

piberryWe start with [Sahas Dinesh Chitlange] and Pi-Berry Laptop. [Sahas] found just the right mix of simple and elegant with this build. A Raspberry Pi 2 is the brains of the operation. The Pi sits in a case built from a mix of MDF and regular wood. The display is a 10.1″ HDMI LCD. The keyboard was pulled from a tablet case. Power was easy — a USB power bank provides enough for 4-5 hours of runtime. [Sahas] covered his laptop in Italian leather for a polished look. He planned out his parts layout well enough that the power-hungry Pi stays cool without a fan.

pivenaNext up is [Tim] with PIvena. [Tim] took his inspriation from [Bunnie Huang’s] Novena open laptop. Rather than roll his own ARM board, [Tim] went with a Raspberry Pi. His original design was for the Raspberry Pi model B. Last time we looked at PIvena, the model B+ was still pretty new. As we hoped, [Tim] modified his design to accept the new Pi layouts. This means it will physically work with the B+, Pi 2, and Pi 3 boards. [Tim] didn’t stop there though. He also upgraded from an 800 x 480 LCD to an 1200 x 800 LCD. He managed to do that while keeping the same bolt pattern on the travel cover. Nice work [Tim]!

elloNext we have [KnivD] with ELLO 2M. The most striking thing about ELLO 2M is the construction. The entire laptop is made from 6 PCBs which sandwich all the other parts. The keyboard is PCB material with keys routed out. The processor is a Microchip PIC32MX470-120. Software is loaded from one of 3 microSD cards. The 7 inch touchscreen LCD and 4500 mAh LiPo battery are nestled in between PCB layers. A true hacker, [KnivD] included a generous pin grid for debugging add-on circuits. The whole setup looks great with white silkscreen. As [Mark Sherman] mentioned in the comments, this machine reminds us of a modern-day TRS-80 Model 100.

pipdaFinally we have [pdrift86] with Mini rpi2 laptop. Palmtop might be a better name for this. [pdrift86] took his inspiration (and his keyboard) from the old HP Jornada Personal Digital Assistant (PDA). The housing is Masonite, cut from a clipboard. A Raspberry Pi 2 hides inside, along with a 4 cell 18650 Li-Ion battery. The screen is a 5″ LCD with a composite input. The display isn’t a touchscreen, so a Playstation Portable analog stick is on-board, and will eventually be connected for mouse control. [pdrift86] even managed to sneak the Pi camera on the back of his machine, so it can take pictures cellphone style.

If you want to see more DIY laptop projects, check out our new DIY Laptops notebooks, and portables list. Notice a project I might have missed? Don’t be shy, just drop me a message on Hackaday.io. That’s it for this week’s Hacklet, As always, see you next week. Same hack time, same hack channel, bringing you the best of Hackaday.io!


Filed under: computer hacks, Hackaday Columns

from raspberry pi – Hackaday http://ift.tt/2cHqBwv
via Hack a Day

Thursday 15 September 2016

Ubuntu Complete Manual available today

utcm_001e_packshot 020-021_utcm_001 026-027_utcm_001

Fancy trying your hand at Ubuntu but feeling a little intimidated? Our pint-sized Complete Manual breaks it down into manageable chunks so you can ease yourself into the process.

New from the makers of Linux User & Developer, Ubuntu The Complete Manual contains all a beginner needs to gain a working knowledge of this innovative open-source operating system. From the default software to the best FOSS apps to download from the Software Centre, we’ll tour the top programs and applications and take you through step-by-step tutorials. Soon you’ll be flying with Ubuntu.

Pick up a copy in the Imagine Shop for £7.99 or download from GreatDigitalMags.com.



from Linux User & Developer – the Linux and FOSS mag for a GNU generation http://ift.tt/2cqNZnH
via IFTTT

Sunday 11 September 2016

Raspberry Pi Plays All That Jazz

[James Bellafaire] wanted a good looking old radio with a modern sound. Granted, you could hollow the case out and replace it with an iPod. Or you could convert the thing to an Internet radio. But where’s the fun in that?

[James] took a different approach. Part woodworking project, part Raspberry Pi project, and part microcontroller project, he wound up with a hard drive-based music player in a 1930’s case with knobs that control the playback.

Since the Pi isn’t great at reading potentiometers, [James] took at ATTiny85 and used it for that purpose. Coupled with a few hundred old jazz songs from the Internet archive that the Pi can read from a hard drive, and the old radio cranks out period-appropriate tunes again.

This isn’t a new idea, of course, but we love to see new life given to old cases. We’ve seen Internet radios in similar cases. If you’d rather restore them authentic, we’ve had advice for that, too.


Filed under: ATtiny Hacks, Raspberry Pi

from raspberry pi – Hackaday http://ift.tt/2cfy2vg
via Hack a Day

Saturday 10 September 2016

Landscape Lighting that Also Texts

Your local hardware store or garden supply center probably has everything you need to install landscape lighting all around your property. What’s a little less likely is coming out of that situation with fewer holes in your wallet than in your yard. And even then, it’s pretty much guaranteed that any off-the-shelf equipment won’t send you a text message when your landscape lighting isn’t working properly. [Mark]’s landscape lighting system does, though!

Powered by a Raspberry Pi, this landscape lighting system has every feature imaginable. It can turn the lighting on at sunset and turn it off at a set or random time later in the evening. There’s a web interface served from the Pi that allows further user control. The Raspberry Pi also monitors the lighting and can sense when one of the lights burns out. When one does, the Pi uses Twillo to send a text message notification.

There’s not many more features we can imagine packing into a setup like this. Of course, if you don’t have a spare Pi around you can probably manage to get the job done with an ESP8266, or even an old-fashioned Arduino.


Filed under: Raspberry Pi

from raspberry pi – Hackaday http://ift.tt/2cB2h0d
via Hack a Day

Friday 9 September 2016

Raspberry Pi Radio Streaming Service Guts Yamaha Shelf System

There are dozens — dozens! — of options to meet your music and streaming needs these days.  Looking to make something of his own that retains that 90’s vibe of having a dedicated stereo system but with modern wireless integration, [thk4711] turned an old Yamaha hifi into a Raspberry Pi streaming client.

As far as the case goes, a few modifications allowed [thk4711] to use all of the existing buttons, and a quick-swap of the back-plate and screen gave him a better enclosure than one he could fabricate himself. The power supply proved to be the most difficult part of the project due in part to some “digital noise” interference between the digital and analog components while they were wired to a common ground. This was solved by implementing two transformers, a LM2596 voltage regulator and a LT1084 low-noise power supply to smooth things out.

The Raspberry Pi 2-centered device supports internet radio, Spotify connect, Airplay, USB and auxiliary inputs.

The stereo is controlled by good old fashioned digital toggling of the buttons, or via an Apple remote. The project has been thoroughly documented on GitHub. If you’re looking a different line on your favorite tunes, take a bite out of this radio that pumps music directly into your skull.


Filed under: radio hacks, Raspberry Pi

from raspberry pi – Hackaday http://ift.tt/2cc8dfj
via Hack a Day

31415926 (That’s roughly Π times 10 million Raspberries)

The Raspberry Pi Foundation founder Eben Upton has announced that their ten millionth eponymous single-board computer has been sold since their launch back in February 2012. It’s an impressive achievement, especially so since their original sales expectations were for a modest ten thousand. For those of us who watched the RS and Farnell websites crumble under the strain of so many would-be purchasers on that leap day morning four and a half years ago their rapidly exceeding that forecast came as no surprise, but still, it’s worth a moment’s consideration. They passed the Sinclair ZX Spectrum’s British record of 5m computers sold back in February 2015, leaving behind the Pi’s BBC Micro spiritual ancestor on 1.5m sold long before that.

Critics of the Pi will point out that its various versions have rarely been the most powerful small single board computer on the market, or even at times the cheapest. They will also point to the closed-source nature of the Broadcom binary blob that underpins Pi operating systems, and even the sometimes unpredictable nature of the Pi Foundation with respect to its community, product availability and launches. But given that the Pi Foundation’s focus is not on our side of the community but on using the boards as a tool to introduce young people to computing, it’s fair to say that they’ve done a pretty good job of ensuring that a youngster can now get their hands on a useful and easily programmable computer much more easily than at any time in the past.

Would we be in the same position of being able to buy a capable Linux computer for near-pocket-money prices had the Raspberry Pi not been released? Probably so, in fact certainly so. The hardware required to deliver these products has inevitably fallen into a more affordable price bracket, and we would certainly have plenty of boards at our fingertips. They would probably have Allwinner or maybe Mediatek processors rather than the Pi’s Broadcom part, but they would be very likely to deliver equivalent performance at a similar cost. Where the Raspberry Pi’s continued success has come from then has not necessarily been from its hardware but from its community and software. The reliability and ease of use delivered by the Raspbian Linux distribution that Just Works for the parent putting a Pi in front of their child, and the wealth of expert information on the Raspberry Pi forums to get them through any Pi-related troubles are what has given the Pi these sales figures. The boards themselves are almost incidental, almost any hardware paired with that level of background information would likely have met with similar success. Comparing the Pi software experience with for example one of their most capable competitors, it’s obvious that the software is what makes the difference.

It’s likely that Raspberry Pi sales will continue to climb, and in years to come we’ll no doubt be reporting on fresh milestones on ever more powerful revisions of their product. But it’s also likely that their competition will up their software game and their position in the hearts and minds of single board computer users might be usurped by a better offering. If this increased competition in the single board computer market delivers better boards with more for the hardware developer community, then we’re all for it.


Filed under: news, Raspberry Pi

from raspberry pi – Hackaday http://ift.tt/2chspzp
via Hack a Day

Wednesday 7 September 2016

Raspberry Pi Walkie Talkie Mumbles To Friends

His kids wanted walkie talkies, so [Daniel Chote] built one. The TalkiePi is a neat project built around a Raspberry Pi running Mumble, the open-source voice chat system that his kids can share with their siblings and friends.

It’s easy enough to choose the Raspberry Pi, and Mumble is pretty well known. But what’s the easiest way you can think of to add microphone and speakers to the RPi? We applaud [Daniel’s] choice to equip it with the guts of a USB speakerphone. Mumble lets you choose voice activation or keyboard input — in this case an added button makes it push-to-talk, as you would expect in a traditional walkie talkie.

He put all of this into a nicely designed 3D case with a few LEDs, so it is easy to tell that it is ready to transmit. [Daniel] isn’t quite finished yet, though: he’s now working on a new version that is portable, battery powered and uses a Raspberry Pi Zero for the ultimate walkie talkie. We can’t wait to see someone take this to the extreme and include a cellular-modem. But then again, anywhere you can get on WiFi this rig should work, it’s not relegated to a single LAN, and that already far outperforms walkie talkies of yore.


Filed under: Raspberry Pi, wireless hacks

from raspberry pi – Hackaday http://ift.tt/2c9RprE
via Hack a Day

Hackaday Prize Entry: Adblock For TV

Vintage 16mm Film Editor Is Now Retro Arcade

When [Douglas Welcome] found a disposed Kalart Craig 16 mm Projecto-Editor on the curb, he knew it was destined for retro-greatness. This vintage looking device was once used to view and cut 16 mm film strips, and still in mint condition, it was just too cool to pass up. With help of a similarly historic Raspberry Pi 1 Model B, and a little LCD screen, [Douglas] now turned the little box into an awesome retro arcade game console

[Douglas] removed the original optics and lamp from the Projecto and replaced the ground glass screen with a color LCD from a rearview monitor. Where once a little light bulb illuminated 16 mm film, now a 12 mm Broadcom SOC emulates retro games. A USB hub adds some ports to the back of the newborn console for attaching a WiFi dongle and the mandatory USB NES controller replica. [Douglas] also added speakers and an amplifier from scavenged parts, as well as a nice vintage-style power switch and volume knob. The little step-down converter from a cigarette-lighter-socket USB charger powers the Pi from a 12 V power supply.

retroprojecto-speakers retroprojecto-switches

Naturally, our favorite excuse for carrying home old junk is that it might one day make an awesome enclosure for a project, but the [Douglas’s] RetroProjecto is kind of classy and reminds us that a visit to a flea market is overdue. Check out the video below, where [Douglas] walks you through his build!


Filed under: classic hacks

from raspberry pi – Hackaday http://ift.tt/2c8PBit
via Hack a Day

Tuesday 6 September 2016

Enjoy The Last Throes of Summer With a Nice Pool Automation Project

[Ken Rumer] bought a new house. It came with a troublingly complex pool system. It had solar heating. It had gas heating. Electricity was involved somehow. It had timers and gadgets. Sand could be fed into one end and clean water came out the other. There was even a spa thrown into the mix.

Needless to say, within the first few months of owning their very own chemical plant they ran into some near meltdowns. They managed to heat the pool with 250 dollars of gas in a day. They managed to drain the spa entirely into the pool, but thankfully never managed the reverse. [Ken] knew something had to change. It didn’t hurt that it seemed like a fun challenge.

The first step was to tear out as much of the old control system as could be spared. An old synchronous motor timer’s chlorine rusted guts were ripped out. The solar controler was next to be sent to its final resting place. The manual valves were all replaced with fancy new ones.

Rather than risk his fallible human state draining the pool into the downstairs toilet, he’d add a robot’s cold logical gatekeeping in order to protect house and home. It was a simple matter of involving the usual suspects. Raspberry Pi and Arduino Man collaborated on the controls. Import relay boards danced to their commands. A small suite of sensors lent their aid.

Now as the soon-to-be autumn sun sets, the pool begins to cool and the spa begins to heat automatically. The children are put to bed, tired from a fun day at the pool, and [Ken] gets to lounge in his spa; watching the distant twinkling of lights on his backyard industrial complex.


Filed under: home hacks, robots hacks

from raspberry pi – Hackaday http://ift.tt/2ciDYVN
via Hack a Day

Sunday 4 September 2016

Music Player for the Ability-Impaired

Most of the hacks we come across here at Hackaday don’t require much more than being “cool” to get our attention. But, every so often we find something that goes a step beyond that and does something truly good for the world. This is one such project, and its goal couldn’t be anymore altruistic: to allow the elderly to enjoy music, even when their declining vision and motor skills make traditional devices difficult to use.

It’s hard to overstate how important music is to people; there are few forms of art more emotionally effective. So, it was a major loss when an elderly relative of [DusteD] was no longer able to operate their CD player. Luckily, [DusteD] was there with an ingenious solution that uses RFID cards to play music from an always-on Raspberry Pi.

The operation is as simple as it possibly could be: the user places the RFID card onto the Raspberry Pi’s enclosure, an RFID reader tells the Pi which song is being requested, and it’s played. That’s it — there are no other controls at all. The song simply plays until it’s over (or another card is used), and the volume is preset.

Now, obviously the music library will be limited by the number of cards made. But, they’re large and easy to read, and there is no reason why a card couldn’t be used to trigger an album or a pre-made playlist. Remember, the goal here is ease of use, not to replace an iPod. This isn’t the first music player we’ve seen with a unique control method, but it’s by far the simplest.

 


Filed under: musical hacks, Raspberry Pi

from raspberry pi – Hackaday http://ift.tt/2czZRTY
via Hack a Day

Amazon

Donate

Donate Towards More Raspberry PI's for Projects