Saturday, 31 October 2015

Raspberry Pi Halloween Voice Changer

[Dave Shevett] has spent a lot of time (more than a year) expanding his Technomancer costume along with the companion (Arduino-driven) magic staff. He found, however, he needed a way to get his voice out from behind the mask. If you are going to go through that much trouble, you might as well augment your voice at the same time, right?

[Dave’s] voice changer uses a Raspberry Pi which isn’t all that complicated. The Pi uses Linux, and Unix–the predecessor to Linux–has a long history of having little tools you can string together to do big jobs. So once you have a Pi and a sound card, the rest is just some Linux command line wizardry.

There’s a battery and a small portable amplifier to get that booming voice. Since you don’t want to lug a keyboard and monitor around to handle every reboot, [Dave] set the Pi up to run his voice-changing scripts on each reboot.

This is a great example of why old Unix programmers make small tools and use the shell to join them together. [Dave’s] voice changer is pretty much just some off the shelf parts and a  script so simple it hardly qualifies as programming in any real sense. In fact, it is essentially one line of “code”:

play "|rec --buffer 2048 -d pitch -300 echos 0.8 0.88 100 0.6 150 .5 band 1.2k 1.5k"

Sure, there is some street cred in embedded development to doing everything the hard way, but with the advent of cheap embedded Linux systems, why not take advantage of the tools where you can?

If you want a more roll-your-own approach, you can pick up your Arduino or break out an audio mixer (but good luck getting it in your costume).

Filed under: Holiday Hacks, Raspberry Pi

from Hackaday » raspberry pi
via Hack a Day

Tuesday, 27 October 2015

Listen to the Rain, Raspberry Pi Style

There’s an old proverb algebra teachers often recite: You have to use what you know to find out what you don’t know. The same could be said about sensors. For example, analog to digital converters use something computers are good at finding (like time) and use it to determine something they aren’t good at finding (like voltage). So how do you detect rainfall? If you are [lowflyerUK], you use the microphone in your web camera and a Raspberry Pi.

The idea was to reduce irrigation usage based on rainfall, so an exact measurement isn’t necessary. The Python code that analyzes the audio input is calibrated with three configuration parameters and attempts to remove wind noise. Even so, it needs to be in a room that gets a lot of noise from rainfall and ambient noise can throw the reading off.

The weather service is never going to adopt this system. Still, it is a great example of taking something you know and using it to get something you don’t know. If you want a more complete weather station, we have a few options for you.

Filed under: Raspberry Pi

from Hackaday » raspberry pi
via Hack a Day

Sunday, 25 October 2015

Raspberry Pi Sense HAT Super Weather Dashboard

[InitialState] posted a great multipart tutorial about building what he calls a “Hyper-local Weather Dashboard.” In plain language, he created a Raspberry Pi-based web page that fuses weather data from Wunderground along with locally sensed weather data.

The tutorial has thee parts. The first part covers reading data from Wunderground using their developer’s API (you’ll need an API key; a free one is good for 500 queries a day). The second part covers using the Pi Sense HAT to measure local temperature, humidity, and pressure. The final part ties it all together using producing the hyper-local weather dashboard (whatever that really means).

We talked about the Sensor HAT earlier (and there’s more info in the video, below). Seems like those lights could do something, although that wouldn’t do you any good over a web interface. This is a good-looking project (and tutorial) and easy enough that it would be a good place to start
experimenting with the Raspberry Pi.

Filed under: Raspberry Pi

from Hackaday » raspberry pi
via Hack a Day

Thursday, 22 October 2015

Vala, Jim Zemlin, micro:bit and more in issue #158

Your brand new issue of Linux User & Developer hits the shelves and our online store today – in case you haven’t got your copy early (one of the perks of subscribing), here’s a little taste of what’s in store for you this month:

Code GNOME software

This month’s lead feature tackles Vala, the programming language created to make life easier for GNOME developers. Get to grips with this powerful C dialect and you’ll be building Gtk-based software in no time.

The future is open source

Jim Zemlin explains the value of collaborative development and why the future of technology is in open source, taking us through the FOSSology, OpenChain and Real-Time Linux announcements, as well as the new report showing that the Foundation’s Collaborative Projects are worth over $5 billion.

Making the micro:bit

Element 14’s Richard Curtin speaks about the making of the micro:bit, describing the development of this 21st Century BBC Micro and laying out the roadmap for its free deployment to 1 million UK secondary school students.

