DesignSpark.Pmod

logo HAT

Python library to support using Pmods with a Raspberry Pi and the DesignSpark Pmod HAT.

Features include:

  • Simple interfaces for supported Pmods
  • Checking that Pmod and port capabilities match
  • Checking for port usage conflicts
  • Usage examples

Supported Pmods

The following modules are currently supported with the DesignSpark Raspberry Pi Pmod HAT:

1 Builds on the excellent luma.oled and luma.core libraries from Richard Hull and contributors.

Installation

DesignSpark.Pmod can be installed from PyPi using pip. See the documentation for details.

Documentation

Installation and API documentation, along with examples, can be found at:

http://designspark-pmod.readthedocs.io

For Pmod HAT documentation, including the reference manual and schematic, see:

https://reference.digilentinc.com/reference/add-ons/pmod-hat/start

Table of Contents

Installation

This guide assumes that you are running Raspbian Stretch.

First enable SPI and configure the UART:

pi@raspberrypi:~$ sudo raspi-config

Selecting:

  • Option 5 - Interfacing
  • P4 - SPI
  • Enable → YES
  • P6 - Serial
  • Would you like a login shell to be accessible over serial? → No
  • Would you like the serial port hardware to be enabled? → Yes

Then exit raspi-config.

Next update the package lists:

pi@raspberrypi:~$ sudo apt-get update

Then install the Raspbian dependencies:

pi@raspberrypi:~$ sudo apt-get install python-pip python-dev libfreetype6-dev libjpeg-dev build-essential

Finally, install DesignSpark.Pmod and dependencies from PyPi:

pi@raspberrypi:~$ sudo pip install designspark.pmod

Pmod Information

Details of currently supported Pmods can be found below.

ACL2

PmodACL2

The Pmod ACL2 is a 3-axis MEMS accelerometer powered by the Analog Devices ADXL362. By communicating with the chip via the SPI protocol, users may receive up to 12 bits of resolution for each axis of acceleration. Additionally, this module offers freefall detection as well as power saving features through its motion activated sleep and wake modes.

Features:

  • 3-axis MEMS accelerometer
  • Up to 12 bits of resolution per axis
  • User-selectable resolution
  • Activity/inactivity monitoring
  • Low current consumption at <2 μA at 100Hz
  • Free-fall detection

AD1

PmodAD1

The Digilent Pmod AD1 (Revision G) is a two channel 12-bit analog-to-digital converter that features Analog Devices’ AD7476A. With a sampling rate of up to 1 million samples per second, this Pmod™ is capable of excelling in even the most demanding audio applications.

Features:

  • Two channel 12-bit analog-to-digital converter
  • Simultaneous A/D conversion at up to one MSa per channel
  • Two 2-pole Sallen-Key anti-alias filters
  • Small PCB size for flexible designs 0.95 in × 0.8 in (2.4 cm × 2.0 cm)

Note

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

GPS

PmodGPS

The Pmod GPS can provide satellite-positioning accuracy to any embedded system. By communicating through UART with the GlobalTop FGPMMOPA6H GPS module, users may benefit from the 3-meter accuracy for any long term traveling.

Features:

  • Ultra-sensitive GPS module (-165 dBm)
  • Add 3m 2D satellite positioning accuracy to any embedded system
  • Low power consumption
  • Up to 10Hz update rate
  • NMEA (default) and RTCM protocols available

HB3

PmodHB3

The Pmod HB3 utilizes a full H-Bridge circuit to allow users to drive DC motors from the system board. Two external pins are provided on the Pmod for sensor feedback on the DC motor, if desired.

Features:

  • 2A H-bridge circuit
  • Drive a DC motor with operation voltage up to 12V
  • Screw terminal blocks for connection to the motor
  • Separate header for external motor feedback

ISNS20

PmodISNS20

The Digilent Pmod ISNS20 (Revision A) is a small current sense module with a digital SPI interface. The board combines an Allegro ACS722 Hall Effect current sensor with a 12-bit analog-to-digital converter from Texas Instruments. The Pmod ISNS20 is quick, accurate, and easy to use for a variety of applications.

Features:

  • High accuracy current sensor
  • Measure current with 120Hz/20kHz/80kHz jumper selections
  • ±20A DC or AC input
  • Accurate to within ±2%
  • 12-bit ADC

KYPD

PmodKYPD

The Pmod KYPD is a 16-button keypad arranged in a hexidecimal format (0-F). By digitally driving a column line to a logic low level and digitally reading each of the rows, users can determine which button is currently pressed.

