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 file is part of ttymidi. | |
| ttymidi is free software: you can redistribute it and/or modify | |
| it under the terms of the GNU General Public License as published by | |
| the Free Software Foundation, either version 3 of the License, or | |
| (at your option) any later version. | |
| ttymidi is distributed in the hope that it will be useful, | |
| but WITHOUT ANY WARRANTY; without even the implied warranty of |
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 | |
| """ | |
| Send random notes to the output port. | |
| """ | |
| from __future__ import print_function | |
| import sys | |
| import time | |
| import random | |
| import mido | |
| import threading |
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 <WiFi.h> | |
| #include <WiFiUdp.h> | |
| WiFiUDP udp; | |
| const char * ssid = "SSID"; | |
| const char * password = "PASS"; | |
| boolean connected = false; | |
| void setup() | |
| { |
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
| // w for Fwd | |
| // | |
| // A simple Teensy based USB keyboard that associats some kind of | |
| // physical motion event to a 'w' press. This can be used to advance Google StreetView | |
| // for an interactive exercise experience (Example here: https://www.instagram.com/p/CF-xVWgJiFK/) | |
| // | |
| // Must select the "SERIAL+KEYBOARD..." mode under "USB TYPE" for the Teensy! | |
| // | |
| // This version uses a Sharp IR sensor (or equivalent), connected to A9 pin of a Teensy 3.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
| from __future__ import print_function | |
| import os.path | |
| from googleapiclient.discovery import build | |
| from google_auth_oauthlib.flow import InstalledAppFlow | |
| from google.auth.transport.requests import Request | |
| from google.oauth2.credentials import Credentials | |
| from datetime import datetime | |
| from random import randint | |
| from time import sleep | |
| from sds011 import SDS011 |
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 sds011 import SDS011 | |
| from datetime import datetime | |
| import time | |
| #CH340G adapters seem to give port names | |
| #based on which port you plug them into: | |
| s1 = SDS011("/dev/tty.wchusbserial1410") #Left USB Port | |
| s2 = SDS011("/dev/tty.wchusbserial1420") #Right USB Port | |
| def read_sensor(): |
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
| //Parametric Bellow designed for blowing out grinds in an espresso grinder | |
| // Designed to be printed using TPU | |
| // Tested on Ender 3 Pro (2019) with stock extruder and 91A TPU from filaments.ca | |
| // 15mm all speeds 2mm retraction @ 15mm/s. 75C bed 230/227C extruder temps | |
| // 3 shell perimeter | |
| // | |
| // johntywang@gmail.com | |
| // May 2021, Released under CC BY-SA 2.0 (http://creativecommons.org/licenses/by-sa/2.0/) | |
| echo(version=version()); |
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
| { | |
| "boxes" : [ { | |
| "box" : { | |
| "maxclass" : "comment", | |
| "text" : "Autosave and query of current file size", | |
| "linecount" : 2, | |
| "numoutlets" : 0, | |
| "id" : "obj-38", | |
| "patching_rect" : [ 568.0, 191.5, 150.0, 34.0 ], | |
| "style" : "", |
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 urllib.request #talks to an ESP32 running this code: https://github.com/johnty/BBQProbe/tree/main/thermocouple_esp32 | |
| contents = urllib.request.urlopen("http://192.168.1.65").read().decode() #find IP address and put it here... | |
| f_string = contents.split("/")[2] #first / is for </head>, second / is between the C and F readings ;) | |
| f_vals = f_string.split(); # split again based on spaces, result should be the F value string only. | |
| print(f_vals[0]) |
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
| uint8_t midiPacket[15] = { | |
| 0b10000000, // header | |
| 0b10000000, // timestamp, not implemented | |
| 0b00000000, // status byte | |
| 21, | |
| midi.mapMIDI(abs(imu.getAccelX()), 0, 50));// CC 021 (0b00010101) (for X-axis accelerometer) | |
| 22, | |
| midi.mapMIDI(abs(imu.getAccelY()), 0, 50));// CC 022 (0b00010110) (for Y-axis accelerometer) | |
| 23, | |
| midi.mapMIDI(abs(imu.getAccelZ()), 0, 50));// CC 023 (0b00010111) (for Z-axis accelerometer) |
NewerOlder