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
""" | |
https://youtu.be/OCe36rvdrFI | |
""" | |
a = 0.0 | |
def setup(): | |
#size(640, 360, P3D) | |
fullScreen(P3D) |
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
/** | |
* Simple Read | |
* | |
* Slightly Modified from the Serial Example provided through the Ardunio IDE | |
* | |
* Read data from the serial port and change the color of a rectangle | |
* when a switch connected to a Wiring or Arduino board is pressed and released. | |
* This example works with the Wiring / Arduino program that follows below. | |
*/ |
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
''' | |
this python code will listen for serial messages, | |
and pass that trigger on to SonicPi (code below) as an OSC message, triggering a sound | |
''' | |
from pythonosc import osc_message_builder | |
from pythonosc import udp_client | |
import serial | |
import sys | |
import time |
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
#include <WebServer.h> | |
#include <WiFi.h> | |
#include <WiFiUdp.h> | |
//set up to connect to an existing network (e.g. mobile hotspot from laptop that will run the python code) | |
const char* ssid = "ssid"; | |
const char* password = "password"; | |
WiFiUDP Udp; | |
unsigned int localUdpPort = 4210; // port to listen on | |
char incomingPacket[255]; // buffer for incoming packets |
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
#include <WebServer.h> | |
#include <WiFi.h> | |
#include <WiFiUdp.h> | |
// the IP of the machine to which you send msgs - this should be the correct IP in most cases (see note in python code) | |
#define CONSOLE_IP "192.168.1.2" | |
#define CONSOLE_PORT 4210 | |
const char* ssid = "ESP32"; | |
const char* password = "12345678"; | |
WiFiUDP Udp; |
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
// DHT Temperature & Humidity Sensor | |
// Unified Sensor Library Example | |
// REQUIRES the following Arduino libraries: | |
// - DHT Sensor Library: https://github.com/adafruit/DHT-sensor-library | |
// - Adafruit Unified Sensor Lib: https://github.com/adafruit/Adafruit_Sensor | |
#include <Adafruit_Sensor.h> | |
#include <DHT.h> | |
#include <DHT_U.h> |
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 os | |
from typing import ItemsView | |
from construct.core import Switch | |
from mgz import header, body | |
from pprint import pprint | |
tc_building_id = 0 | |
total_time_until_castle_click = 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
Video demo and explanation here: https://youtu.be/CYUlLaxY4Xs |
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
{ | |
"patcher" : { | |
"fileversion" : 1, | |
"appversion" : { | |
"major" : 8, | |
"minor" : 1, | |
"revision" : 11, | |
"architecture" : "x64", | |
"modernui" : 1 | |
} |
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
# this code will read the touch values from the ESP32 and echo them on the command line | |
# you could do something else more interesting with these values (e.g. visualize/sonify) | |
# pip install pyserial | |
import serial | |
# change the port as necessary by your OS | |
ser = serial.Serial('/dev/ttyS8', 115200) | |
while(True): |
OlderNewer