GithubHelp home page GithubHelp logo

gpiosim's Introduction

GPIOSim

Raspberry Pi GPIO simulator

http://bobvann.noip.me

**** What it does **** That's actually a Raspberry Pi GPIO simulator for Linux/OS X (currently, Windows support coming soon)

With this simulator you can write and debug applications designed to be installed in the Raspberry Pi, interacting with the RPi.GPIO module for the GPIO header.

**** How does it work **** The application has two parts:

GPIOSim.py : the GUI RPi/GPIO.py : the module

the module is designed to replace the real RPi.GPIO module in a GPIO-less machine (e.g. your PC).

Once you correctly install it your application will see no difference between the real GPIO module and mine.

Instead of writing to the GPIO header, it writes to a file saved in /tmp (will be c:\Temp on Windows).

The GUI just reads from the file and displays the info like a GPIO header. Output set pins are read-only, while it is possible to toggle the state of input pins just clicking on them.

It also offer the possibility to simulate the reboot of the RPi, which sets pins back to default. Please note that rebooting the real PC will result in a simulated RPi reboot.

The GUI updates only when it gets a process signal from the module (here's why it doesn't support Win yet).

***** Notes *****

At the moment the simulated module provides only the following methods:

  • GPIO.setup(pin, mode, pull_up_down=PUD_OFF)

  • GPIO.output(pin, value)

  • GPIO.input(pin)

  • GPIO.set_high(pin)

  • GPIO.set_low(pin)

  • GPIO.is_high(pin)

  • GPIO.is_low(pin)

  • GPIO.output_pins(pins)

  • GPIO.setup_pins(pins)

  • GPIO.input_pins(pins)

I have not implemented the remaining methods (interrupts, event callbacks, etc) but I will soon.

**** Installation ****

  • copy the RPi folder inside your python3.x modules folder (e.g. /usr/lib/python3.x/ )

  • copy the GPIOSim.py file where you like, chmod +x it and run it :)

**** License ****

See LICENSE file

gpiosim's People

Contributors

bobvann avatar

Watchers

James Cloos avatar Andreas L avatar

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.