Features:

  • 16 momentary push-buttons
  • Can detect simultaneous button presses
  • Isolated rows and columns

LS1

PmodLS1

The Digilent Pmod LS1 allows users to receive signals from multiple optical sensors, such as the popular combination of an IR LED with an IR sensor used in line-following robots.

Features:

  • Infrared light detector with on-board sensitivity adjustment
  • Interface with up to four reflective or transmissive photo detectors
  • Works with Digilent IR Proximity Sensor

MIC3

PmodMIC3

The Digilent Pmod MIC3 (Revision A) is small microphone module with a digital interface. With a Knowles Acoustics SPA2410LR5H-B MEMs microphone and Texas Instrument’s ADCS7476 12-bit Analog-to-Digital Converter, you can capture your audio inputs with ease.

Features:

  • MEMS Microphone module with digital interface
  • Transform audio inputs with 12-bit A/D converter
  • Adjust incoming volume with on-board potentiometer
  • Up to 1 MSPS of data

OLEDrgb

PmodOLEDrgb

The Digilent Pmod OLEDrgb (Revision B) is an organic RGB LED module with a 96×64 pixel display capable of 16-bit color resolution.

Features:

  • 96×64 pixel RGB OLED screen
  • 0.8“ x 0.5” graphical display
  • 16-bit color resolution
  • Two low-power display shutdown modes

SWT

PmodSWT

The Pmod SWT provides users with four slide switches for up to 16 different binary logic inputs to for the attached system board.

Features:

  • 4 slide switches
  • Add user input to host board or project
  • Static binary logic input

TC1

PmodTC1

The Digilent Pmod TC1 (Revision A) is a cold-junction thermocouple-to-digital converter module designed for a classic K-Type thermocouple wire. With Maxim Integrated’s MAX31855, this module reports the measured temperature in 14-bits with 0.25°C resolution.

Features:

  • K-type thermocouple-to-digital converter
  • Wide temperature range of -73°C to 482°C with provided wire
  • ±2°C accuracy from -200°C to 700°C
  • 14-bit with 0.25°C resolution
  • Cold-junction temperature compensation

Basic Examples

AD1

12-bit analog-to-digital converter.

HB3

2A H-bridge circuit for DC motor drive up to 12V.

Spin motor

This example:

  1. Spins the motor forwards for 20 seconds
  2. Commands the motor to stop and pauses for 2 seconds
  3. Spins the motor in reverse for 20 seconds
  4. Commands the motor to stop and pauses for 2 seconds
  5. Ramps up the speed across 100 steps in the forward direction
  6. Ramps down the speed across 100 steps in the forward direction
  7. Ramps up speed across 100 steps in the reverse direction
  8. Ramps down the speed across 100 steps in the reverse direction
  9. Loops back to (1)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2017 RS Components Ltd
# SPDX-License-Identifier: MIT License

"""
Spin motor forwards then backwards.
Ramp speed up and then down in forward direction.
Ramp speed up and then down in reverse direction.
"""

from DesignSpark.Pmod.HAT import createPmod
import time

if __name__ == '__main__':

    motor = createPmod('HB3','JAA')

    try:
        while True:
        
            print('fwd')
            motor.forward(20)
            time.sleep(2)
            motor.stop()
            time.sleep(2)
            print('rev')
            motor.reverse(20)
            time.sleep(1)
            motor.stop()
            time.sleep(2)
            
            
            print ('ramp up fwd')
            for i in range(100):
                motor.forward(i)
                time.sleep(.1)
            
            print ('ramp down fwd')
            for i in range(100):
                motor.forward(100-i)
                time.sleep(.1)
                
            motor.stop()
            time.sleep(2)
            
            print ('ramp up rev')
            for i in range(100):
                motor.reverse(i)
                time.sleep(.1)
            
            print ('ramp down rev')
            for i in range(100):
                motor.reverse(100-i)
                time.sleep(.1)
        
    except KeyboardInterrupt:
        pass
    
    finally:
        motor.cleanup() 
    
    
    

Requirements

  • PmodHB3 module connected to port JAA
  • DC motor
  • Motor power supply

ISNS20

±20A DC or AC input, high accuracy current sensor.

MIC3

Knowles Acoustics SPA2410LR5H-B MEMs microphone and Texas Instrument’s ADCS7476 12-bit Analog-to-Digital Converter.

Display mic level

Print a continous sound level reading out to the terminal.

#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2017 RS Components Ltd
# SPDX-License-Identifier: MIT License

"""
Print a continous sound level reading out.
"""

from DesignSpark.Pmod.HAT import createPmod
import time