We’ve packed the tutorials section full to the brim, too – and we’re introducing two new series from Mihalis Tsoukalos that will take us through the worlds of systems programming and computer science. Over in the Pi section we’re showing you how to hack your TV, set up the official new display and more. And if you’re thinking of buying a new laptop this Christmas, check out Gareth Halfacree’s review of the new HP 255 G3.

Enjoy the issue!

from Linux User & Developer - the Linux and FOSS mag for a GNU generation

Docker 1.8.2 on Raspberry Pi 2

A no fuss Docker install on Rapberry Pi 2

During CloudFleet development, we had some problems in finding a consistent way to install Docker in Debian Jessie on ARM (Raspberry Pi 2). Debian moved us around between mirrors a bit and then eventually settled on Docker 1.7.1 which doesn’t work on ARM (Socket operation on non-socket). Luckily, we found a nice Docker .deb package that works on ARM thanks to the Hypriot community (check the link for the latest Docker version). To use it, simply do:
dpkg -i docker-hypriot_1.8.2-1_armhf.deb
Or if you use Ansible, use this snippet:
- name: install_docker | download and install the Hypriot .deb package
  shell: URL=''; FILE=`mktemp`; wget "$URL" -qO $FILE && dpkg -i $FILE; rm $FILE
    chdir: /tmp
    executable: /bin/bash
    - blimp
    - install
    - install_docker
    - packages
For a more sophisticated Ansible script that works cross-architecture in Debian, check out our full install_docker task on GitHub.
That should be it. Enjoy Docker on ARM and be sure to check CloudFleetout if you’re interested in having your own cloud on your own device!

If Docker does not start run "sudo rpi-update" reboot and then it will work

Crownstone – the smart power outlet


Crownstone by DoBots is a Dutch Kickstarter project that wants to make your power outlets smarter. A Crownstone is either built or plugged in and enables you to switch devices on and off and measure power consumption. It also knows where you are, which device is plugged in (by measuring its power consumption) and forms a mesh network with other nearby Crownstones.

We spoke with Anne van Possum – robotics guy, and COO and founder of DoBots – to ask him about DoBots and how they came up with this idea.

CrownstoneAnne: We’ve been on this for about a year now. DoBots is a spinoff from a company doing research into smart digital networking in Rotterdam. We’ve been working on biology-inspired algorithms to create digital ‘swarms’ of devices, from microbots to trucks.

One of these algorithms helps you build maps and locate objects in an area – think indoor GPS. We wanted to use that to make a house smarter, and as everything is controlled by power, we started with the power outlets. Add in some algorithms to detect what device is connected, and a mesh network, and there you have the Crownstone.

Jos: Clever! What devices can you recognise?

Anne: Many are simple: fridges, televisions. Others are harder – we’ve got trouble with the difference between LCD- and TFT-based monitors, for example. Our algorithm is about 93% accurate right now and we’re working on making it better before we put it on Github. Did I mention that everything we do is open source?

Jos: That is awesome. But why would you make your secret sauce open source?

Anne: Because we believe in it. We can never, by ourselves, figure out all the smart things you can do with a device like this, but if everybody starts making apps and tools, it can do anything.

Like, somebody could build an app to make a list of all the devices you have. Useful for insurance, or perhaps a local power tool sharing initiative.

Or make a child lock system which disables the TV or microwave under certain conditions, like when you leave the room or house or at certain times.

Jos: So we all know home automation is cool. What makes Crownstone different?

CrownstoneAnne: Well, for one, it is relatively cheap, in no small part because we don’t need a hub. We use the smartphone as a hub to analyse and store the data! The devices aren’t entirely dumb – each has its own little chip with 16K RAM (we’re going to move to 32K soon) and 256Kb flash. Doesn’t sound like much, but it is enough to store 24 hours of power usage statistics at a 1-minute sample rate, which is plenty.

It is all built around open protocols like Bluetooth LE, so it isn’t only extremely low power, it will work with nearly any smartphone. If you want a static hub, we have a flash card for Raspberry Pi devices. Stick in a Bluetooth dongle and it can act as hub, so you’ll get a warning on your smartphone when your TV gets unplugged while you’re not home… We use XMPP to get through your router’s firewall for that.

