This file contains 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
#!/usr/bin/python3 | |
#Originally be Alasdair Allen (see below), modified by Ben Everard 2023 | |
# Copyright (c) 2022 Raspberry Pi Ltd | |
# Author: Alasdair Allan <[email protected]> | |
# SPDX-License-Identifier: BSD-3-Clause | |
# A TensorFlow Lite example for Picamera2 on Raspberry Pi OS Bullseye | |
# |
This file contains 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: 2023 John Park | |
# | |
# SPDX-License-Identifier: MIT | |
# Ambient Machine inspired by Yuri Suzuki https://www.yurisuzuki.com/projects/the-ambient-machine | |
import os | |
import gc | |
import board | |
import audiocore | |
import audiobusio | |
import audiomixer |
This file contains 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
#!/usr/bin/python3 | |
# Copyright (c) 2022 Raspberry Pi Ltd | |
# Author: Alasdair Allan <[email protected]> | |
# SPDX-License-Identifier: BSD-3-Clause | |
# A TensorFlow Lite example for Picamera2 on Raspberry Pi OS Bullseye | |
# | |
# Install necessary dependences before starting, | |
# |
This file contains 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
const uint32_t blink[][4] = { | |
{ | |
0xf036c4f, | |
0x29f94f23, | |
0x6c0f0000, | |
66 | |
}, | |
{ | |
0xf03cc5e, | |
0x2bf15e23, |
This file contains 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
[{"matrix":[[0,0,0,0,1,1,1,1,0,0,0,0],[0,0,1,1,0,1,1,0,1,1,0,0],[0,1,0,0,1,1,1,1,0,0,1,0],[1,0,0,1,1,1,1,1,1,0,0,1],[0,1,0,0,1,1,1,1,0,0,1,0],[0,0,1,1,0,1,1,0,1,1,0,0],[0,0,0,0,1,1,1,1,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0]],"duration":66,"selected":false},{"matrix":[[0,0,0,0,1,1,1,1,0,0,0,0],[0,0,1,1,1,1,0,0,1,1,0,0],[0,1,0,1,1,1,1,0,0,0,1,0],[1,0,1,1,1,1,1,1,0,0,0,1],[0,1,0,1,1,1,1,0,0,0,1,0],[0,0,1,1,1,1,0,0,1,1,0,0],[0,0,0,0,1,1,1,1,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0]],"duration":66,"selected":false},{"matrix":[[0,0,0,0,1,1,1,1,0,0,0,0],[0,0,1,1,0,1,1,0,1,1,0,0],[0,1,0,0,1,1,1,1,0,0,1,0],[1,0,0,1,1,1,1,1,1,0,0,1],[0,1,0,0,1,1,1,1,0,0,1,0],[0,0,1,1,0,1,1,0,1,1,0,0],[0,0,0,0,1,1,1,1,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0]],"duration":66,"selected":false},{"matrix":[[0,0,0,0,1,1,1,1,0,0,0,0],[0,0,1,1,0,0,1,1,1,1,0,0],[0,1,0,0,0,1,1,1,1,0,1,0],[1,0,0,0,1,1,1,1,1,1,0,1],[0,1,0,0,0,1,1,1,1,0,1,0],[0,0,1,1,0,0,1,1,1,1,0,0],[0,0,0,0,1,1,1,1,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0]],"duration":66,"selected":false},{"matrix":[[0,0 |
This file contains 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 | |
#from hx711.hx711_pio import HX711_PIO | |
from hx711.hx711_gpio import HX711_GPIO | |
import time | |
import usb_hid | |
from adafruit_hid.keyboard import Keyboard | |
from adafruit_hid.keyboard_layout_us import KeyboardLayoutUS | |
from adafruit_hid.keycode import Keycode | |
from digitalio import DigitalInOut, Direction, Pull |
This file contains 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 | |
from hx711.hx711_pio import HX711_PIO | |
import time | |
import usb_hid | |
from adafruit_hid.keyboard import Keyboard | |
from adafruit_hid.keyboard_layout_us import KeyboardLayoutUS | |
from adafruit_hid.keycode import Keycode | |
keyboard = Keyboard(usb_hid.devices) | |
keyboard_layout = KeyboardLayoutUS(keyboard) |
This file contains 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 | |
from hx711.hx711_pio import HX711_PIO | |
import time | |
print("initialising") | |
pin_data = board.GP2 | |
pin_clk = board.GP3 | |
hx1 = HX711_PIO(board.GP2, board.GP3, tare=True) | |
hx2 = HX711_PIO(board.GP6, board.GP7, tare=True) |
This file contains 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
# Write your code here :-) | |
import time | |
import board | |
from analogio import AnalogIn | |
import usb_hid | |
from adafruit_hid.keyboard import Keyboard | |
from adafruit_hid.keyboard_layout_us import KeyboardLayoutUS | |
from adafruit_hid.keycode import Keycode | |
bash_key = Keycode.SPACE |
This file contains 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 network | |
import urequests | |
import json | |
import time | |
from machine import Pin | |
from secrets import secrets | |
import machine | |
print("starting connection") | |
wlan = network.WLAN(network.STA_IF) |
NewerOlder