BPI-PicoW-S3 on, off, blink LED [CircuitPython]

BPI-Pico-S3%20CircuitPython

BPI-Pico-S3 is the same size as Raspberry Pi Pico board, equipped with ESP32S3 chip, 8M flash, 4-layer PCB, electroplated half-hole process, ceramic antenna, supports 2.4 GHz Wi-Fi and Bluetooth® LE dual-mode wireless communication, is a A development board designed for IoT development and Maker DIY.

TinyUF2 + CircuitPython is built-in at the factory. It is recommended to use Mu Editor to get started with CircuitPython development.

YouTube

Hardware interface

4-IO

Make pins output high or low level, control the LED

  1. board.LED controls a single-color LED on PicoW-S3, high level is on, low level is off, enter the following code in the REPL:
import board
import digitalio
ledpin = digitalio.DigitalInOut(board.LED)
ledpin.direction = digitalio.Direction.OUTPUT
ledpin.value = True
  1. Or:
import board
import digitalio
ledpin = digitalio.DigitalInOut(board.LED)
ledpin.switch_to_output(value=True) # value=1
  1. Make the LED blink every 0.5 seconds:
import board
import digitalio
import time
ledpin = digitalio.DigitalInOut(board.LED)
while True:
    ledpin.switch_to_output(value=1)
    time.sleep(0.5)
    ledpin.switch_to_output(value=0)
    time.sleep(0.5)
  1. Use the KeyboardInterrupt(ctrl+c) in REPL to stop the running of the program.

  2. Enter import board;help(board) in the REPL interface of the Mu editor to list all controllable pins.

>>> import board;help(board)
object <module 'board'> is of type module
  __name__ -- board
  board_id -- bpi_picow_s3
  GP0 -- board.GP0
  GP1 -- board.GP1
  GP2 -- board.GP2
  GP3 -- board.GP3
  GP4 -- board.GP4
  GP5 -- board.GP5
  GP6 -- board.GP6
  GP7 -- board.GP7
  GP8 -- board.GP8
  GP9 -- board.GP9
  GP10 -- board.GP10
  GP11 -- board.GP11
  GP12 -- board.GP12
  GP13 -- board.GP13
  GP14 -- board.GP14
  GP15 -- board.GP15
  GP16 -- board.GP16
  GP17 -- board.GP17
  GP18 -- board.GP18
  GP19 -- board.GP19
  GP20 -- board.GP20
  GP21 -- board.GP21
  GP22 -- board.GP22
  GP25 -- board.GP25
  LED -- board.GP25
  GP26 -- board.GP26
  GP26_A0 -- board.GP26
  A0 -- board.GP26
  GP27 -- board.GP27
  GP27_A1 -- board.GP27
  A1 -- board.GP27
  GP28 -- board.GP28
  GP28_A2 -- board.GP28
  A2 -- board.GP28
  GP29 -- board.GP29
  GP29_A3 -- board.GP29
  A3 -- board.GP29
  NEOPIXEL -- board.NEOPIXEL
  TX -- board.GP0
  RX -- board.GP1
  BOOT0 -- board.BOOT0
  UART -- <function>
>>>
  1. board.GP25 is exactly the same as board.LED.

BUY BPI-PicoW-S3

Related Pages

  1. BPI-Pico-S3 Getting Started, Code CircuitPython with Mu Editor;Control Neopixel

  2. BPI-PicoW-S3 install CircuitPython and TinyUF2 firmware