Table of Contents

Reverse

Toggle the output state of the specified pin.

Syntax

from cubloc import Reverse
 
Reverse(pin: int)

Parameters

Exceptions

Example

from time import sleep
from cubloc import Output, Reverse
 
# LED on GP25, configured as an output
LED = 25
Output(LED)
 
while True:
    # Toggle LED on for 500ms
    Reverse(LED)
    sleep(0.5)