Modifications

Sauter à la navigation Sauter à la recherche
641 octets ajoutés ,  22 avril 2025 à 23:11
Ligne 174 : Ligne 174 :     
=== Steps 1 & 2 ===
 
=== Steps 1 & 2 ===
−
Those steps are identical to  
+
Those steps are identical to the "Asynchronous" approach.
    +
Once those steps are done, the {{fname|din}} object is available and offers access to all the behaviors of both boards.
 +
 +
=== Step 3 ===
 +
For a procedural implementation, the user script is encapsulated within an infinite {{fname|while}} loop.
 +
 +
<syntaxhighlight lang="python">
 +
from mydin import configure
 +
from mydin.pico import Pico3Mod
 +
from mydin.backplane.relays import TwoRelay3Mod
 +
 +
# Which Controler + Backplane to use
 +
din = configure( Pico3Mod, TwoRelay3Mod )
 +
 +
while True:
 +
    # ... place user code is this section.
 +
    #
 +
    # ... user code can access the "din" object.
 +
</syntaxhighlight>
 +
 +
=== Step 4 ===
 +
x
    
{{MyDin-TRAILER}}
 
{{MyDin-TRAILER}}
32 908

modifications

Menu de navigation