pyb
— functions related to the pyboard¶
The pyb
module contains specific functions related to the pyboard.
Miscellaneous functions¶
-
pyb.
have_cdc
()¶ Return True if USB is connected as a serial device, False otherwise.
-
pyb.
hid
((buttons, x, y, z))¶ Takes a 4-tuple (or list) and sends it to the USB host (the PC) to signal a HID mouse-motion event.
-
pyb.
info
([dump_alloc_table])¶ Print out lots of information about the board.
-
pyb.
repl_uart
(uart)¶ Get or set the UART object that the REPL is repeated on.
-
pyb.
rng
()¶ Return a 30-bit hardware generated random number.
-
pyb.
sync
()¶ Sync all file systems.
-
pyb.
unique_id
()¶ Returns a string of 12 bytes (96 bits), which is the unique ID for the MCU.
Classes¶
- class Accel – accelerometer control
- class ADC – analog to digital conversion: read analog values on a pin
- class CAN – controller area network communication bus
- class DAC – digital to analog conversion
- class ExtInt – configure I/O pins to interrupt on external events
- class I2C – a two-wire serial protocol
- class LCD – LCD control for the LCD touch-sensor pyskin
- class LED – LED object
- class Pin – control I/O pins
- class PinAF – Pin Alternate Functions
- class RTC – real time clock
- class Servo – 3-wire hobby servo driver
- class SPI – a master-driven serial protocol
- class Switch – switch object
- class Timer – control internal timers
- class TimerChannel — setup a channel for a timer
- class UART – duplex serial communication bus
- class USB_VCP – USB virtual comm port