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

De MCHobby - Wiki
Sauter à la navigation Sauter à la recherche
Ligne 10 : Ligne 10 :
 
In any cases, the myDin library will simplifies the access to the underlaying hardware.
 
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.
+
For sure, experimented MicroPython user can also use the schematics and creates their own software stack from the top to the 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 creating and configuring the myDin classes (see later), your code already get a direct access to all the features in the procedural way.
 +
 
 +
When calling the additional {{fname|setup()}} and {{fname|run()}} methods the myDin will starts asynchronous processing.
 +
 
 +
We strongly encourage to use the asynchronous approach for your projects.
 +
 
 +
== Creating myDin ==
 +
 
 +
To properly instantiate the DIN controler, you must identifies:
 +
# controler board
 +
# backplane board
 +
 
 +
These information will determine the Python modules to import and the classes names to be used.
  
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 à 21:00

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 also use the schematics and creates their own software stack from the top to the bottom.

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

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

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

Creating myDin

To properly instantiate the DIN controler, you must identifies:

  1. controler board
  2. backplane board

These information will determine the Python modules to import and the classes names to be used.


Modèle:MyDin-TRAILER