4. API

4.1. DesignSpark.Pmod.AD1

Interface for PmodAD1 module (AD7476A).

Note

Only a single channel (A1) is supported at present due to the way that SPI is configured.

class DesignSpark.Pmod.AD1.PmodAD1(DSPMod6)[source]
cleanup()[source]
readA1()[source]
readA1Volts()[source]

4.2. DesignSpark.Pmod.Error

exception DesignSpark.Pmod.Error.Error[source]

Bases: exceptions.Exception

Base class for exceptions in this library.

exception DesignSpark.Pmod.Error.incorrectModuleName[source]

Bases: DesignSpark.Pmod.Error.Error

Exception raised when the module name given does not exist in the module map.

exception DesignSpark.Pmod.Error.incorrectPortName[source]

Bases: DesignSpark.Pmod.Error.Error

Exception raised when the port name given does not exist in the port map.

exception DesignSpark.Pmod.Error.portCapabilityConflict[source]

Bases: DesignSpark.Pmod.Error.Error

Exception raised when the port is already using shared GPIO pins.

exception DesignSpark.Pmod.Error.portCapabilitySupport[source]

Bases: DesignSpark.Pmod.Error.Error

Exception raised when a port does not support the module type.

exception DesignSpark.Pmod.Error.portInUse[source]

Bases: DesignSpark.Pmod.Error.Error

Exception raised when the port is already assigned.

4.3. DesignSpark.Pmod.HAT

Manages Pmod HAT port resources, enforcing correct usage and avoiding conflicts.

class DesignSpark.Pmod.HAT.DSPMod12(_portName)[source]
inUse()[source]
setUseModule(moduleName)[source]
class DesignSpark.Pmod.HAT.DSPMod6(_portName)[source]
inUse()[source]
setUseModule(moduleName)[source]
DesignSpark.Pmod.HAT.createPmod(moduleName, portName)[source]

4.4. DesignSpark.Pmod.HB3

Interface for PmodHB3 module.

class DesignSpark.Pmod.HB3.PmodHB3(DSPMod6)[source]
changeFrequency(freq)[source]
cleanup()[source]
forward(duty)[source]
reverse(duty)[source]
stop()[source]

4.5. DesignSpark.Pmod.ISNS20

Interface for PmodISNS20 module (ADC7476 + Allegro ACS722).

class DesignSpark.Pmod.ISNS20.PmodISNS20(DSPMod6)[source]
cleanup()[source]
readAmps()[source]
readMilliAmps()[source]

4.6. DesignSpark.Pmod.MIC3

Interface for PmodMIC3 (ADCS7476 + Knowles Acoustics SPA2410LR5H-B).

class DesignSpark.Pmod.MIC3.PmodMIC3(DSPMod6)[source]
MIC3_NO_BITS = 12
cleanup()[source]
dReference = 3.3
readIntegerValue()[source]
readPhysicalValue()[source]

4.7. DesignSpark.Pmod.OLEDrgb

Interface for PmodOLEDrgb module (ssd1331).

Note

Depends on luma.oled and luma.core.

class DesignSpark.Pmod.OLEDrgb.PmodOLEDrgb(DSPMod12)[source]
cleanup()[source]
getDevice()[source]
powerOff()[source]
powerOn()[source]

4.8. DesignSpark.Pmod.TC1

Interface for PmodTC1 module (MAX31855).

class DesignSpark.Pmod.TC1.PmodTC1(DSPMod6)[source]
cleanup()[source]
readCelcius()[source]
readError()[source]
readFarenheit()[source]
readInternal()[source]