Skip to content

Latest commit

 

History

History
46 lines (35 loc) · 929 Bytes

DESCRIPTION.md

File metadata and controls

46 lines (35 loc) · 929 Bytes

GPIOEmulator

The easiest way to use this package is to install using pip for python 2.7

$ sudo pip install Mock.GPIO

using pip3 for python 3

$ sudo pip3 install Mock.GPIO

To use the emulator just type the following at the beginning of your script.

from Mock.GPIO import GPIO

Works with

Simulation

This library simulates the following functions which are used in the RPi.GPIO library.

  • GPIO.setmode()
  • GPIO.getmode()
  • GPIO.setwarnings()
  • GPIO.setup()
  • GPIO.output()
  • GPIO.input()
  • GPIO.wait_for_edge()
  • GPIO.add_event_detect()
  • GPIO.event_detected()
  • GPIO.add_event_callback()
  • GPIO.remove_event_detect()
  • GPIO.gpio_function()
  • GPIO.start()
  • GPIO.ChangeFrequency()
  • GPIO.ChangeDutyCycle()
  • GPIO.stop()
  • GPIO.cleanup()