Saturday, 5 November 2016

Bake a Fresh Raspberry Pi: Never Struggle To Configure A Pi Again

[David Ferguson] has put together a nice little tool called Pi Bakery. Half MIT Scratch, half configuration utility, it puts a nice visual face on all the various start-up scripts, and kludges that the Raspberry Pi community uses to configure the popular single board computer.

Raspberry Pi’s are a little weird. They mostly get crammed into the slots microcontrollers used to live in. The nice part about microcontrollers is that they just turn on and start going. There’s no OS to boot. No file system to mount. Of course the downside to microcontrollers is often that there’s no OS to boot and file system to mount. Regardless, mostly you’ve got to spend a bit configuring a Raspbian install before a Raspberry Pi really starts to encroach on the microcontroller’s territory.

Pi Bakery abstracts all this. You can drag blocks, representing scripts, in the order you’d like them run. If you want to your Pi to boot up, connect to WiFi, and then start a VNC server it’s as easy a dragging the blocks in the right order and filling in the blanks. You can see an example of it in operation in the video after the break.


Filed under: Raspberry Pi

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

Tuesday, 1 November 2016

SSH Enters the Mosh Pit

With so many systems depending on Linux, the secure shell SSH has become a staple for many developers. If you are connected to your Raspberry Pi via a cable or a wireless router a few feet away, SSH can provide you with an encrypted connection straight to the box. However, if you have a system out in a swamp somewhere with intermittent slow network access, SSH can be a real pain. When your IP address can change (for example, roaming on a cellular network), SSH has problems, too.

To combat these and other problems, you might consider an open source program called Mosh (mobile shell). There’s two parts to Mosh. One part works as a server while the other is the client application. Neither of these require root access. You can see a video about Mosh below.

Using Mosh is pretty similar to using SSH (and, in fact, you can use SSH to initially launch Mosh). The Mosh server has a system that synchronizes the screen, so it doesn’t waste time sending characters that won’t really appear to the user. In addition, the client keeps its own notion of the screen and it attempts to handle some operations locally. For example, in SSH every character you type echos through the server. While this is useful to know the server is there, it isn’t good for responsiveness. Mosh handles echo locally and also predicts certain things like insertion and deletion of characters. Unlike SSH, Mosh uses UDP datagrams so packet loss isn’t a big deal.

In fact, if you switch networks or if your computer sleeps and wakes up, Mosh will stay “connected.” Because Mosh doesn’t send data you won’t see, you can easily interrupt a long scrolling output (Mosh selects a frame rate for scrolling based on the network connection’s quality).

Seeing the Future

When you type something in Mosh, it might make a prediction. If the network isn’t robust, Mosh will presume that most characters will appear at the current cursor location. It also expects certain behavior of keys like backspace, right arrow, and left arrow. Of course, there’s a chance it is wrong, so it underlines guesses until they are proven right. The software gathers batches of predicted input (epochs) that it validates (or refutes) as a group. Certain characters (like the up and down arrow) heuristically start new epochs.

For example, if you start typing inside emacs (or vi), you will start building an epoch that does not display on the screen. When data comes back from the host computer that validates the guess as correct, Mosh will display the epoch and continue to display its guesses until something (like an up or down arrow) changes the epoch. Then it will go back to not performing the local echo until it is once again correctly predicting. All this works well, but you can turn predictions off if you wish.

If you want to see the behavior firsthand, open up a Mosh session and start typing on a shell prompt. For example, consider you are going to enter this command:

find / -name 'mosh*' -print

Type up to the first slash. Now disconnect your network (pull the cable or shut off your wireless). Type some more of the command and you’ll see the speculative characters show up underlined (see below; the red cursor indicates the connection is currently not up). Now either reconnect the network or turn on your phone’s hot spot or otherwise connect to a different network. Finish typing the command and it should all work.

mosh

The Kitchen Sync

Mosh also claims to solve a host of other display-related problems stemming from the use of Unicode and escape characters. However, the real engine is the synchronization piece which can actually keep any abstract object in sync across two devices. Mosh uses two instances of this sync protocol (SSP); one to keep the screen buffer and one to handle the input buffer. The reality is that Mosh is just a terminal emulator built over SSP. It seems like SSP could find use in other applications where two machines need to stay in sync over a low-quality network.

