Skip to content

Instantly share code, notes, and snippets.

@todbot
todbot / noise_square_code.py
Created February 9, 2023 20:36
Play with simplex noise in CircuitPython
# noise_square_code.py -- playing with simplex noise in CircuitPython
# 9 Feb 2023 - @todbot / Tod Kurt
# https://github.com/todbot/CircuitPython_Noise
# Uses Lolin ESP32-S2 Mini and 8x8 LED shield
# https://circuitpython.org/board/lolin_s2_mini/
#
import time
import board
import neopixel
import rainbowio
@jepler
jepler / 0000README.md
Last active March 13, 2024 15:09
Reading RP2040 BOOTSEL pin from code

It turns out you CAN read the pico BOOTSEL pin from software.

I became aware of this possibility after pimoroni tweeted that you could use the BOOTSEL button as a MIDI trigger on their upcoming "Tiny2040". We speculated whether there was a small HW circuit to accomplish this, or if it was SW only. Now I have the answer.

I was also heavily informed by the bootloader source, the body of the reading code is taken directly from there with adjusted timings.

The general idea:

  • Pressing the button applies a strong pull-down.
  • Normally after start-up, this pin is always being driven by the Pico's QSPI peripheral, so the button has no effect