Mock.GPIO icon indicating copy to clipboard operation
Mock.GPIO copied to clipboard

Mock Library for RPI.GPIO python Library

Results 10 Mock.GPIO issues
Sort by recently updated
recently updated
newest added

Currently the Mock implementation of `setup` only allows one channel as it's first parameter. According to the [RPi.GPIO documentation](https://sourceforge.net/p/raspberry-gpio-python/wiki/BasicUsage/), (and my own testing) the RPi.GPIO `setup` function supports the initialization...

Is there a way to, for example, simulate that a hardware button is triggered? I.E. when a pin goes from HI to LOW or vice versa? If not, consider this...

According to https://sourceforge.net/p/raspberry-gpio-python/code/ci/default/tree/source/py_gpio.c#l676 the last 2 arguments in `add_event_detect(..)` are optional. This commit reflects that change.

**Describe the bug** The output function (as modified in #12) uses an incorrect variable name `channel` instead of `channels` in the case where only a single channel is provided. This...

bug

Closes #15 `setmode()` function doesn't properly set `setModeDone` and `_mode`. Fixed now after adding the `global` keyword at the beginning of the function.

**Describe the bug** Variables such as `setModeDone` and `_mode` aren't set correctly. I believe this is only an issue specifically with the `setmode()` function. After calling `setmode()`, the results of...

bug

The local variable "channels" does not exist outside the for loop declared on line 125. This causes an exception when calling output on a single channel.

currently even the example fails with the error: line 136, in output logger.info("Output channel : {} with value : {}".format(channel, values)) ^^^^^^^ UnboundLocalError: cannot access local variable 'channel' where it...

Simulate input This make it possible to simulate input to a GPIO pin, e.g. pressing a button. echo "[PINNUMBER]:[HI|LOW]" > /dev/tcp/{host}/{port} The port is hardcoded to 5566 example: echo "18:LOW"...

**Describe the bug** PyPI's `mock_gpio-0.2.0.tar.gz` tarball has a long list of dependencies. While code in github corresponding to v0.2.0 tag has no dependencies (empty list). **To Reproduce** Steps to reproduce...

bug