This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SPDX-FileCopyrightText: 2025 anecdata | |
# SPDX-License-Identifier: MIT | |
import time | |
import random | |
import storage | |
import board | |
import busio | |
import asyncio | |
import adafruit_pio_uart |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# PIO UART pin finder | |
# modified from an old SPI pin finder, probably _somewhere_ in the Adafruit docs | |
# PIO UART doesn't require sequential pins, and pins don't have to be associated with a particular peripheral | |
# But... ValueError: Cannot use GPIO0..15 together with GPIO32..47 | |
import board | |
import busio | |
from microcontroller import Pin | |
import adafruit_pio_uart |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SPDX-FileCopyrightText: 2025 anecdata | |
# SPDX-License-Identifier: MIT | |
# Pimoroni Pico Plus 2W | |
# connected via Adafruit Proto Doubler PiCowbell to | |
# WIZnet W5500-EVB-Pico2 with WIZPOE-P1 | |
# https://fosstodon.org/@anecdata/115115735846073971 | |
# code is a simplified version of https://gist.github.com/anecdata/456524f8e38c207931afd0dedf6bec89 | |
import time |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
import random | |
import os | |
import wifi | |
import socketpool | |
import asyncio | |
NUM_CLIENTS = 4 | |
NUM_SERVERS = 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SPDX-FileCopyrightText: 2025 anecdata | |
# SPDX-License-Identifier: MIT | |
# async ESP-NOW Receiver with Ethernet Requests | |
import time | |
import traceback | |
import board | |
import busio | |
import digitalio | |
import espnow |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SPITarget pin finder | |
# e.g., SPITarget(sck=board.D12, mosi=board.D13, miso=board.D11, ss=board.D10) | |
# modified from an old SPI pin finder, probably _somewhere_ in the Adafruit docs | |
import board | |
import busio | |
from microcontroller import Pin | |
from spitarget import SPITarget |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SPDX-FileCopyrightText: 2025 anecdata | |
# SPDX-License-Identifier: MIT | |
# SSIDNet™️ message sender | |
import time | |
import random | |
import math | |
import binascii | |
import traceback |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
EOM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# atmel-samd i2ctarget (only reads): | |
import time | |
import binascii | |
import board | |
import busio | |
from i2ctarget import I2CTarget | |
I2C_ADDRESS = 0x40 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import board | |
import terminalio | |
import displayio | |
import bitmaptools | |
import math | |
from adafruit_display_text import bitmap_label | |
text_area = bitmap_label.Label(terminalio.FONT, x=25, y=25, text="Hello world") | |
roto_text_area = displayio.Bitmap(100, 100, 2) | |
bitmaptools.rotozoom(roto_text_area, text_area.bitmap, angle=math.pi/4) |
NewerOlder