Différences entre versions de « Mydin-async-or-not »

De MCHobby - Wiki
Sauter à la navigation Sauter à la recherche
(Page créée avec « {{MyDin-NAV}} == Introduction == MyDin can be programmed: # with standard Python code (Classes, functions) # with asynchronous code (known as AsyncIO). The libraries pr… »)
 
Ligne 3 : Ligne 3 :
 
== Introduction ==
 
== Introduction ==
 
MyDin can be programmed:
 
MyDin can be programmed:
# with standard Python code (Classes, functions)  
+
# with standard Python code (classes, functions, types, etc)... name it "the procedural way".
# with asynchronous code (known as AsyncIO).
+
# with asynchronous code (known as AsyncIO)... a kind of multitasking!
  
The libraries provided with myDin allows the both approach to be used . By creating the myDin classes, your code get a direct access to all the feature
+
The libraries provided with myDin support the both approaches for programming myDin.
 +
 
 +
In any cases, the myDin library will simplifies the access to the underlaying hardware.
 +
 
 +
For sure, experimented MicroPython user can use the schematics and create their own code from top to bottom.
 +
 
 +
By creating and configure the myDin classes (see later), your code already get a direct access to all the features in the procedural way.
 +
 
 +
By calling the additional {{fname|setup()}} and {{fname|run()}} the myDin will starts asynchronous processing.
 +
 
 +
We strongly recommend to use the asynchronous approach for your projects.
  
 
{{MyDin-TRAILER}}
 
{{MyDin-TRAILER}}

Version du 21 avril 2025 à 20:53

Introduction

MyDin can be programmed:

  1. with standard Python code (classes, functions, types, etc)... name it "the procedural way".
  2. with asynchronous code (known as AsyncIO)... a kind of multitasking!

The libraries provided with myDin support the both approaches for programming myDin.

In any cases, the myDin library will simplifies the access to the underlaying hardware.

For sure, experimented MicroPython user can use the schematics and create their own code from top to bottom.

By creating and configure the myDin classes (see later), your code already get a direct access to all the features in the procedural way.

By calling the additional setup() and run() the myDin will starts asynchronous processing.

We strongly recommend to use the asynchronous approach for your projects.

Modèle:MyDin-TRAILER