Skip to main content

python wrapper for simavr which is AVR and arduino simulator.

Project description

pysimavr is a python wrapper for simavr which is AVR and arduino simulator

Links:
Features:
  • python wrapper using swig

  • simavr source code is included for easier installation

  • object oriented interface on top of the generated interface

  • maximum speed can be real-time

  • serial communication

  • check simavr documentation

Known problems:
  • included simavr source code is not up to date

  • Python 3 is not supported

  • tested only on linux

  • more tests needed

  • PWM simulation is not real-time

  • missing PWM modes

  • a lot of messages on stdout

  • LCD simulator is not fully implemented

Possible usage:
  • unit test

  • simulator

Similar projects:

Basic usage

>>> from pysimavr.avr import Avr
>>> avr=Avr(mcu='atmega48',f_cpu=8000000)
>>> firmware = Firmware('lcd.elf')
>>> avr.load_firmware(firmware)
>>> from pysimavr.sim import ArduinoSim
>>> print ArduinoSim(snippet='Serial.print("hello!");').get_serial()
hello!

Installation

check simavr doc: http://gitorious.org/simavr/pages/GetStarted

ignore these in simavr doc:
  • OpenGl (freeglut)

  • gcc-avr

  • avr-libc

  • make

General

  • install python

  • install setuptools

  • install swig (for source build only)

  • install header files and a static library for Python (for source build only)

  • install a compiler (for source build only)

  • install elf library

  • install the program:

    # as root
    easy_install pysimavr

Ubuntu

sudo apt-get install python-setuptools
sudo apt-get install swig
sudo apt-get install python-dev
sudo apt-get install gcc
sudo apt-get install libelf-dev
sudo easy_install pysimavr

Uninstall

first install pip:

# as root
pip uninstall pysimavr

Project details


Download files

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

Source Distribution

pysimavr-0.0.4.tar.gz (191.9 kB view hashes)

Uploaded Source

Built Distribution

pysimavr-0.0.4-py2.6-linux-i686.egg (1.1 MB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page