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
#!/usr/bin/env python | |
# | |
# This is a revised version from https://github.com/pyserial/pyserial/pull/566. | |
# | |
# This is a module that gathers a list of serial ports including details on OSX | |
# | |
# code originally from https://github.com/makerbot/pyserial/tree/master/serial/tools | |
# with contributions from cibomahto, dgs3, FarMcKon, tedbrandston | |
# and modifications by cliechti, hoihu, hardkrash | |
# |
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 | |
from adafruit_magtag.magtag import MagTag | |
magtag = MagTag() | |
magtag.network.connect() | |
key = "fontaine-status" | |
latest_id = "" |
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
(* | |
loosely based on "Unquarantine" by Henrik Nyh <http://henrik.nyh.se/2007/10/lift-the-leopard-download-quarantine> | |
This Folder Action handler is triggered whenever items are added to the attached folder. | |
It gets rid of Leopard's annoying "this application was downloaded from the Internet" warnings by stripping the "quarantine" property. | |
Now also runs as a droplet or a standalone application if, like me, you juste need sometimes to stop the madenning dialog to appear for every file of a downloaded (unzipped) zip archive. | |
*) | |
on adding folder items to thisFolder after receiving addedItems | |
my unQuarantine(addedItems) |
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
""" | |
This is a test for an error on the Sparkfun SerLCD | |
> OSError: [Errno 19] Unsupported operation | |
Tested on: | |
- QT PY RP2040 using the STEMMA QT port | |
- SparkFun 16x2 SerLCD - RGB Backlight (Qwiic) | |
The errors seems to happen when many writes are done in fast succession. | |
DELAY = 0 -> Almost always errors at a seemingly random number of characters. |
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 json | |
liste = set() | |
def print_once(text): | |
global liste | |
if text not in liste: | |
liste.add(text) | |
print(text) | |
def compare_files(oldfile_name,newfile_name): |
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 analogio import AnalogIn | |
from digitalio import DigitalInOut,Pull | |
from simpleio import map_range | |
import tasko | |
# LED to blink | |
led = DigitalInOut(board.LED) | |
led.switch_to_output() |
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
# https://github.com/adafruit/circuitpython-build-tools/ | |
echo "don't run this script, it's more a list of commands to copy and paste as you need them" | |
exit 1 | |
# installing the repositories, run only once | |
gh repo clone adafruit/Adafruit_CircuitPython_Bundle | |
cd Adafruit_CircuitPython_Bundle | |
git submodule init |
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 time | |
from analogio import AnalogIn | |
from digitalio import DigitalInOut,Pull | |
from simpleio import map_range | |
from neopixel import NeoPixel | |
# LED to blink | |
led = DigitalInOut(board.LED) | |
led.switch_to_output() |
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
AtoQ = { | |
"0" : ")", | |
"1" : "!", | |
"2" : "@", | |
"3" : "#", | |
"4" : "$", | |
"5" : "%", | |
"6" : "^", | |
"7" : "&", | |
"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
# The MIT License (MIT) | |
# | |
# Copyright (c) 2017 Dan Halbert | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: |