RPi.GPIO emulator
- Python 3.5
$ pip install git+https://github.com/nosix/raspberry-gpio-emulator/
import RPi.GPIO as GPIO
- GPIO.setmode(mode)
- mode : GPIO.BOARD or GPIO.BCP
- GPIO.setwarnings(flag)
- flag : bool
- GPIO.setup(channel, state, initial, pull_up_down)
- channel : int or Sequence[int]
- state : GPIO.OUT or GPIO.IN
- initial : GPIO.LOW or GPIO.HIGH (option)
- pull_up_down : GPIO.PUD_OFF, GPIO.PUD_DOWN or GPIO.PUD_UP (option)
- GPIO.output(channel, outmode)
- channel : int or Sequence[int]
- outmode : GPIO.LOW, GPIO.HIGH or Sequence[GPIO.LOW or GPIO.HIGH]
- GPIO.input(channel)
- channel : int
- GPIO.cleanup(channel)
- channel : int or Sequence[int] (option)
Documentation of raspberry-gpio-python:
Sample code:
This project based on Pi GPIO Emulator.
- Roderick Vella
- 2016
- Pi GPIO Emulator
- This project extends base design, but it change usage and implementation.