s = ':'
lut = [s]
for i in range(128):
    s+=':'
    lut.append(s)

if __name__ == '__main__':
    
    mic = createPmod('MIC3','JBA')
    time.sleep(0.1)
    
    try:
        while True:
            int = mic.readIntegerValue()
            #print(int)
            print(lut[int>>5])
            snd = mic.readPhysicalValue()
            #print(snd)
            
            #time.sleep(0.01)
    except KeyboardInterrupt:
        pass
    finally:
        mic.cleanup()

Requirements

  • PmodMIC3 module connected to port JBA

OLEDrgb

Organic RGB LED module with a 96×64 pixel display capable of 16-bit color resolution.

Display text in a bounding box

Display the text “Hello, World!” in a bounding box.

#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2017 RS Components Ltd
# SPDX-License-Identifier: MIT License

"""
Display Hello, World! in bounding box.
"""

from DesignSpark.Pmod.HAT import createPmod
from luma.core.render import canvas
from luma.oled.device import ssd1331

if __name__ == '__main__':
    try:
        oled = createPmod('OLEDrgb','JA')
        device = oled.getDevice()
        
        with canvas(device) as draw:
            draw.rectangle(device.bounding_box, outline="white", fill="black")
            draw.text((16,20), "Hello, World!", fill="white")
    
        while True:
            pass
    except KeyboardInterrupt:
        pass
    finally:
        oled.cleanup()

Luma.Core & Luma.OLED API: luma.core.render.canvas, luma.oled.device.ssd1331.

Requirements

  • PmodOLEDrgb connected to port JA

PmodTC1

A cold-junction thermocouple-to-digital converter module designed for a classic K-Type thermocouple wire. Features a temperature range of -73°C to 482°C with provided wire.

PmodACL2

A 3-axis MEMS accelerometer module. Features the Analog Devices ADXL362 device with Measurement ranges ±2g, ±4g, ±8g. Up to 12-bit resolution on each axis.

PmodGPS

A GlobalTop FGPMMOPA6H GPS antenna module to receive position data from GPS satellites.

PmodSWT

Four slides switches for up to 16x different binary logic inputs.

PmodLS1

A line follower robot interface system board.

PmodKYPD

A 16-button keypad.

Advanced Examples

OLEDrgb

Organic RGB LED module with a 96×64 pixel display capable of 16-bit color resolution.

Analogue clock

Display an analogue clock face with date and time.

#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2014-17 Richard Hull and contributors
# See LICENSE.rst for details.
# PYTHON_ARGCOMPLETE_OK

"""
An analog clockface with date & time.

Ported from:
https://gist.github.com/TheRayTracer/dd12c498e3ecb9b8b47f#file-clock-py
"""

import math
import time
import datetime

from DesignSpark.Pmod.HAT import createPmod
from luma.core.render import canvas

def posn(angle, arm_length):
    dx = int(math.cos(math.radians(angle)) * arm_length)
    dy = int(math.sin(math.radians(angle)) * arm_length)
    return (dx, dy)

def main():
    today_last_time = "Unknown"
    while True:
        now = datetime.datetime.now()
        today_date = now.strftime("%d %b %y")
        today_time = now.strftime("%H:%M:%S")
        if today_time != today_last_time:
            today_last_time = today_time
            with canvas(device) as draw:
                now = datetime.datetime.now()
                today_date = now.strftime("%d %b %y")

                margin = 4

                cx = 30
                cy = min(device.height, 64) / 2

                left = cx - cy
                right = cx + cy

                hrs_angle = 270 + (30 * (now.hour + (now.minute / 60.0)))
                hrs = posn(hrs_angle, cy - margin - 7)

                min_angle = 270 + (6 * now.minute)
                mins = posn(min_angle, cy - margin - 2)

                sec_angle = 270 + (6 * now.second)
                secs = posn(sec_angle, cy - margin - 2)

                draw.ellipse((left + margin, margin, right - margin, min(device.height, 64) - margin), outline="white")
                draw.line((cx, cy, cx + hrs[0], cy + hrs[1]), fill="white")
                draw.line((cx, cy, cx + mins[0], cy + mins[1]), fill="white")
                draw.line((cx, cy, cx + secs[0], cy + secs[1]), fill="red")
                draw.ellipse((cx - 2, cy - 2, cx + 2, cy + 2), fill="white", outline="white")
                draw.text((2 * (cx + margin), cy - 8), today_date, fill="yellow")
                draw.text((2 * (cx + margin), cy), today_time, fill="yellow")

        time.sleep(0.1)

