Digital In Out Sample
This sample demonstrates digital port read and write.
To run the sample:
Download the sample code from https://github.com/Turta-io/LoRaHAT/blob/master/Samples/Python/digital_port_in_out.py
Copy the sample code to a folder on the Raspberry Pi.
Open terminal, and then go to the folder you copied the sample.
Run the sample with the following command:
Sample Code
Result
When you run the sample, it toggles digital port 1 and reads digital port 2. The example output should be like this:
To stop the Python script, just press CTRL + C.
Last updated