board

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

Functions

init_i2c()

Switch on I2C power and return the bus.

init_display()

Return the e-paper driver (not yet initialised, see EPD.init).

status_screen()

Return a statusscreen.StatusScreen on the display.

hold_pins_for_sleep([display_powered])

Hold pin levels during deep sleep, where they would float otherwise.

usb_volts(pin, divider)

Measure the USB supply through a divider on pin.

usb_power(pin, divider)

Tell whether USB power is present: True, False, or None without a divider.

wake_on_usb(pin)

Wake from deep sleep once USB power reaches the divider on pin.

Module Contents

board.I2C_POWER_PIN = 7
board.SDA_PIN = 3
board.SCL_PIN = 4
board.I2C_FREQ = 100000
board.EPD_SCK_PIN = 36
board.EPD_MOSI_PIN = 35
board.EPD_CS_PIN = 10
board.EPD_DC_PIN = 9
board.EPD_RST_PIN = 6
board.EPD_BUSY_PIN = 5
board.EPD_PWR_PIN = 11
board.EPD_SPI_BAUDRATE = 4000000
board.init_i2c()

Switch on I2C power and return the bus.

board.init_display()

Return the e-paper driver (not yet initialised, see EPD.init).

board.status_screen()

Return a statusscreen.StatusScreen on the display.

board.NEOPIXEL_POWER_PIN = 21
board.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.

Parameters:

display_powered – Whether the display keeps its supply in sleep.

board.USB_PRESENT_VOLTS = 4.0
board.usb_volts(pin, divider)

Measure the USB supply through a divider on pin.

Parameters:
Returns:

The USB voltage in volts, or None without a divider.

board.usb_power(pin, divider)

Tell whether USB power is present: True, False, or None without a divider.

board.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).