Exploring the Pixy sensor with Mathematica

Operations and Limitations

Numerous things can affect how the Pixy captures objects, such as lighting, hues, shadows, and so on. Certainly the single most important factor is lighting.

I've found that using bold primary and secondary colors for the object with strong, soft lighting gives the best results. Low light and shadows make it difficult for the Pixy to discern objects and will result in a lot of noise and false recognition.

Another program, named PixyMon [7], is helpful to see exactly what the Pixy sensor is recognizing. Sadly, my particular Raspberry Pi Model B+ would only run the program for 20-30 seconds before the desktop would freeze up and I'd have to reboot. Perhaps it was inadequate power, or maybe the interaction of the wireless USB keyboard/mousepad and the Pixy threw things off. I will have to poke around a bit to figure out the problem, but that's the nature of prototyping. Interfacing hardware with software, applications, and networking gets complicated. Getting things to work the way you want is frequently challenging and time consuming.

If you want to just gain more experience, you can always download and install the Pixy programs on your Linux or Windows notebook and use hello_pixy and PixyMon on those platforms.

Going Further

The Pixy is a pretty slick piece of equipment. I've noticed that the web doesn't have very many practical applications yet. The Pixy team at Charmed Labs say they'll be releasing a firmware update that includes face recognition sometime in the not too distant future. Be on the lookout for that.

Mathematica is a very capable analysis and graphing package that's baked into the Raspbian operating system. It has about a billion functions – well, 5,000 anyway – and runs great on the Pi. Take advantage of it.

Also, don't let the command line on the Raspberry Pi scare you. Why write a Python or C program when you can use built-in shell commands like awk, tail, vi, and redirection (| < >) strung together to process text? It's fast and lends itself to all kinds of automation jobs.

I've already started piecing together a Pixy/Steampunk eye. I plan to put the Pixy inside an 18-inch-tall Steampunk eyeball and use servos to track myself in a brightly colored shirt as I move around the stage during one of my conference speaking sessions. That's the plan anyway. I'll be prototyping it soon, so a full rundown should appear in an upcoming edition of Raspberry Pi Geek.

The Author

Rob "drtorq" Reilly is an independent writer, speaker, and consultant specializing in Linux/Free Software, the tech media, and the Internet of Things (IoT). He regularly hacks out prototypes and likes building Steampunk-themed projects. Visit his page at http://drtorq.com or contact him at doc@drtorq.com.

Buy this article as PDF

Express-Checkout as PDF

Pages: 6

Price $2.95
(incl. VAT)

Buy Raspberry Pi Geek

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Smells Like Maker Spirit

    The maker movement just keeps getting stronger, and open hardware and software are right in the middle, combining electronics, code, construction kits, and bits and pieces of whatever's in the spare parts bin to create something new or remake something old.

  • Mathematica and the Wolfram language on Raspberry Pi

    Wolfram Mathematica and the powerful Wolfram language are now available for the Raspberry Pi. We'll help you get started with this fascinating tool for calculation, presentation, visualization, and general programming.

  • The Pi Wire

    Things move quickly in the Raspberry Pi ecosystem. This regular column rounds up the best Raspberry Pi and open hardware news to keep you up to date on the latest projects, products, and events.

  • Monitoring auto sensor data with the Raspberry Pi

    Every year, teams of students from universities around the world compete in the Formula Student auto racing competition. One team used a Raspberry Pi to monitor sensor data on the vehicle and send the results to the pit crew through a wireless connection. We'll show you how they did it.

  • Math, Music, and Cat Toys

    Welcome to Raspberry Pi Geek – the first and only print magazine dedicated to the amazing Raspberry Pi mini-PC and the open hardware revolution. We ring in the new and old in this issue. (Actually, nothing is really very old with the Raspberry Pi, but we follow up on some previous themes, including a report on how it went for the wind-turbine-powered Raspberry Pi we described last time.)