About Mark Shead

Mark Shead

Mark Shead

Find more about me on:

Here are my most recent posts

Arduberry for Rasberry Pi

Arduberry

 

The Arduberry is an Arduino that sits on top of a Raspberry Pi. It connects to the GPIO pins. You can’t see it in the photo, but there is a MEGA328P chip mounted on the bottom of the board. Functionally it works the same as what would happen if you were to hook an Arduino Uno to a Raspberry Pi using a USB connection. By running software like Firmata on the Arduberry and appropriate libraries on the Raspberry Pi, you can send information between the Arduberry and Raspberry Pi.

So why would you want something like this? There are many shields and sensor libraries available for the Arduino family. Also the Arduino provides analog, digital, and PWM pins while the Pi only has digital pins and a single PWM pin. On the other hand, the Pi has significantly more processing power, audio input and outputs, and allows you to use programming languages that aren’t available for the Arduino. For example you could run Scratch, Java, Python, or Racket on the Pi and use it to control the Arduino.

By default the Arduberry is powered by the Raspberry Pi and since it sits on top of the Pi, it has a nice small form factor. The downside is that if you want to use the Pi to upload programs to the Arduberry, you have to be aware that it uses pins 11 and 13 to accomplish this. So if you have anything plugged into pins 11 or 13, when you try to send a new program to the Arduberry, you’ll get an error like this:

avrdude: The AVR device is not responding
avrdude: initialization failed rc=-1
Double check connections and try again, or use -F to override this check.

So for example if you try to use something like an Arduino Motor Shield that uses pin 13, you’ll have to remove it to upload a different program to the Arduberry. If you have an LED plugged into pin 13, you’ll have the same issue until you remove it.

So the Arduberry can be a good choice when the Arduino code is going to remain fairly static or you don’t need to use pins 11 and 13. If you are needing to make a lot of changes to the Arduino code and have a shield that uses pins 11 and 13, you may be better off with a normal Arduino connected with a USB cable.

DrRacket on Raspberry Pi 2

20150222_162410

The Raspberry Pi has normally been too slow to run DrRacket. The new Raspberry Pi 2 is quite a bit faster, but if install racket from the default repositories, you’ll probably find that you can run racket, but DrRacket fails with a message like:

Seg fault (internal error) at 0xb0f5b0
SIGSEGV SEGV_ACCERR SI_CODE 2 fault on 0xb0f5b0
Aborted

My guess is that this as something to do with the switch to ARM7 from ARM6. If you try to build Racket from the source, you may get an error like this:

Makefile:155 recipe for target ‘install-3m’ failed
make[1]: *** [install-3m] Error 137
make[1]: Leaving directory ‘/home/pi/Downloads/racket-6.1.1/src'
Makefile:86: recipe for target ‘install’ failed
make: *** [install] Error 2

Best I can tell this is an out of memory error. You can probably get it to work by rebooting and making sure there are no other programs running while you do the build. Also you can start the machine without launching X windows to leave more memory available.

Multi-tasking Communication Failure

I was on a video conference and chat room today. Someone on the video conference asked what to do about some issue with management. At few minutes before someone had typed into the chat window asking how to delete tasks. I responded with, “You have to kill them.”

My chat popped up on everyone’s screen right after the management question. The person talking on video conference said, “Well, Mark, I suppose that is one option.”