Saturday, May 31, 2014

58: Hardware Hacker or Software Hacker?

I suspect that the Raspberry Pi crowd is mostly hardware savvy (and software naive). I could be wrong, of course. If you've followed this blog you know that I am just the opposite. The reason I bring this up is to recommend some software tricks that could make the things easier for Linux software beginners.

If you have the time you should start by Googling "linux quick reference" (or similar). The trouble with that approach is that you'll get a few thousand hits. So I'll make my own short list of topics you might check out:

Learn about--

-- the man command (on-line manual pages -- generally cryptic, but you can google more info)
-- directories (keep your "home directory" clean)
-- file permissions (chmod command)
-- the .profile file (add your own commands in your "~/bin" directory")
-- a test: what does the "~" character mean?
-- harder test: why won't the shell automatically execute a command in the current directory?
57: Rangefinder Devices, Distance Measuring, etc.

Well, I've tried 2 ultrasound devices (1 cheap, 1 expensive (returned)), an IR device and I have played with do-it-yourself using the Pi camera and a laser pointer. I apparently have unreasonable/unrealistic expectations for these sensors.

I want to make a sort of "electronic cane" (size of a D-cell flashlight, no stick) for the visually impaired -- something held in the user's hand that's angled downward at a point 10' or less ahead. I want the rangefinder to be able to be read several times a second and (most importantly) detect walking surface irregularities of 2" or less at 10'.

Since the current Pi package is too big to wrap your fingers around (something more compact coming?) I'm using an Arduino Micro (which happens to be good with analog outputs, too).

The rest of the gear:

  • the afore-mentioned rangefinder
  • an accelerometer to read angle
  • some sort of output to the user (currently 2 vibrating devices)
  • on/off switch and battery

Back to distance measuring:

  • Ultrasonic: basically, way too wide an angle of reception (but fast enough on the Arduino)
  • IR: problem with the angle to the surface, especially a reflective surface (i.e., water puddle)
  • Camera/laser pointer: (Google "Pi camera as rangefinder") Attractive on the Pi since I'd have control of the software BUT lots of problems:  1) no camera for Arduino (and it's not fast enough and not enough memory),  2) sunlight blots out return from a "class 1 laser" (one not dangerous to eyes) and  3) same reflection problems as IR.   

Maybe my project is doomed.

Wednesday, May 28, 2014

56: A Raspberry Pi-Controlled Video Wall

When I first noticed the Pi's HDMI connector I thought of using the system as a way to create a cheaper video wall. (Back in the 80s I worked on a 75-screen wall that cost millions.) Anyway, you can now buy a 40" 1080 TV for $300. Add one Pi for each TV and an extra Pi to control everything plus an ethernet switch. So you could have a 9-screen system of under $4000. And in the spirit of the Pi, someone has has done software and they are giving it away (for now?). See--

Sunday, May 4, 2014

55: My Portable Raspberry Pi

For demo purposes I've built a portable system. It lives in a 6" x 9" (cheap) Lexan box that's perforated with a bunch of holes for ventilation.

Not shown above:
1. An iPhone as an Internet hotspot
2. An iPad for SSH control

Also not shown: the wiring mess inside the box.

What the system can do:
1. It operates all of devices shown and can display results back on the iPad, on the 7-segment display or it can utter the output to the speaker (via text-to-voice).
2. It can take a still with the Pi camera and upload it to the Internet.

If I demo near a big TV I can mirror the iPad screen on it using my Apple TV.

The battery was meant for recharging a smart phone. It can run the Pi for most of a day. Irritatingly, it cannot charge and discharge at the same time. And with a 1 amp charger plug it takes most of a day to recharge.

Another important reason for the speaker: when connecting via the iPhone hotspot I'm not sure what the IP number will be (and it can't be "static" both at home and on the road) so, as the Pi boots up it speaks the current IP number which I then use in making the SSH connection. Messy, huh.
I need to get a speaker that fits inside the box