board ===== .. py:module:: board .. autoapi-nested-parse:: Pin assignments and bus setup for the Adafruit Feather ESP32-S3. This is the only module besides the entry points that touches `machine`, so everything else can be tested on the host. Attributes ---------- .. autoapisummary:: board.I2C_POWER_PIN board.SDA_PIN board.SCL_PIN board.I2C_FREQ board.EPD_SCK_PIN board.EPD_MOSI_PIN board.EPD_CS_PIN board.EPD_DC_PIN board.EPD_RST_PIN board.EPD_BUSY_PIN board.EPD_PWR_PIN board.EPD_SPI_BAUDRATE board.NEOPIXEL_POWER_PIN board.USB_PRESENT_VOLTS Functions --------- .. autoapisummary:: board.init_i2c board.init_display board.status_screen board.hold_pins_for_sleep board.usb_volts board.usb_power board.wake_on_usb Module Contents --------------- .. py:data:: I2C_POWER_PIN :value: 7 .. py:data:: SDA_PIN :value: 3 .. py:data:: SCL_PIN :value: 4 .. py:data:: I2C_FREQ :value: 100000 .. py:data:: EPD_SCK_PIN :value: 36 .. py:data:: EPD_MOSI_PIN :value: 35 .. py:data:: EPD_CS_PIN :value: 10 .. py:data:: EPD_DC_PIN :value: 9 .. py:data:: EPD_RST_PIN :value: 6 .. py:data:: EPD_BUSY_PIN :value: 5 .. py:data:: EPD_PWR_PIN :value: 11 .. py:data:: EPD_SPI_BAUDRATE :value: 4000000 .. py:function:: init_i2c() Switch on I2C power and return the bus. .. py:function:: init_display() Return the e-paper driver (not yet initialised, see EPD.init). .. py:function:: status_screen() Return a `statusscreen.StatusScreen` on the display. .. py:data:: NEOPIXEL_POWER_PIN :value: 21 .. py:function:: hold_pins_for_sleep(display_powered=True) Hold pin levels during deep sleep, where they would float otherwise. The display stays powered with its control lines inactive or, if it is switched off, all its lines are held low so that the module is not fed through its inputs. The NeoPixel supply is switched off. :param display_powered: Whether the display keeps its supply in sleep. .. py:data:: USB_PRESENT_VOLTS :value: 4.0 .. py:function:: usb_volts(pin, divider) Measure the USB supply through a divider on `pin`. :param pin: GPIO of the divider, or None if none is wired (`defaults.USB_SENSE_PIN`). :param divider: Ratio of the divider (`defaults.USB_SENSE_DIVIDER`). :returns: The USB voltage in volts, or None without a divider. .. py:function:: usb_power(pin, divider) Tell whether USB power is present: True, False, or None without a divider. .. py:function:: wake_on_usb(pin) Wake from deep sleep once USB power reaches the divider on `pin`. The wake is level-triggered, so only arm it while USB is absent. The divided voltage must count as high for the pin (about 2.5 V and up).