kopia lustrzana https://github.com/pimoroni/pimoroni-pico
Add Automation 2040 W Mini init to examples
rodzic
3fa620db10
commit
262bd673ed
|
@ -1,6 +1,9 @@
|
|||
import time
|
||||
from automation import Automation2040W, SWITCH_A
|
||||
|
||||
# Uncomment for Automation2040W Mini and comment out above import
|
||||
# from automation import Automation2040WMini, SWITCH_A
|
||||
|
||||
"""
|
||||
Demonstrates how to toggle each of Automation 2040 W's output terminals.
|
||||
|
||||
|
@ -12,6 +15,8 @@ OUTPUT_NAMES = ("O1", "O2", "O3") # The friendly names to give each digital ou
|
|||
|
||||
# Create a new Automation2040W
|
||||
board = Automation2040W()
|
||||
# Uncomment for Automation2040W Mini
|
||||
# board = Automation2040WMini()
|
||||
|
||||
# Enable the LED of the switch used to exit the loop
|
||||
board.switch_led(SWITCH_A, 50) # Half Brightness
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import time
|
||||
from automation import Automation2040W, SWITCH_A
|
||||
|
||||
# Uncomment fo Automation2040W Mini and comment out above import
|
||||
# Uncomment for Automation2040W Mini and comment out above import
|
||||
# from automation import Automation2040WMini, SWITCH_A
|
||||
|
||||
"""
|
||||
|
@ -15,7 +15,7 @@ INPUT_NAMES = ("I1", "I2", "I3", "I4") # The friendly names to give each digita
|
|||
|
||||
# Create a new Automation2040W
|
||||
board = Automation2040W()
|
||||
# Uncomment fo Automation2040W Mini
|
||||
# Uncomment for Automation2040W Mini
|
||||
# board = Automation2040WMini()
|
||||
|
||||
# Enable the LED of the switch used to exit the loop
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
import time
|
||||
from automation import Automation2040W, SWITCH_A
|
||||
|
||||
# Uncomment for Automation2040W Mini and comment out above import
|
||||
# from automation import Automation2040WMini, SWITCH_A
|
||||
|
||||
"""
|
||||
Demonstrates how to toggle each of Automation 2040 W's output terminals.
|
||||
|
||||
|
@ -12,6 +15,8 @@ OUTPUT_NAMES = ("O1", "O2", "O3") # The friendly names to give each digital ou
|
|||
|
||||
# Create a new Automation2040W
|
||||
board = Automation2040W()
|
||||
# Uncomment for Automation2040W Mini
|
||||
# board = Automation2040WMini()
|
||||
|
||||
# Enable the LED of the switch used to exit the loop
|
||||
board.switch_led(SWITCH_A, 50) # Half Brightness
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
import time
|
||||
from automation import Automation2040W, SWITCH_A
|
||||
|
||||
# Uncomment for Automation2040W Mini and comment out above import
|
||||
# from automation import Automation2040WMini, SWITCH_A
|
||||
|
||||
"""
|
||||
Demonstrates how to toggle the actuation state of each of Automation 2040 W's relays.
|
||||
|
||||
|
@ -12,7 +15,7 @@ RELAY_NAMES = ("R1", "R2", "R3") # The friendly names to give each relay
|
|||
|
||||
# Create a new Automation2040W
|
||||
board = Automation2040W()
|
||||
# Uncomment fo Automation2040W Mini
|
||||
# Uncomment for Automation2040W Mini
|
||||
# board = Automation2040WMini()
|
||||
|
||||
# Enable the LED of the switch used to exit the loop
|
||||
|
|
Ładowanie…
Reference in New Issue