Menu

ldro.dio.toggle

Attila

ldro.dio.toggle - Toggle the output pin

The pin will toggle it's logic state. The pin has to be set as output with ldro.dio.output function.

Function

Synopsys

toggle(pinID)

Arguments

number pinID Pin number to toggle logic state

Returns

Nothing

Examples

Toggle pin 8

pins=require("ldro.dio")
print("Pin 8 toggling 10 times")
pins.output(8) --Pin 8 is now configured as digital output
for i=0,10 do
  pins.toggle(8)
end

See Also


Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.