Simple Touch Controller Frees Up USB Port

touch screen demonstration using text

[typ.o] was working on a Raspberry Pi project and found himself running short on USB ports. The project required a touch screen interface, which takes up one of the ports. Since he was only using the screen in text mode, he decided to ditch the original USB controller and make his own.

The ever popular Attiny85 is deployed to handle the task, and is interfaced between the resistive touch panel and the Raspberry pi, using only three pins from the GPIO port. The Attiny85 runs off the 3 volt supply from the raspi, so no level shifter is needed, helping to keep his board super simple.

The calibration and calculation of the touched character location is done by a Python script running on the raspi. [typ.o] is a fan of the KISS principle, and it shows. Be sure to check out his site for all source code, schematics and a video demonstrating this simple but effective solution.

Programming Pi Games With Bare Metal Assembly

pifoxWhile the most common use for a Raspberry Pi is probably a media center PC or retro game emulator, the Pi was designed as an educational computer meant to be an easy-to-use system in the hands of millions of students. Team 28 at Imperial College London certainly living up to the Raspberry Pi Foundation’s expectations with their bare metal assembly clone of Star Fox, aptly titled PiFox.

This isn’t the first time a college course has taken up the task of developing software for the Pi without an operating system; a few years ago, Cambridge University started that off with a series of bare metal tutorials for the Pi that included drawing graphics on the screen and playing around with USB keyboards. PiFox greatly expands on what those early tutorials could do, reading an NES joystick from the GPIO pins, sound with DMA, and rendering 3D objects.

If you’d like to build PiFox for yourself, or better yet, expand on the existing build, all the code is up on Github. There’s also a Raspberry Pi emulator for Linux, just in case you have an ARM assembly bug you just can’t scratch with a Raspberry Pi.

Continue reading “Programming Pi Games With Bare Metal Assembly”

Raspberry Pi Bluetooth Receiver For Your Car Stereo

RasPi Car Audio

The ability to play music in your car over a Bluetooth connection is very handy. You can typically just leave your phone’s Bluetooth module turned on and it will automatically pair to your car. Then all you have to do is load up a music player app and press play. You don’t have to worry about physically tethering your phone to the car every time you get in and out of the vehicle. Unfortunately Bluetooth is not a standard option in many cars, and it can be expensive to buy an aftermarket adapter.

[parkerlreed] built his own solution to this problem using a Raspberry Pi. He first installed arch Linux on his Pi. He also had to install pulseaudio and bluez, which is trivial if you use a package manager. He then modified some of the Linux configuration files to automatically bring the Pi’s Bluetooth adapter online once it is initialized by the kernel.

At the end of the boot sequence, the Pi is configured to automatically log in to a virtual console as [parkerlreed’s] user. The user’s bashrc file is then altered to start pulseaudio in daemon mode at the end of the login sequence. This allows the Pi to actually play the audio via the Pi’s sound card. The Pi’s stereo output jack is then plugged into the vehicle’s auxiliary input jack using a standard audio cable.

The Reddit post has all of the configuration details you would need to duplicate this setup. [parkerlreed] also includes some commands you will need to setup the initial pairing of the Raspberry Pi to your smart phone. Be sure to watch the video demonstration below. Continue reading “Raspberry Pi Bluetooth Receiver For Your Car Stereo”

Roll With Dicebot, The Tweeting Dice Roller

dicebot

[David] modernized a 1920’s dice rolling game to bring us DiceBot, a twitter enabled dice rolling robot. DiceBot started with an antique dice tin. The original tin was human controlled. Pushing a button on the side of the tin would spin the bottom, rolling the dice.

It’s a bit hard to push a button from across the world, so [David] added a small motor to spin the tin. He connected the motor to a simple L298 motor driver chip, and wired that up to a Raspberry Pi. The Pi runs a few custom Ruby scripts which get it on the internet and connect to the Twitter API.

Operation is pretty straightforward. A tweet to @IntrideaDiceBot with the hashtag #RollTheDice will cause the Dicebot to spin up the dice. Once things have settled, DiceBot captures an image with its Raspberry Pi camera. The dice values are checked using OpenCV. The results are then tweeted back, and displayed on DiceBot’s results page.

Continue reading “Roll With Dicebot, The Tweeting Dice Roller”

PiGates Validates Your Concert Tickets

gatespi

[Seph] works for a company that handles ticketing for concerts and special events. One of his primary tasks is to check for counterfeit tickets at the gates of an event. Depending on the venue, this can be mag-stripes, bar codes, or one of several breeds of RFID. Until recently, netbooks coupled with USB readers performed the task. The netbooks weren’t a great solution though – they were expensive, relatively fragile, and took up more space than necessary.

[Seph] had a better idea. He created a ticket validation system using a Raspberry Pi. The Pi sits in a translucent case with a PiGlow RGB LED board. A USB reader (in this case a bar code reader) plugs into one of the Pi’s USB ports. These readers can operate in several modes, including keyboard emulation, which [Seph] chose because it wouldn’t require any driver work.

Using PiGates is so simple even a drummer could handle it. Normally the Pi glows blue. When a ticket is scanned, [Seph’s] python script reads the code and verifies it against an online database.If the ticket is valid, the Pi will glow green. A counterfeit ticket is indicated by flashing red LEDs.

Click past the break for more on PiGates.

Continue reading “PiGates Validates Your Concert Tickets”

RasPi FM Transmitter

Easily Turn Your Raspberry Pi Into An FM Transmitter

Have you ever wanted to be your own radio DJ? [Kevin] has made it easier than ever with his Raspberry Pi FM Transmitter program. The program is written in C. [Kevin] has made source code is available along with a compiled binary.

PIFM allows you to load up any audio file and specify a frequency to transmit. The program will then use PWM to modulate the audio sample through the Pi’s GPIO4 pin. [Kevin] claims that the RasPi alone will only transmit around a 10 cm distance. He says that making a simple antenna out of a jumper wire can increase the distance to around 100 meters. All you have to do is hook up the wire to the GPIO4 pin to drastically increase the range.

The legality of such a transmitter will vary from place to place, so be sure to check out your local regulations before you go transmitting audio on regulated frequencies. If this kind of thing is interesting to you, you may want to investigate ham radio. It’s not all Morse code and old fogies. Some people claim it’s a hacker’s paradise.

[via Reddit]

A Tweeting Litter Box

SmartLitterBox

How can you not be interested in a project that uses load cells, Bluetooth, a Raspberry Pi, and Twitter. Even for those of our readers without a cat, [Scott’s] tweeting litter box is worth the read.

Each aspect of this project can be re-purposed for almost any application. The inexpensive load cells, which available from eBay and other retailers, is used to sense when a cat is inside the litter box. Typically sensors like the load cell (that contain a strain gauge) this use a Wheatstone bridge, which is very important for maximizing the sensitivity of resistive sensor. The output then goes to a HX711, which is an ADC specifically built for load cells. A simple alternative would be using an instrumentation amplifier and the built-in ADC of the Arduino. Now, the magic happens. The weight reading is transmitted via an HC-06 Bluetooth module to a Raspberry Pi. Using a simple Perl script, the excreted weight, duration, and the cat’s resulting body weight is then tweeted!

Very nice work! This is a well thought out project that we could see being expanded to recognize the difference between multiple cats (or any other animal that goes inside).