The following information is for the EMANT380
Read Switch status bitwise
Learn:
- Digital Input
- Switch
This program reads the digital input state.
ReadBit.py
Code Explained
The ReadDigitalBit method returns a boolean value reflecting the switch status (True/False). As the switch is normally open and there is a pull up resistor on the digital input, a True will represent an unpressed switch.

Python with EMANT380
| TOC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
