Informational Reports
All of the following methods are synchronous. The methods block until they return.
get_analog_map
async 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:
Notes:
Refer to the Firmata Protocol specification for an explanation of the report data.
get_capability_report
async 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
async def get_firmware_version(self)
This method retrieves the Firmata firmware version
:returns: Firmata firmware version
Example:
Notes:
This report will return the major and minor numbers of the release and the firmware name.
get_pin_state
async 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:
Notes:
Refer to the Firmata Protocol specification for an explanation of the report data.]
get_protocol_version
async 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:
get_pymata_version
async def get_pymata_version(self)
This method retrieves the PyMata Express version number
:returns: PyMata Express version number.
Example:
Copyright (C) 2020 Alan Yorinks. All Rights Reserved.