And the devices aren’t just sending – they can also receive and scan for data. If you walk around with a smartwatch, a Fitbit or another beacon, the Crowns can see you and act accordingly.

Combined with the automatic device detection, this means the system requires very little up-front configuration. You don’t need to spend time configuring every Crownstone to know what device it is connected to or what room it is in – they know that already. No need to configure your fridge to stay on and your TV to be turned off when you leave the house.

CrownstoneJos: How about security? I’d like to know if my Chromebox gets stolen when I’m on holiday, but I’d rather not have a potential thief know I’m not home!

Anne: Got you covered. Bluetooth 4 is actually reasonably decent, security-wise. Not perfect – the key exchange is a bit of a mess, and I personally hacked some devices already (see my Github), but Bluetooth 4.2 is darn solid. I’ve yet got to see somebody crack an elliptic curve Diffie-Hellman key exchange. So if you have an up-to-date phone or Bluetooth dongle, you’re very much secure.

You can find more interesting details on our blog, too:

Jos: What do you have to offer for people who want one and want to build with it?

Anne: We offer both a set of two Crownstones you plug between the device and the wall outlet, and three Crownstones you can build into your wall outlet yourself. So, easy or DIY; both. And what we do is on Github, as I mentioned – even the firmware. How many projects do you know which publish that?

On Github you can find several small mobile applications, mostly Android-based but iOS comes as soon as our Kickstarter has succeeded. There we also feature an SD card image for the Raspberry Pi, turning it into a hub.

Go get yours here:

Jos PoortvlietAbout Jos

This article was kindly contribted by Jos Poortvliet, a people person, technology enthusiast and all-things-open evangelist. Jos is also community manager at ownCloud and openSUSE, and a KDE marketing veteran.

from Linux User & Developer - the Linux and FOSS mag for a GNU generation

Wednesday, 21 October 2015

Raspberry Pi Powers the Desk of the Future

Recent science fiction movies always show people sitting at stylish semi-transparent desks that have all kinds of strange and wonderful gadgets in them. Our desks look like something your grandfather might have sat at. [Frederick Vandenbosch] must have seen those same movies so as part of contest he decided to build the desk of the future.

The desk is as much a furniture project as an electronics project, but it does have a Raspberry Pi, a scavenged laptop LCD, embedded touch sensors and LEDs, a wireless charger, and a built-in sound system. In addition, it uses a Gertbot and some stepper motors that it uses to raise and lower the screen in and out of the desk (watch the video below to see how that looks).

[Fredrick] used Python to get the major functions of the desk programmed. We couldn’t help but think of all the things you could do with an easily programmable desk surface: show stock quotes (or sports scores), notify about e-mail, or other things. Although it doesn’t look like it would be simple for a simple user to add those things, if you were a handy programmer, they look like they’d be in reach.

We’ve seen some desks before, but nothing quite like this. We couldn’t help but wonder if you could add some Minority Report-style goodness to [Frederick’s] already impressive desk.

Filed under: Raspberry Pi

from Hackaday » raspberry pi
via Hack a Day

Monday, 19 October 2015

An Intel Atom CPU In The Raspi Form Factor

For years now, people have been trying to stuff an Intel processor on a credit card sized board. An x86 board that can fit in your pocket is an intriguing device – after all, that’s what Gumstix, the forerunner of the Raspberry Pi, were. Efforts to put x86 on a dev board have included the Minnowboard, the Intel Galileo and Edison, and even the Intel Compute Stick. These have not seen the uptake you would expect from a small x86-powered board, but that tide may soon turn. The UP board is exactly what you would expect from a Raspberry Pi-inspired board with a real Intel processor.

The feature set for the UP board is impressive for a credit card sized board; it’s powered by a quad-core Intel Atom x5-Z8300 CPU running at 1.84 GHz. The board comes equipped with 1GB of RAM, 16GB of eMMC Flash, Gigabit Ethernet, five USB 2.0 ports (one on a pin header) and one USB 3.0 port. Up also includes a real-time clock, HDMI, the same 40-pin GPIO pin connector found in the Raspberry Pi Model B Plus, and DSI and CSI connectors for the Raspberry Pi camera and touch screen.

To be fair to all the previous attempts at making a board built around an x86 chip that borrows heavily from the Raspberry Pi, there haven’t been many chips out there that have been suitable for credit card-sized applications. Only in the last year or so has Intel released chips suitable for an x86 single board computer, and the growing market of Windows 10 tablets bears this out. While it remains to be seen if the UP board will be a success, more than a few people will pick one of these up for a miniature Skype box.