Mosh is available on a surprising number of platforms. In addition to the usual suspects, you can get Mosh as part of the JuiceSSH client on Android. Windows users can use Cygwin or a version that runs within Chrome. It also runs on a Mac or any of several Linux and BSD distributions. Of course, you can also build it from source. Installing it on Raspian is as easy as issuing the usual command:

sudo apt-get install mosh

If you are just a desktop or server Linux user, you might never care about Mosh. But if you deploy systems to places where network connectivity is spotty or changes, it is worth a look. Even more importantly, if you have a need to keep an arbitrary object in sync between two different computers despite a poor network, you should really check out SSP to see if you can bend it to your will.


Filed under: linux hacks, Raspberry Pi

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

Sort Your Candy With A Raspberry Pi And Google Cloud Vision

If you have been off trick-or-treating and returned home with an embarassment of candy, what on earth can you do to mange the problem and sort it by brand?

Yes, it’s an issue that so many of us have had to face at this time of year. So much a challenge, that the folks at [Dexter Industries] have made a robotic candy-sorter to automate the task.

OK, there’s something of the tongue-in-cheek about the application. But the technology they’ve used is interesting, and worth a second look. Hardware wise it’s a Lego Mindstorms conveyor and hopper controlled by a Raspberry Pi through the BrickPi interface. All very well, but it’s in the software that the interest lies. They use the Raspberry Pi’s camera to take a picture to send off to Google Cloud Vision, which they then query to return a guess at the brand of the candy in question. The value returned is then compared to a list of brands to keep or donate to another family member, and the hopper tips the bar into the respective pile.  They provide full build details and code, as well as the video we’ve put below the break. So simple a child can explain it, sort of.

Machine vision remains a challenge, as we can see from our list of stories tagged with it; only  a few of them over all the years Hackaday has been in existence. Using a cloud service might not be to everyone’s taste, but it provides an alternative route into machine vision as well as the extra power of the Google engine, and could open up the technology to makers who might not otherwise use it.

[via Recantha]


Filed under: Raspberry Pi

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

Monday, 31 October 2016

Hackaday Links: October 30, 2016

Diablo. Mech Warrior. Every LucasArts game. There are reasons to build an old PC, and no, emulation cannot completely capture the experience of playing these old games. [Drygol] set out to create a retro PC and succeeded brilliantly. The built features an old desktop AT case (when is the last time you saw one of them?), a 233MHz Pentium with MMX technology, an ancient PCI video card, and an old ISA Ethernet card (with AUI connector). Incoming upgrades will be an ATI 3D Rage PRO, PCI SoundBlaster, and hopefully Windows 98SE.

Right now, we’re gearing up for the Hackaday Superconference next weekend. It’s going to be awesome, and we’re going to announce the winner of the Hackaday Prize. We have another contest going on right now – the Enlightened Raspberry Pi Contest. The name of the game here is documentation. Build something, document it on hackaday.io, and you get some cool prizes.

It’s no secret to Hackaday readers that I’m a gigantic dumbass. A few weeks ago, I speculated Espressif’s ESP32 module won’t see out of stock issues unless someone figures out how to run a Nintendo emulator on it. [Sprite_tm] took this as a challenge and put an NES emulator on an ESP32 dev board as a test. Now, [Derek Lai] built the WiFiBoy32, a very simple PCB with a few buttons, speaker, LCD screen, and an ESP32 module built just to play old Nintendo games. Great, now the ESP32 will see Raspberry Pi Zero levels of adoption.

The VoCore is a tiny router SoC-based Linux computer that’s an acceptable solution in some cases. We’ve seen a few tutorials, and a few people playing Doom on it. Now there’s a VoCore2 on IndieGogo. There are two models, The VoCore 2 and VoCore 2 Lite, with the Lite model available for $4 + shipping. That’s really cheap, even if the ‘tiny board that runs Linux for under $10’ market is getting a little crowded.

@mwichary got lost in Spain and stumbled upon something fantastic. Instead of following the signs for the Dali museum, he found another sign for the ambiguously named Museu de la Tecnica. What was inside? The greatest collection of typewriters on the planet. There’s the original Sholes typewriter, a weird two-keyboard typewriter, a dual typewriter, bizarre ball typewriters, everything is typewriters, and it’s all in a tiny, tiny town in Spain. Thanks [Beth] for the tip.

