This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Upload code to Arduino Due from Python.

Project Description

piupdue

Python package that enables a compiled Ardunio Sketch to be uploaded to an Arduino Due from a RaspberryPI (connected by USB).

Based on the Arduino BOSSA C++ source code.

Install using: $ pip install pyupdue

Sketch file must be saved locally on PI and be of type “.cpp.bin”.

Run from cmd line

usage: piupdue.py [-h] -f SKETCHFILE [-p PORT] [-l LOGFILE]

optional arguments: -h, –help show this help message and exit -f SKETCHFILE, –file SKETCHFILE Sketch file to upload. Including path. (/path/File.cpp.bin) -p PORT, –port PORT Port Due is connected on. Leave blank for auto selection. -l LOGFILE, –log LOGFILE Save output to log file. # Use in Python Program

Use the Upload function found in piupdue.py, Ex:

import piupdue

piupdue.Upload(‘/usr/update/FastSketch.cpp.bin’, ‘/dev/ttyACM1’, ‘/var/log/piupdue.log’)

Some background

The Arduino Due is a microcontroller board based on the Atmel SAM3X8E ARM Cortex-M3 CPU. It is the first Arduino board based on a 32-bit ARM core microcontroller instead of the more common AVR. The different mcu means the performance is better but also means the booting process is different from the AVR, Ardunio has designed the board such that flashing firmware is easier than what the stock SAM3X has offered, this link explains the booting process and the tricks that Arduiro implemented.

The “avrdude” program is used to upload code to the AVR based Arduinos and there are quite a few examples of how to do this from the RaspberryPI. BOSSAC is used by Arduino to upload code to the ARM, it’s the command line variation of BOSSA which is a simple and open source flash programming utility for Atmel’s SAM family of flash-based ARM microcontrollers designed to replace Atmel’s SAM-BA software.

I required the ability to upload new code from a RaspberryPI to a Due. I couldn’t find any info on getting BOSSAC to run on the PI so I have written this package in Python to replicate the fucntionality.

Release History

Release History

This version
History Node

1.0.1

History Node

1.0.0

History Node

0.2.0

History Node

0.1.0

History Node

0.1

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
piupdue-1.0.1.tar.gz (12.2 kB) Copy SHA256 Checksum SHA256 Source Apr 15, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting