Recently, I started learning OpenERP: what better occasion to develop a module to control an Arduino UNO Board? I’ve already blogged about PyFirmata (see:, which is a python library to control an Arduino board flashed with Firmata firmware, this nice library integrates perfectly with OpenERP and let you read/write analog and digital values from an USB-connected board. PWM and SERVO control are also supported natively by PyFirmata and hence by the module I’ve developed, the only thing I’ve not yet implemented is digitalWrite on the analog pins even if this would be pretty easy to do with proper checks in the code. The module only  depends on pyfirmata (and pyserial) and it’s not yet final (but if you feel brave you can download a development snapshot here: arduinocontroller-2012-05-31-00:05:52).

Github repo

You can find the latest development version on my github repository   This short (and quite laggy) screencast shows the module running:

8 Responses to “Controlling Arduino from OpenERP”

  • colin

    Hello Alessandro,

    Looks like a nice implementation. Thanks for sharing this.

    I’ve started installing your module but don’t see how to import the PyFrimata into OpenERP.

    Have you also managed to get the Arduino to control OpenERP. for example, to read serial data from the Arduino RS232 pins and use this data to open a view and update specific fields in an Open ERP database?

    I’ve trying to test external devices connected to the Arduino (e.g. barcode scanner, weighing machine) and need to specify which module and database field to update.

    Any further info would be appreciated.


  • Alessandro Pasotti


    Hi, thanks for the feedback! If pyfirmata is not installed a nice pop-up will tell you how to install, the message is:

    Pyfirmata is not installed, arduino operations are disabled. You can install pyfirmata from hg clone ssh://

    The module successfully reads analog and digital data from Arduino pins, so it’s possible to use this values to update fields on other models but this should be coded on a case by case basis.

  • CB

    Hello Alessandro,

    Thank you for sharing the results of your project. It looks really interesting. I’ve also used Arduino Uno / firmdata for other serial interface projects and (like the other Colin) I am now also exploring using the Arduino as a possible ‘external device’ interface to OpenERP (e.g for use with weighing scales, barcode scanner, Reading Production machine status, etc). Do you have any detailed technical design documentation of the OpenERP/Arduino interface and any details of the Arduino sketch?

    Any further info would be appreciated.



  • Jonny Mendoza

    Hello Alessandro, im writing from Latin America. Thank you for sharing this, really got my attention!.

    I work with arduino making apps but with cosm and processing. I really want to do it with the software that you use for this tutorial, i don’t know what ERP is, i was thinking that you should use just for enterprise resource planning (just for enterprise use). Do you have any ebook name or information that you could share with me to build some apps so fun as yours with this tool? I really appreciate that…


  • Rene Oudeman

    Hi Alessandro,

    for a project in a factory i’d like to implement all the machines in the openerp. I want them to write updates on production and such, to automate stock moves etc.

    do you have some experience with that? seems it should be possible with someting like you wrote for the arduino..