Filed under: Raspberry Pi

from Hackaday » raspberry pi
via Hack a Day

Sunday, 18 October 2015

FPGAs For The Raspberry Pi

FPGA development has advanced dramatically in the last year, and this is entirely due to an open-source toolchain for Lattice’s iCE40 FPGA. Last spring, the bitstream for this FPGA was reverse engineered and a toolchain made available for anything that can run Linux, including a Raspberry Pi. [Dave] from Xess thought it was high time for a Raspberry Pi FPGA board. With the help of this open-source toolchain, he can program this FPGA board right on the Raspberry Pi.

The inspiration for [Dave]’s board came from the XuLA and StickIt! boards that give the Raspberry Pi an FPGA hat. These boards had a problem; the Xilinx bitstreams had to be compiled on a ‘real’ PC and brought over to the Raspberry Pi world. The new project – the CAT Board – brings an entire FPGA dev kit over to the Raspberry Pi.

The hardware for the CAT Board is a Lattice iCE-HX8K, 32 MBytes of SDRAM, a serial configuration flash, LEDs, buttons, DIP switches, grove connectors, and SATA connectors (although [Dave] is just using these for differential signals; he doesn’t know if he can get SATA hard drives to work with this board).

Despite some problems with his board house, [Dave] eventually got his FPGA working, or at least the bitstream configuration part, and he can blink a pair of LEDs with a Raspberry Pi and programmable logic. The Hello World for this project is done, and now the only limit is how many gates are on this FPGA.

Filed under: FPGA, Raspberry Pi

from Hackaday » raspberry pi
via Hack a Day

Friday, 16 October 2015

Code Craft: When #define is Considered Harmful

An icon of Computer Science, [Edsger Dijkstra], published a letter in the Communications of the Association of Computer Machinery (ACM) which the editor gave the title “Go To Statement Considered Harmful“. A rousing debate ensued. A similar criticism of macros, i.e. #define, in C/C++ may not rise to that level but they have their own problems.

Macros are part of the preprocessor for the C/C++ languages which manipulates the source code before the actual translation to machine code. But there are risks when macros generate source code. [Bjarne Stroustrup] in creating C++ worked to reduce the need and usage of the preprocessor, especially the use of macros. In his book, The C++ Programming Language he writes,

Don’t use them if you don’t have to. Almost every macro demonstrates a flaw in the programming language, in the program, or in the programmer.

As C retrofitted capabilities of C++, it also reduced the need for macros, thus improving that language.

With the Arduino using the GNU GCC compilers for C and C++ I want to show new coders a couple of places where the preprocessor can cause trouble for the unwary. I’ll demonstrate how to use language features to achieve the same results more cleanly and safely. Of course, all of this applies equally when you use any of these languages on other systems.

We’re only going to be looking at macros in this article but if you want to read more the details about them or the preprocessor see the GNU GCC Manual section on the preprocessor.

Basic Macro Usage

