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 openai | |
import pygments | |
from pygments import highlight | |
from pygments.formatters import TerminalFormatter | |
from pygments.lexers import get_lexer_by_name | |
def colored(r, g, b, text): | |
return f"\033[38;2;{r};{g};{b}m{text}\033[0m" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
#include <stdio.h> | |
#include "hardware/clocks.h" | |
#include "hardware/pio.h" | |
#include "hardware/timer.h" | |
#include "main.pio.h" | |
#include "pico/stdlib.h" | |
#define START_PIN 10 | |
#define ROW_PINS 4 |
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 mido | |
import random | |
import numpy as np | |
# List all available MIDI ports | |
print("Available MIDI ports:") | |
for port in mido.get_input_names(): | |
print(port) | |
for port in mido.get_output_names(): |
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 | |
from time import sleep | |
from math import sqrt | |
pin = Pin(26) | |
adc = ADC(pin) | |
val = 0 | |
margin = (2**8) |
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
# QMC6309 3D Hall Sensor Micropython Library sketch | |
from machine import I2C, Pin, SoftI2C | |
from micropython import const | |
import ustruct | |
import utime | |
class QMC6310: |
OlderNewer