if __name__ == "__main__":
    oled = createPmod('OLEDrgb','JA')
    try:
        
        device = oled.getDevice()
        main()
    except KeyboardInterrupt:
        pass
    finally:
        oled.cleanup()

Game of Life

Conway’s Game of Life.

#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2014-17 Richard Hull and contributors
# See LICENSE.rst for details.
# PYTHON_ARGCOMPLETE_OK

"""
Conway's game of life.

Adapted from:
http://codereview.stackexchange.com/a/108121
"""

import time
from random import randint

from DesignSpark.Pmod.HAT import createPmod
from luma.core.render import canvas

def neighbors(cell):
    x, y = cell
    yield x - 1, y - 1
    yield x, y - 1
    yield x + 1, y - 1
    yield x - 1, y
    yield x + 1, y
    yield x - 1, y + 1
    yield x, y + 1
    yield x + 1, y + 1

def iterate(board):
    new_board = set([])
    candidates = board.union(set(n for cell in board for n in neighbors(cell)))
    for cell in candidates:
        count = sum((n in board) for n in neighbors(cell))
        if count == 3 or (count == 2 and cell in board):
            new_board.add(cell)
    return new_board

def main():
    scale = 3
    cols = device.width // scale
    rows = device.height // scale
    initial_population = int(cols * rows * 0.33)

    while True:
        board = set((randint(0, cols), randint(0, rows)) for _ in range(initial_population))

        for i in range(500):
            with canvas(device, dither=True) as draw:
                for x, y in board:
                    left = x * scale
                    top = y * scale
                    if scale == 1:
                        draw.point((left, top), fill="white")
                    else:
                        right = left + scale
                        bottom = top + scale
                        draw.rectangle((left, top, right, bottom), fill="white", outline="black")

                if i == 0:
                    w, h = draw.textsize("Game of Life")
                    left = (device.width - w) // 2
                    top = (device.height - h) // 2
                    draw.rectangle((left - 1, top, left + w + 1, top + h), fill="black", outline="white")
                    draw.text((left + 1, top), text="Game of Life", fill="white")

            if i == 0:
                time.sleep(3)

            board = iterate(board)


if __name__ == "__main__":
    try:
        oled = createPmod('OLEDrgb','JA')
        device = oled.getDevice()
        main()
    except KeyboardInterrupt:
        pass

Requirements

  • PmodOLEDrgb connected to port JA

API

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]

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.

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]

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]

DesignSpark.Pmod.ISNS20

Interface for PmodISNS20 module (ADC7476 + Allegro ACS722).

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

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]

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]

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]

DesignSpark.Pmod.ACL2

Interface for Pmod ACL2 module.

class DesignSpark.Pmod.ACL2.PmodACL2(DSPMod12)[source]
cleanup()[source]
getDeviceID()[source]
getPowerMode()[source]
getRawXYZT()[source]
getSensorStatus()[source]
getTemperature()[source]
getX()[source]
getXYZT()[source]
getY()[source]
getZ()[source]
setOutputRate(outRate)[source]
setPowerMode(PowerMode)[source]
setRange(newRange)[source]
softwareReset()[source]

DesignSpark.Pmod.GPS

Interface for PmodGPS

class DesignSpark.Pmod.GPS.MicropyGPS(local_offset=0, location_formatting='ddm')[source]

GPS NMEA Sentence Parser. Creates object that stores all relevant GPS data and statistics. Parses sentences one character at a time using update().

SENTENCE_LIMIT = 90
compass_direction()[source]

Determine a cardinal or inter-cardinal direction based on current course. :return: string

date_string(formatting='s_mdy', century='20')[source]

Creates a readable string of the current date. Can select between long format: Januray 1st, 2014 or two short formats: 11/01/2014 (MM/DD/YYYY) 01/11/2014 (DD/MM/YYYY) :param formatting: string ‘s_mdy’, ‘s_dmy’, or ‘long’ :param century: int delineating the century the GPS data is from (19 for 19XX, 20 for 20XX) :return: date_string string with long or short format date

gpgga()[source]

Parse Global Positioning System Fix Data (GGA) Sentence. Updates UTC timestamp, latitude, longitude, fix status, satellites in use, Horizontal Dilution of Precision (HDOP), altitude, geoid height and fix status

gpgll()[source]

Parse Geographic Latitude and Longitude (GLL)Sentence. Updates UTC timestamp, latitude, longitude, and fix status

gpgsa()[source]

Parse GNSS DOP and Active Satellites (GSA) sentence. Updates GPS fix type, list of satellites used in fix calculation, Position Dilution of Precision (PDOP), Horizontal Dilution of Precision (HDOP), Vertical Dilution of Precision, and fix status

