Skip to content

Instantly share code, notes, and snippets.

View santolucito's full-sized avatar

Mark Santolucito santolucito

View GitHub Profile
"""
https://youtu.be/OCe36rvdrFI
"""
a = 0.0
def setup():
#size(640, 360, P3D)
fullScreen(P3D)
@santolucito
santolucito / readJoystickSwitch.pde
Created February 7, 2021 13:52
A simple pair of processing and arduino programs to send data back and forth
/**
* 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.
*/
@santolucito
santolucito / sonicPiSerial.py
Created February 8, 2021 14:37
Sonic Pi + Python + ESP32
'''
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
@santolucito
santolucito / dht11_esp32.ino
Created March 22, 2021 14:00
DHT-11 w/ ESP32
// 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>
@santolucito
santolucito / idletime.py
Created July 24, 2021 20:43
Age of Empires 2 TC Idle time calculator
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
@santolucito
santolucito / README
Last active October 14, 2021 20:41
Pressure sensor w/ Arduino + Processing
Video demo and explanation here: https://youtu.be/CYUlLaxY4Xs
@santolucito
santolucito / csvReader.maxpat
Created January 21, 2022 21:30
MaxMSP CSV Processor
{
"patcher" : {
"fileversion" : 1,
"appversion" : {
"major" : 8,
"minor" : 1,
"revision" : 11,
"architecture" : "x64",
"modernui" : 1
}
@santolucito
santolucito / reader.py
Last active February 22, 2022 00:38
ESP32 capacitive touch+ python
# 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):
@santolucito
santolucito / xmas.ino
Created April 14, 2022 14:12
xmas lights
// NeoPixel Ring simple sketch (c) 2013 Shae Erisson
// Released under the GPLv3 license to match the rest of the
// Adafruit NeoPixel library
#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
#include <avr/power.h> // Required for 16 MHz Adafruit Trinket
#endif
// Which pin on the Arduino is connected to the NeoPixels?
@santolucito
santolucito / test.py
Created November 1, 2022 02:28
blender example
import bpy
import random
bpy.ops.object.select_all(action='SELECT')
bpy.ops.object.delete()
from math import sin, pi
bpy.ops.object.empty_add()
cameraPath = bpy.context.active_object
cameraPath.keyframe_insert("location", frame=1)