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).

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.

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.

Continue reading “Raspberry Pi Sense HAT Super Weather Dashboard”

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.

Continue reading “Raspberry Pi Powers The Desk Of The Future”

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.

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.

Continue reading “FPGAs For The Raspberry Pi”

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.

Continue reading “Code Craft: When #define Is Considered Harmful”