PICAXE PRIMER
■ BY RON HACKETT
www.jrhackett.net
Have A Piece Of PICAXE Pi
Judging from the email
response to my parting
question last time, there's
a fair amount of interest in
exploring the possibilities
of interfacing PICAXE
processors with the
Raspberry Pi (RPi), so this
month that's exactly what
we're going to do! It
would probably take a
couple dozen Primer
articles to thoroughly
discuss the various
aspects of working with
the RPi, but fortunately,
there's a wealth of
information available
online, so there's no need
for us to get into all those
details here. Rather, I'll
just suggest an online
resource that I found to be
especially helpful when I
first started experimenting
with the RPi, so you can
begin your Pi explorations
right away. (Of course,
you may already have
done that!)
Naturally, our first Pi-related project will be to construct a
simple stripboard circuit that will
allow us to easily access several of
the Pi’s 17 GPIO pins. If you have
already begun investigating the Pi on
your own, you know that the GPIO
pins are all 3.3V level digital pins. You
have probably also read something
about “level-shifting” and why it’s
14 August 2013
needed in order to safely interface
the Pi with any 5V devices, including
other microprocessors. However, we
won’t get involved with that
particular complication.
In keeping with the Raspberry Pi
(and PICAXE) philosophy that
“simple” is preferable to
“complicated,” we’re just going to
run both systems (Pi and PICAXE) at
3.3V. As you may remember, all M2-
class PICAXE processors can operate
with a supply voltage as low as 1.8V,
so 3.3V will work well for our
purposes.
Of course, we’re going to need a
language to program the Pi side of
things. When we get to that point (in
the next installment of the Primer), I’ll
explain why we’ll be using the
Python programming language, and
give some suggestions for getting
started with Python, as well.
Before we begin this month, I
want to thank the readers who took
the time to respond to my question —
I really do appreciate the feedback.
In fact, I didn’t get a single “no” vote.
That doesn’t mean, however, that
there aren’t some readers out there
who have no interest in exploring the
Pi. If you include yourself in that
group, don’t despair. Some of the
material that we’ll be covering will
also be applicable to non-Pi related
PICAXE projects — especially the
discussion of Python programming.
Why PICAXE Pi?
Here’s the very first question we
need to address: “If the Raspberry Pi
is such a powerful little computer,
why do we need to interface it with a
PICAXE processor in the first place?”
The answer is simple: PICAXE
processors have several hardware
capabilities that are either missing
entirely on the Pi, or are much more
difficult to implement.
• Graphical User Interface:
Create an onscreen interactive GUI
for any PICAXE project, including
buttons, dialog boxes, menus, scroll-bars, etc.
• File Manipulation And
Storage: Store and retrieve huge
amounts of data for a data-collection
system.
• Text To Speech: Produce high
quality speech from any text file;
verbally report real time data values
to the user.
• Network Accessibility: The
interactive GUI can be accessible