DonglePi is a device that gives you a Raspberry Pi P1 compatible connector for your PC.
The RPi P1 is a defacto standard connector on all models with pins for:
- GPIO
- I2C
- SPI
- Serial
- PWM
On the software side, it exposes APIs that are compatible with the ones you can use on the Raspberry Pi like GPIO and smbus under python.
With DonglePi:
- you can use your familiar PC or Mac to directly develop & debug your RPi embedded applications (with an IDE for example)
- you can use peripherals made for the Raspberry Pi ecosystem on your PC. You can find a list of those here.
DonglePi can also be used to easily setup students for an embedded development course in a preexisting computer lab.
The fidelity with the original hardware won't be 100% but it doesn't need to be to be useful.
It is a prototype working on a breadboard. The goal is to make a PCB like the one above.
On the software side:
- GPIOs are working.
- I2C is working.
- SPI is in progress.
- PWM needs to be done.
- Serial is currently used for debug but should be easy after all that :).
It can be plugged on any USB2 port.
You can build a prototype on a breadboard using an Atmel SAMD21 development board. I recommend this one. Be sure to take the one with the bootloader if you are not comfortable playing with an Arm/JTAG probe.
For the RPi connector, you can use a Pi cobbler kit from adafruit.
You can find here a little demo of it driving an i2c device.
Get the asf sdk It needs to be linked to the asf directory in the root of the project (by default it looks for the latest version in your home directory).
Sync the submodule:
git submodule update --init firmware/nanopb
Install google protobuf:
pip install -user protobuf
#(or under arch for example)
sudo pacman -S protobuf python2-protobuf
Install gcc for arm bare metal:
# (under arch)
sudo pacman -S arm-none-eabi-gcc
# Otherwise you can always get the binaries there:
https://launchpad.net/gcc-arm-embedded/+download
Install pyserial:
pip install pyserial
From firmware/:
make
It will produce a flash.bin file.
If you have the recommanded dev board, connect it on USB, press Reset + Button B. It will appear as a standard USB storage device. The red led from the board should slowly blink. Copy flash.bin to the root of it. Unmount the disk. Reset it, the led should switch to solid red = it has correctly initialized and wait for commands.
From python/:
make
This should generate some files from tht protobuf so the bindings could talk to the hardware.
Here you have a test.py showing how to use the bindings.
For the moment, I have dedicated the serial output to that, you can connect it for example to a real RPi at 115200 BPS and use minicom to see the debug logs.
Any contribution or contributor is welcomed ! If you want to contribute some code, feel free to open a pull request. If you have some experience developing PCBs, feel free to contribute to the Eagle project.
This is under CC-NY-NC 4.0 (see LICENSE.md).
If this license doesn't fit your need: feel free to contact me at gbin@gootz.net.