Code Monkey home page Code Monkey logo

arduino-remote-uploader's Introduction

arduino-remote-uploader

The goal of this project is provide over-the-air (OTA) upload of Arduino sketches to a remote Arduino. There is support for XBee (Series 1 and 2), Wifi (ESP8266), and Nordic nRF24L01+. This is accomplished by programming one Arduino with another. The circuit is conceptually very simple:

xbee prototype

One Arduino receives firmware packets from a wireless device (XBee in this case) and writes to EEPROM. Then, once it receives the entire sketch it flashes the firmware on the other Arduino. There are other tricks for remote firmware programming but nearly all involve unfortunate tradeoffs. This solution is fault tolerant, in that it checksums every firmware page (packet), acks and retries dropped packets and only flashes when a complete firmware image has been written to EEPROM. You can unplug the remote during programming, then plug back in and it will resume and flash successfully.

It's also quite cost-effective: the Microchip EEPROM costs $1. Arduino Pros can be found online for about $3 each. Nordic radios can be found for about $1 online.

Here's a prototype I built to control my garage door. A Modern Device RBBB performs the programming while the app runs on a Arduino Pro. I'm using an Arduino XBee shield just for the XBee socket and 3.3V conversion.

The client is a simple command-line app:

Here's a screenshare of an upload in action.

Version 0.1 is in Maven Central

I've written about the project in detail on Medium https://medium.com/@nowir3s/arduino-remote-uploader-aa61e4d620b1

Demo

vine

The remote Arduino starts with a sketch that blinks fast. Then, I change the sketch to blink slow, compile and flash the sketch on the remote Arduino, via XBee. The command completes and indicates that the flash was successful. And lastly we see the Arduino is running the new sketch and blinking slowly. So there it is: over-the-air Arduino programming via XBee in six seconds!

vine

Here's the same thing but over wifi with a esp8266 and 3.3V Arduino Pros at 8Mhz.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.