The preprocessor is complex, but described in simplified terms, it reads each line in a compilation unit, i.e. file, scanning for lines where the first non-whitespace character is a hash character (#). There may be whitespace before and after the #. The next token, i.e. a set of characters bounded by whitespace, is the name of the macro. Everything following the name is the argument. A macro has the form:

#define <name> <rest of line>

The simplest macro usage is to create symbols that are used to control the preprocessor or as text substitution in lines of code. A symbol can be created with or without a value. For example:

#define LINUX 
#define VERSION 23 

The first line defines the symbol LINUX but does not give it a value. The second line defines VERSION with the value 23. This is how constant values were defined pre-C++ and before the enhancements to C.

By convention, macro symbol names use all caps to distinguish them from variable and function names.

Symbols without values can only be used to control the preprocessor. With no value they would simply be a blank in a line of code. They are used in the various forms of the #if preprocessor directives to determine when lines of code are included or excluded.

When a symbol with a value appears in a line of code, the value is substituted in its place. Here is how using a macro with a value looks:

const int version_no = VERSION; 

which results in the code

const int version_no = 23; 

This type of macro usage doesn’t pose much of a threat that problems will arise. That said, there is little need to use macros to define constants. The language now provides the ability to declare named constants. One reason macros were used previously was to avoid allocating storage for a value that never changes. C++ changed this and constant declarations do not allocate storage. I’ve tested this on the Arduino IDE, and found that C does not appear to allocate storage but I’ve seen mention that C may do this on other systems.

Here is the current way to define constants:

const int version = 23;
enum {start=10, end=12, finish=24};   // an alternative for related integer consts

Function Macros

Another form of macro is the function macro which, when invoked looks like a function call, but it is not. Similar to the symbol macros, function macros were used to avoid the overhead of function calls for simple sequences of code. Another usage was to provide genericity, i.e. code that would work for all data types.

Function macros are used to pass parameters into the text replacement process. This is fraught with danger unless you pay close attention to the details. The use of inline functions is much safer as I’ll show below.

To illustrate here’s an example of a function macro to multiply two values.

#define MULT(lhs, rhs) lhs * rhs

This function macro is used in source code as:

int v_int = MULT(23, 25);
float v_float = MULT(23.2, 23.3);

Consider this use of the macro, its expansion, and its evaluation, which definitely does not produce the expected result:

int s = MULT(a+b, c+d);
// translates to: int s = a + b * c + d;
// evaluates as: a + (b * c) + d

This can be addressed by adding parenthesis to force the proper evaluation order of the resulting code. Adding the parenthesis results in this code:

#define MULT(lhs, rhs) ((lhs) * (rhs))
int s = MULT(a+b, c+d);
// now evaluates as: (a + b) * (c + d)

The parenthesis around lhs force (a + b) to be evaluated before the multiplication is performed.

Another ugly case is:

#define POWER(value) ((value) * (value))
int s = POWER(a++);
// evaluates as: ((a++) * (a++))

Now there are two problems. First, a is incremented twice, and, second, the wrongly incremented version is used for the calculation. Here again it does not produce the desired result.

It’s really easy to make a mistake like this with function macro definitions. You’re better off using an inline function which is not prone to these errors. The inline equivalents are:

inline int mult(const int x, const int y) { return (x * y); }
inline int power(const int x) { return (x * x); }

Now the values of x and y are evaluated before the function is called. The increment or arithmetic operators are no longer evaluated inside the actual function. Remember, an inline function does not produce a function call since it is inserted directly into the surrounding code.

In C, there is a loss of generality using inline over the macro. The inline functions shown only support integers. You can add similar functions for different data types, which the standard libraries do, but the names must reflect the data type. A few cases would be covered by mult_i, mult_f,  mult_l, and mult_d for integer, float, long and double, respectively.

This is less of a problem in C++ where there are two solutions. One is to implement separate functions, as in C, but the function names can all be mult relying on C++’s ability to overload function names.

A nicer C++ version is to use template functions. These really are straightforward for simple situations. Consider:

template <typename T>
inline T mult(const T x, const T y) { return (x * y); }
template <typename T>
inline T power(const T x) { return (x * x); }

You use these just like any other function call and the compiler figures out what to do. There is still one minor drawback. The mult cannot mix data types which MULT has no problem doing. You must use an explicit cast to make the types agree.

The code generated by the inline and template versions are going to be the same as the macro version, except they will be correct. You should restrict the use of macros to preprocessing of code,  not code generation. It’s safer and once you are used to the techniques it’s easy.

If these problems aren’t enough, take a look at the GNU preprocessor manual section which provides more details and examples of problems.

Stringification and Concatenation

The previous sections discussed the problems with macros and how to avoid them using C/C++ language constructs. There are a couple of valuable uses of macros that we’ll discuss in this section.

The first is stringification which converts a function macro argument into a C/C++ string. The second is concatenation which combines two arguments into a single string.

A string is created when a # appears before a token. The result is a string: #quit becomes “quit”.

Two arguments are concatenated when ## appears between them: quit ## _command becomes quit_command.

This is useful in building tables of data to use in a program. An illustration:

#define COMMAND(NAME) { #NAME, NAME ## _command }

struct command commands[] =
COMMAND (quit),
COMMAND (help),

expands to the code

struct command
char *name;
void (*function) (void);

struct command commands[] =
{ "quit", quit_command },
{ "help", help_command },


The C/C++ preprocessor is powerful and dangerous. The standards committees have followed Stroustrup’s lead in adding features that reduce the need to use the preprocessor. There is still a need for it and probably always will be since it is an inherent part of the languages. Be careful when and how you use #define, and use it sparingly.

Filed under: Hackaday Columns, Software Development, software hacks

from Hackaday » raspberry pi
via Hack a Day

Monday, 12 October 2015

Hackaday Links: October 11, 2015

[Kratz] just turned into a rock hound and has a bunch of rocks from Montana that need tumbling. This requires a rock tumbler, and why build a rock tumbler when you can just rip apart an old inkjet printer? It’s one of those builds that document themselves, with the only other necessary parts being a Pizza Hut thermos from the 80s and a bunch of grit.

Boot a Raspberry Pi from a USB stick. You can’t actually do that. On every Raspberry Pi, there needs to be a boot partition on the SD card. However, there’s no limitation on where the OS resides,  and [Jonathan] has all the steps to replicate this build spelled out.

Some guys in Norway built a 3D printer controller based on the BeagleBone. The Replicape is now in its second hardware revision, and they’re doing some interesting things this time around. The stepper drivers are the ‘quiet’ Trinamic chips, and there’s support for inductive sensors, more fans, and servo control.

Looking for one of those ‘router chipsets on a single board’? Here you go. It’s the NixCoreX1, and it’s pretty much a small WiFi router on a single board.

[Mowry] designed a synthesizer. This synth has four-voice polyphony, 12 waveforms, ADSR envelopes, a rudimentary sequencer, and fits inside an Altoids tin. The software is based on The Synth, but [Mowry] did come up with a pretty cool project here.

Filed under: Hackaday Columns, Hackaday links

from Hackaday » raspberry pi
via Hack a Day

Saturday, 10 October 2015

Open Source FPGA Pi Hat

Over on, [Dave Vandenbout] has posted the CAT board, a Raspberry Pi daughterboard hat that features a Lattice FPGA, 32 MB of RAM, EEPROM, and a few Grove and PMOD connectors. The CAT takes advantage of the open source tool chain available for Lattice including the Python-based MyHDL (although, you could just use Verilog directly, if you prefer) and Icestorm. One interesting point: you can run the tool chain on the Raspberry Pi, resulting in a self-contained and largely portable FPGA development environment.

The design files are actually on Github. You may notice the SATA connectors. However, [Dave] doesn’t know if you could really use SATA drives with them–they are there for general purpose differential I/O.

It is great to have an open source board and tool chain for FPGA development. We’ve talked about the open source Icestorm toolchain before and MyHDL, too.  If you prefer, most of the vendor FPGA tools are free to use for many common devices and uses. The Lattice tools should work just as well with this board, even if it does offend your open source sensibilities.

The video below introduces the CAT board, but be warned: it does contain actual cat pictures. It does not, however, contain any apologies to Dr. Seuss.

Filed under: FPGA, Raspberry Pi

from Hackaday » raspberry pi
via Hack a Day

Friday, 9 October 2015

Latest Raspberry Pi Images have Improved Scratch

Not everyone likes Scratch — the block-oriented programming language that MIT developed to help kids program. While dyed-in-the-wool programmers probably find it limiting, it can be an effective way to teach basic programming to newcomers and there are some people who enjoy the graphical style of programming.

The latest Raspbian release (the operating system image for Raspberry Pi) has a new and improved version of Scratch for those who want to use it on the Pi. According to the Raspberry Pi blog, the new version is up to ten times faster than previous versions and also includes an improved method for Scratch programs to access the board’s general purpose I/O and other I/O devices.

As an example of the new speed up, a Pac Man demo that could only manage one frame per second on a Raspberry Pi B, now clocks in at 12-15 frames per second and can exceed 30 fps on a Raspberry Pi 2. In addition to some additional I/O boards, the new Scratch can also access the camera, the board’s IP address, and the date and time.

Granted, Scratch isn’t for everyone and that’s ok. But if you do want to use Scratch (or teach with it) the extra speed and features will be a welcome addition. We’ve seen other versions of Scratch with enhanced I/O capability. There’s even been sensors built specifically for Scratch setups. Still, having support for the Raspberry Pi will be handy, especially in the classroom. If you don’t want to use a Pi, there’s always versions of Scratch for the Arduino, too.

Filed under: news, Raspberry Pi

from Hackaday » raspberry pi
via Hack a Day

Sunday, 4 October 2015

Raspberry Pi Sentry Turret Is The Enemy Of All Mankind

War, huh, what is it good for? Absolutely nothing, except as an excuse to build a Raspberry Pi powered sentry turret that will track and fire upon your enemies. That’s what [Matt Desmaris] decided to do, and he has released the full details of his build.

It lacks the polished elegance of most military hardware, but what do you expect of a quick and dirty hack? It’s not shiny or ominous, but it has that killer motion-tracking feature. [Matt] is using OpenCV to detect movement from a USB webcam, two servos to pan and tilt the camera and gun and a small relay to pull the trigger. Manual control over the Interwebs is also available.

We’ve seen lots of similar builds using weaponry such as rubber bands and Nerf guns, but this one is a great start if you are interested in seeing how you can tie together tools like OpenCV and servos to create a camera that actively tracks movement.

Filed under: Raspberry Pi, weapons hacks

from Hackaday » raspberry pi
via Hack a Day

Friday, 2 October 2015

A Third Scale Mini PowerMac

We’re surrounded by tiny ARM boards running Linux, and one of the most popular things to do with these tiny yet powerful computers is case modding. We’ve seen Raspberry Pis in Game Boys, old Ataris, and even in books. [Aaron] decided it was time to fit a tiny computer inside an officially licensed bit of miniature Apple hardware and came up with the Mini PowerMac. It’s a 1/3rd scale model of an all-in-one Mac from 1996, and [Aaron] made its new hardware fit like a glove.

Instead of an old Mac modified with an LCD, or even a tiny 3D printed model like Adafruit’s Mini Mac Pi, [Aaron] is using an accessory for American Girl dolls released in 1996. This third-scale model of an all-in-one PowerPC Mac is surprisingly advanced for something that would go in a doll house. When used by American Girl dolls, it has a 3.25″ monochrome LCD that simulates the MacOS responding to mouse clicks and keypresses. If you want to see the stock tiny Mac in action, here’s a video.

The American Girl Mini Macintosh is hollow, and there’s a lot of space in this lump of plastic. [Aaron] tried to fit a Raspberry Pi in the case. A Pi wouldn’t fit. An ODROID-W did, and with a little bit of soldering, [Aaron] had a computer far more powerful than an actual PowerMac 5200. Added to this is a 3.5″ automotive rearview display, carefully mounted to the 1/3rd size screen bezel of the mini Mac.

The rest of the build is exactly what you would expect – a DC/DC step down converter, a USB hub, and a pair of dongles for WiFi and a wireless keyboard. The software for the ODROID-W is fully compatible with the Raspberry Pi, and a quick install of the Basilisk II Macintosh emulator and an installation of Mac OS 7.5.3 completed the build.

Filed under: ARM, linux hacks, macs hacks

from Hackaday » raspberry pi
via Hack a Day

Thursday, 1 October 2015

Raspberry Pi 2 Game Boy Brings Sexy Back From 1989

When the ever-versatile Raspberry Pi was released, the potential for cheap video game emulation was immediately obvious. Some of the very first Raspi projects to hit the internet were arcade cabinets, and it wasn’t long until people were making them portable. A purpose-build Linux distort called RetroPie has become very popular specifically because of the Raspi’s game-emulation potential. However, the actual hardware for these emulation systems isn’t always the most aesthetically (or ergonomically) pleasing. That’s where reddit user [Cristov9000] has managed to stand out from the crowd.

[Cristov9000] accomplished this by combining high-quality design (and 3D printing) with the careful use of original Nintendo parts. Game Boy and SNES buttons and elastomers were used to achieve the correct button feel. Other original Game Boy parts, like the volume wheel and power switch, ensure that the system feels as much like 1989 OEM hardware as possible.

Also impressive is the internal hardware, including 3 custom PCBs used to tie everything together to work via the Raspberry Pi 2 GPIO pins. The display is a 3.5″ TFT screen, and with the 6000 mAh it can handle gameplay for more than 7 hours. Other details, like the integrated mono speaker and rear shoulder buttons complete the experience. Combined with the RetroPie and an assortment of emulators, this is one of the most impressive portable gaming builds we’ve seen, especially among a crowded list of awesome raspi-based Game Boy builds.

Filed under: handhelds hacks, nintendo gameboy hacks, Raspberry Pi

from Hackaday » raspberry pi
via Hack a Day



Donate Towards More Raspberry PI's for Projects