Ordinateur de bord pour voiture de collection  6.3
Public Member Functions | Static Public Attributes | List of all members
GPIOIN Class Reference

Raspberry GPIO direct acces in input mode. More...

Inheritance diagram for GPIOIN:
Capteur

Public Member Functions

def __init__ (self, Name, Voie=None, PullUpDwn=GPIO.PUD_OFF)
 the constructor. More...
 
def Lock (self)
 
def Read (self)
 Retourne l'état de l'APC (broche NUMBROCHE_APC du GPIO) More...
 
def SetPullUpDwn (self, UpDwn=GPIO.PUD_OFF)
 fixe la pull-up / pull down / non sur l'entrée de la GPIO More...
 
def UnLock (self)
 
- Public Member Functions inherited from Capteur
def Compens (self, a=1, b=0)
 entre une valeur de compensation (à supprimer) More...
 
def Switch (self)
 forcement booleen, pas de parametre (à supprimer) More...
 
def Write (self, Val)
 ecrit sur une sortie (PWM ou Tout ou Rien) More...
 

Static Public Attributes

dictionary mode
 

Additional Inherited Members

- Public Attributes inherited from Capteur
 Module
 
 Name
 
 Voie
 

Detailed Description

Raspberry GPIO direct acces in input mode.

it'used for "APC Présence Après Contact" = Ignition (clè de contact)

Date
5.2 14/12/2018 création

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  Name,
  Voie = None,
  PullUpDwn = GPIO.PUD_OFF 
)

the constructor.

Parameters
Name(string) : the name
Voie(int) : the number of GPIO pin (mode is "GPIO.BOARD")
PullUpDwnshould be one of [GPIO.PUD_OFF, GPIO.PUD_UP, GPIO.PUD_DOWN]

Reimplemented from Capteur.

Member Function Documentation

◆ Lock()

def Lock (   self)

◆ Read()

def Read (   self)

Retourne l'état de l'APC (broche NUMBROCHE_APC du GPIO)

Reimplemented from Capteur.

◆ SetPullUpDwn()

def SetPullUpDwn (   self,
  UpDwn = GPIO.PUD_OFF 
)

fixe la pull-up / pull down / non sur l'entrée de la GPIO

Parameters
UpDwn:doit etre GPIO.PUD_OFF, GPIO.PUD_UP, ou GPIO.PUD_DOWN. Il est possibled d'utiliser la table disponible dans la classe GPIOIN.mode["string"]

◆ UnLock()

def UnLock (   self)

Member Data Documentation

◆ mode

dictionary mode
static
Initial value:
= {
"PUD_OFF" : GPIO.PUD_OFF,
"PUD_UP" : GPIO.PUD_UP,
"PUD_DOWN" :GPIO.PUD_DOWN}

The documentation for this class was generated from the following file: