Différences entre versions de « Mydin-Class-Pico3Mod »

De MCHobby - Wiki
Sauter à la navigation Sauter à la recherche
Ligne 76 : Ligne 76 :
  
 
== Methods ==
 
== Methods ==
xx
+
 
 +
==== __init__() ====
 +
 
 +
Constructor of the {{fname|Pico3Mod}} class, specialized version of the PicoControler for the 3 modules DIN case. Pico3Mod inherits from PicoControler and DinControler. As a consequence, {{fname|Pico3Mod}} also inherits from the methods and properties of the both ancestor.
 +
 
 +
The constructor will creates the objects & resources specific to the {{fname|Pico3Mod}} board. har PicoControler creator is aware of the various Pin used for the I2C bus, Status pin, RUN_APP pin, etc. Le PicoControler can create the various instance accordingly.
 +
 
 +
<syntaxhighlight lang="python">
 +
def __init__( self, BackplaneClass ):
 +
</syntaxhighlight>
 +
 
 +
* '''BackplaneClass''' : Class of the backplane to be associated with the controler (eg: TwoRelay3Mod).

Version du 28 avril 2025 à 16:25

Page-under-construction.pngPage(s) en cours de traduction/élaboration.

Page(s) under translation/construction

Pico3Mod class

Raspberry-Pi Pico based controler for 3 modules DIN case.

Mydin-Class-Pico3Mod-in-case.png

The implementation of the class is closely tied to the features included into 3 modules DIN.

The features are used to design the PCB... so the board schematic is closely tied to the Pico3Mod class implementation.

Features

Mydin-Class-Pico3Mod-features-01.jpg

Mydin-Class-Pico3Mod-features-02.jpg

Board schematic

Schematic shows how the hardware (buttons, LEDs, buses, ...) are wired to the Pico.

Mydin-Class-Pico3Mod-schematic-01.png

Mydin-Class-Pico3Mod-schematic-02.png

Mydin-Class-Pico3Mod-schematic-03.png

Class Header

Ancestor PicoControler
Class Pico3Mod
Module pico
DIN Size 3 Modules
Descr Raspberry-Pi Pico based controler for 3 modules DIN case.

Attributes

buzzer : Buzzer

xxx

pca : PCA9536

Private

led0, led1, led2, led3 : PcaPinAdapter

xx

ext_rtc : DS3231

xxx

onewire : OneWire

xxx

roms : list

xxx

rom_ds18b20 : bytes

xxx

leds : list

Property, list of PcaPinAdapter

buttons : list

Property, list of Pin

onewire_roms : list

Property, list of str

has_ds18b20 : bool

Property.

temp_ds18b20 : float

Property.

Methods

__init__()

Constructor of the Pico3Mod class, specialized version of the PicoControler for the 3 modules DIN case. Pico3Mod inherits from PicoControler and DinControler. As a consequence, Pico3Mod also inherits from the methods and properties of the both ancestor.

The constructor will creates the objects & resources specific to the Pico3Mod board. har PicoControler creator is aware of the various Pin used for the I2C bus, Status pin, RUN_APP pin, etc. Le PicoControler can create the various instance accordingly.

def __init__( self, BackplaneClass ):
  • BackplaneClass : Class of the backplane to be associated with the controler (eg: TwoRelay3Mod).