[Melbourne-pm] Beagle Bone Speed, PDL.

Scott Penrose scottp at dd.com.au
Wed Jun 13 04:16:18 PDT 2012

Tonight I said that programming via userland SPI was slower.
Toby rightly pointed out that it is faster on a beagle bone because the cpu is so fast.

Just to clarify, I meant compared to bare metal, I think I said compared to Arduino :-) Sorry Toby.

We have talked about combining our modules. Most of the code that I have is already covered in Toby's code. And we did a quick chat before we left, and worked out we can wrap the Arduino Compatible interface around Toby code, and therefore still provide both.

My main motivation is to try and promote perl in ARM embedded systems. No need to compete with Python and NodeJS but it would be good to be at least visible.

In scientific circles people mostly use MatLab, but most of the younger programmers also use Python, specifically PyPy and Nympy - and have never heard of PDL. I know that some of it is because it is always more fun to program something new, bugs to fix, you can actually contribute, instead of using standard. But I think part of it is lack of exposure. How to fix, no idea :-)

Many questions tonight were about where to start as a beginner. My questions would mainly be dependent on project. Beagle Bone is harder to connect electrically (lower tolerances, like 3.3 on Digital IO and 1.8 on Analogue IO). Hardware libraries to connect to just about anything are abundant in Arduino, but can sometimes be harder to write if you are writing a new one. If you want to do something simple, you can write a few lines of code on the Arduino, it will run forever, and hardly use any power. To get started with a Raspbery PI even creating the SD card can take longer. But then you have to maintain it. It is still a linux system with a disk. You can still get corruption etc. My house used to run on a linux box, but now runs off one Arduino. Number of lines, reliability of code and hardware is awesome.

Now contrast that with some more complicated projects. Lets say you needed a Web interface, wanted to get sound input from a microphone, did some high end maths (FFT), connected to a laser and an LCD. That is possible on the bare metal AVR, but it will be harder to get right, especially the web server.

If you wanted to build a web server though that did something simple, like just returned the power output from a device, or the state of some pins - then the code would probably be comparable but the AVR will never need to be rebooted and will still be working when it is turned on in 10 years time.

Now imagine building a Wireless access point with an AVR. Yuck. You can then cope with occasional restarts (rare yes, but does happen).

Now build something production, like a smart metre, would you use linux now - maybe? Probably not, bare metal ARM or AVR or similar would be better.

So you see, it all depends what you are building, rather than beginner level. 

Beagle Bone, for beginner also requires linux knowledge.

Either way, you only need a USB cable and your laptop running linux, windows or mac os x - they are all just as easy as each other.

BTW. You can work bare metal on the BeagleBone too - and you can start with a large set of libraries that already have been written for all the peripherals attached released by TI - now that is hard to use, and I will probably not even use it for my project I talked about.

Options options...

Another Arduino benefit is price. You can buy a unit for as little as $16. That argument goes away when you add more peripherals, e.g. add Ethernet and multiple pins, and you now are in the Arduino Mega space, which is about the same price as a Beagle Bone.

And in comes Raspberry Pi at $25 or $35 with ethernet. Game changer. Probably, especially for anything with a screen.

I would not recommend to anyone starting with a Beagle Bone. Buy yourself a cheap Arduino and start with that. When you project needs more, or you have more time, then move to the Beagle Bone. The exception to this is if you need mostly a computer, and only a little bit hardware (project like Toby which is mostly Maths, USB Microphones, SSH etc).

BTW. I completely forgot to bring another project - my kids keyboard. This is a USB keyboard connected to our media centre. It uses a arcade style old joystick and big arcade buttons. The buttons are programmed to be things like Media Volume, as well as hot keys to run things like Boxee/XBMC/Plex. They run on a little board called a Teensy 2.0. These are $12 or $16 (can't remember) online and ar Arduino compatible board , tiny, but in code emulate a USB Mass storage, Keyboard, Serial port, Joystick and MIDI. You can build your own Joystick with it using just some form of variable resistors. I also built a MIDI drum machine, using Piezo speakers as the inputs. And to program it, USB cable :-)


More information about the Melbourne-pm mailing list