gpgsv()[source]

Parse Satellites in View (GSV) sentence. Updates number of SV Sentences,the number of the last SV sentence parsed, and data on each satellite present in the sentence

gprmc()[source]

Parse Recommended Minimum Specific GPS/Transit data (RMC)Sentence. Updates UTC timestamp, latitude, longitude, Course, Speed, Date, and fix status

gpvtg()[source]

Parse Track Made Good and Ground Speed (VTG) Sentence. Updates speed and course

latitude

Format Latitude Data Correctly

latitude_string()[source]

Create a readable string of the current latitude data :return: string

longitude

Format Longitude Data Correctly

longitude_string()[source]

Create a readable string of the current longitude data :return: string

new_fix_time()[source]

Updates a high resolution counter with current time when fix is updated. Currently only triggered from GGA, GSA and RMC sentences

new_sentence()[source]

Adjust Object Flags in Preparation for a New Sentence

satellite_data_updated()[source]

Checks if the all the GSV sentences in a group have been read, making satellite data complete :return: boolean

satellites_visible()[source]

Returns a list of of the satellite PRNs currently visible to the receiver :return: list

speed_string(unit='kph')[source]

Creates a readable string of the current speed data in one of three units :param unit: string of ‘kph’,’mph, or ‘knot’ :return:

start_logging(target_file, mode='append')[source]

Create GPS data log object

stop_logging()[source]

Closes the log file handler and disables further logging

supported_sentences = {'GLGGA': <function gpgga>, 'GLGLL': <function gpgll>, 'GLGSA': <function gpgsa>, 'GLGSV': <function gpgsv>, 'GLRMC': <function gprmc>, 'GLVTG': <function gpvtg>, 'GNGGA': <function gpgga>, 'GNGLL': <function gpgll>, 'GNGSA': <function gpgsa>, 'GNRMC': <function gprmc>, 'GNVTG': <function gpvtg>, 'GPGGA': <function gpgga>, 'GPGLL': <function gpgll>, 'GPGSA': <function gpgsa>, 'GPGSV': <function gpgsv>, 'GPRMC': <function gprmc>, 'GPVTG': <function gpvtg>}
time_since_fix()[source]

Returns number of millisecond since the last sentence with a valid fix was parsed. Returns 0 if no fix has been found

update(new_char)[source]

Process a new input char and updates GPS object if necessary based on special characters (‘$’, ‘,’, ‘*’) Function builds a list of received string that are validate by CRC prior to parsing by the appropriate sentence function. Returns sentence type on successful parse, None otherwise

write_log(log_string)[source]

Attempts to write the last valid NMEA sentence character to the active file handler

class DesignSpark.Pmod.GPS.PmodGPS(DSPMod6)[source]
cleanup()[source]
getAltitude()[source]
getDate()[source]
getGPSLine()[source]
getGPSPosData()[source]
getHeading()[source]
getLatitude()[source]
getLongitude()[source]
getNumSats()[source]
getPDOP()[source]
getSatelliteData()[source]
getSatelliteInfo()[source]
getSpeedKM()[source]
getTime()[source]
getVisibleSatellite()[source]
gpsUpdate()[source]
isFixed()[source]

DesignSpark.Pmod.SWT

Interface for Pmod_SWT

class DesignSpark.Pmod.SWT.PmodSWT(DSPmod6)[source]
AllOff()[source]
AllOn()[source]
GetStatus(SW)[source]
GetSwitchPin(SW)[source]
cleanup()[source]

DesignSpark.Pmod.LS1

Interface for Pmod_LS1

class DesignSpark.Pmod.LS1.PmodLS1(DSPmod6)[source]
GetAllStatus()[source]
GetSensorPin(Sensor)[source]
GetStatus(SNS)[source]
cleanup()[source]

DesignSpark.Pmod.KYPD

Interface for Pmod_KYPD

class DesignSpark.Pmod.KYPD.PmodKYPD(DSPmod12)[source]
cleanup()[source]
getColRow()[source]
getKey()[source]
getKeyMap()[source]
setKeyMap(UsrKeyMap)[source]
setKeyMapDefault()[source]

Change log

Version Description Date
0.3.0
  • Added ACL2, GPS, LS1, SWT & KYPD Pmods
26/02/20
0.2.0
  • Tidied up names, added documentation and examples
28/11/17
0.1.0
  • Initial version
26/11/17

The MIT License (MIT)

Copyright (c) 2017 RS Components Ltd

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.