Skip to content

Informational Reports

All of the following methods are synchronous. The methods block until they return.

get_analog_map

 def get_analog_map(self)

    This method requests a Firmata analog map 
    query and returns the results.

    :returns: An analog map response or None if a timeout occurs

Example:

  1. retrieve_analog_map.py

Notes:

Refer to the Firmata Protocol specification for an explanation of the report data.

get_capability_report

 def get_capability_report(self)

    This method requests and returns a Firmata 
    capability query report

    :returns: A capability report in the form of a list

Example:

  1. retrieve_capability_report.py

Notes:

Refer to the Firmata Protocol specification for an explanation of the report data.]

get_firmware_version

  def get_firmware_version(self)

    This method retrieves the Firmata firmware version

    :returns: Firmata firmware version

Example:

  1. retrieve_firmware_version.py

Notes:

This report will return the major and minor numbers of the release and the firmware name.

get_pin_state

 def get_pin_state(self, pin)

    This method retrieves a pin state report for the specified pin. Pin modes reported:

    INPUT = 0x00 # digital input mode

    OUTPUT = 0x01 # digital output mode

    ANALOG = 0x02 # analog input mode

    PWM = 0x03 # digital pin in PWM output mode

    SERVO = 0x04 # digital pin in Servo output mode

    I2C = 0x06 # pin included in I2C setup

    STEPPER = 0x08 # digital pin in stepper mode

    PULLUP = 0x0b # digital pin in input pullup mode

    SONAR = 0x0c # digital pin in SONAR mode

    TONE = 0x0d # digital pin in tone mode

    :param pin: Pin of interest

    :returns: pin state report

Example:

  1. retrieve_pin_state.py

Notes:

Refer to the Firmata Protocol specification for an explanation of the report data.]

get_protocol_version

 def get_protocol_version(self)

    This method returns the major and minor values 
    for the protocol version, i.e. 2.5

    :returns: Firmata protocol version

Example:

  1. retrieve_protocol_version.py

get_pymata_version

  def get_pymata_version(self)

    This method retrieves the PyMata Express version number

    :returns: PyMata Express version number.

Example:

  1. retrieve_pymata_version.py



Copyright (C) 2020 Alan Yorinks. All Rights Reserved.