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 | |
| 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 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 | |
| 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 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
| # 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 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 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) |
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 network | |
| import urequests | |
| import json | |
| import time | |
| from machine import Pin | |
| from secrets import secrets | |
| import machine | |
| import neopixel | |
| print("starting connection") |
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 board | |
| import touchio | |
| from digitalio import DigitalInOut, Direction, Pull | |
| import usb_hid | |
| from adafruit_hid.keyboard import Keyboard | |
| from adafruit_hid.keyboard_layout_us import KeyboardLayoutUS | |
| from adafruit_hid.keycode import Keycode | |
| touch_pad_z = board.GP2 |
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
| #Note this is in Micropython not circuit python as circuit python doesn't give enough control over the state machines. | |
| from machine import Pin, ADC | |
| import array | |
| from rp2 import PIO, StateMachine, asm_pio | |
| import uctypes | |
| from uctypes import BF_POS, BF_LEN, UINT32, BFUINT32, struct | |
| from math import floor, ceil | |
| from time import sleep |
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
| from machine import Pin, ADC | |
| import array | |
| from rp2 import PIO, StateMachine, asm_pio | |
| import uctypes | |
| from uctypes import BF_POS, BF_LEN, UINT32, BFUINT32, struct | |
| from math import floor, ceil | |
| from time import sleep | |
| import _thread | |
| import gc |
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
| from machine import Pin, ADC | |
| import array | |
| from rp2 import PIO, StateMachine, asm_pio | |
| import uctypes | |
| from uctypes import BF_POS, BF_LEN, UINT32, BFUINT32, struct | |
| from math import floor, ceil | |
| from time import sleep | |
| import _thread | |
| import gc |
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
| # Write your code here :-) | |
| import time | |
| import digitalio | |
| import board | |
| import touchio | |
| on_off = True | |
| led = digitalio.DigitalInOut(board.GP0) | |
| led.direction = digitalio.Direction.OUTPUT |