The ATtiny85 is the new 555. Want proof? Here’s a ring watch, constructed out of nothing but some perf board, a few resistors, buttons, and an OLED. The ATtiny85 is the only active component in the project.

Your input requested. This is the Hackaday Retro Edition. Currently, it displays five random Hackaday posts every five minutes, stripped of all JavaScript, CSS, and Web 2.0 cruft. The idea is to make a destination on the Internet that is accessible from every computer, from Commodore 64s to computers running an Intel 4004 (this is possible, and it happened). The Retro Edition is my baby, and over the next few months, I’m going to take some time to fix it up. What would you like to see in an updated Hackaday Retro Edition?


Filed under: Hackaday Columns, Hackaday links

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

Saturday, 29 October 2016

Protecting Your Home Against Potato Invaders

Not sure where the potatoes were sneaking in, [24Gospel] did what any decent hacker would do: strapped a camera to a Raspberry Pi, hacked a bit on OpenCV, and built himself a potato detection system. Now those pesky Russets can’t get into the house without tripping the tuber alarm.

oku0kbr

OK, seriously. [24Gospel] works for a potato farm as a systems/software developer. (How big does a potato farm have to be to require a dedicated software guy?) His system is still a first step, but the goal is to grade the potatoes, record data about size and defects, and even tell different potato types apart. And he’s found decent success so far, especially for the money. We don’t often build projects that need to operate in hostile environments, but we appreciate the nice plastic case and rugged adjustable steel frame that supports the Pi and camera over the sorting bed.

Even more, we applaud the hacker spirit here. [24Gospel] is obviously working in a serious production environment, but still he’s trying out new things in an attempt to make it work better. While it would be impossible to quantify the impact of this kind of on-the-job ingenuity, we bet it’s not insignificant. Why don’t we see more documented workplace hacks around here? Would the unsung heroes please stand up?

[via /r/raspberry_pi]


Filed under: Raspberry Pi

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

Friday, 28 October 2016

ODROID XU4 Runs Cool as Water

We did a bit of looking through the ODROID forums and apparently it’s quite possible to squeeze an impressive amount of performance out of these little single board computers, if you don’t mind them getting boiling hot.

Now, some people have taken pedestrian routes. It’s a low power single board computer after all. A bigger heatsink or a fan appears to be enough for most. [Micky] and a friend, however, decided this is a problem that can only be solved with a healthy bit of overengineering.

Using a water cooler meant for a full CPU, a modified chipset cooling block (meant for the North or South Bridge), a liberal application of plexiglass, and some thermal paste they manage to triple the cost of their computer set-up with this wonderfully overkill desk ornament.

Now it can do all the things a Raspberry Pi can do, faster and watercooled.


Filed under: computer hacks

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

Monday, 24 October 2016

Raspberry Pi Zero as a USB Stick

The Raspberry Pi Zero is small enough that it could almost be mistaken for a USB gadget, rather than a standalone computer. Maybe that was the inspiration that drove [Novaspirit] to completely “donglify” his Zero.

This is a great convenience hack if you’ve got a Zero just kicking around. With minimal soldering, he converted the Zero’s onboard female USB jacks into a male USB plug. From there on out, it’s all software, and the video (embedded below) takes you through all the steps on Windows.

First, he attaches the Raspberry Pi Zero running Pixel OS to his main computer as a USB network device, and then configures it to be useful. He sets up VNC on the Pi so that you can log into its desktop in a window, sets up networking on the Pi so that it can connect to the wider Internet through the laptop, etc. He installs OwnCloud so that the Zero serves as a cloud storage solution, only the “cloud” is plugged into your laptop’s USB port. The point of all this is getting the maximum benefit out of a Pi Zero without having to lug around any cables: just plug it in and you’re networked.

Of course, [Novaspirit] isn’t the first person to have ever connected a Zero over USB networking. But his hardware hack is neat and dead simple, and setting up the software side will teach you something if you’ve got a Windows background. Check it out.


Filed under: Raspberry Pi

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

Amazon

Donate

Donate Towards More Raspberry PI's for Projects