[Dprglist] Raspberry Pi Master to Arduino Slave (pimaster2ardslave)
Murray Altheim
murray18 at altheim.com
Wed May 6 21:30:51 PDT 2020
Hello all,
As discussed in the last Robot Builders Night Virtual, I've been working on
a project to communicate between a Raspberry Pi as master (in Python) and an
Arduino slave. This uses a two byte call and response pattern over I2C so
its performance seems pretty good (and it's relatively simple).
This is my first attempt at a private github project so please bear with it
being a bit rough around the edges:
https://github.com/ifurusato/pimaster2ardslave
Comments, suggestions, etc. welcome. The project is functional in that I've
got communications between the Pi and Arduino working, just finishing up the
"API" between them and writing a few tests. I'll update the 'Status' section
of the README once it's ready to go. So this is currently a "technology preview".
----
I thought to post this now since while I know David isn't using Raspberry Pis,
the means to communicate master-slave using simple 2-byte messages might be
transferable to what he's doing. I've used a Teensy in my modular synthesizer:
https://www.modulargrid.net/e/racks/view/983608
but don't have one handy unless I disassemble the module, but I have been able
to test pimaster2ardslave on both an Arduino Micro and an Adafruit Metro Mini.
I'm myself moving *slightly* in David's direction by purchasing an Arduino Yún,
which is a combination of an ATmega32U4 microprocessor with an Atheros AR9331,
the latter running a version of Linux called Linino OS. It has Ethernet and WiFi
built in. So it'll be either the best or the worst of both worlds. I'm curious.
Cheers,
Murray
On 7/05/20 3:46 pm, David Anderson via DPRGlist wrote:
> Hello DPRG,
>
> As discussed in Tueday's RBNO, I'm trying to port my jBot code to the
> STM32F411RE and have run out of UARTS. I need 5 and the board only
> supports 3 in hardware (USART1, USART2, USART6). So I was looking at
> adding another CPU, a teensy, and using SPI or I2C for comm between the
> two boards.
> [...]
>
> dpa
...........................................................................
Murray Altheim <murray18 at altheim dot com> = = ===
http://www.altheim.com/murray/ === ===
= = ===
In the evening
The rice leaves in the garden
Rustle in the autumn wind
That blows through my reed hut.
-- Minamoto no Tsunenobu
More information about the DPRGlist
mailing list