Skip to content

Instantly share code, notes, and snippets.

View ceiborg's full-sized avatar

ceiborg ceiborg

View GitHub Profile
@ceiborg
ceiborg / gist:41f5bb97be0c1c97dd191d5b7b102b14
Created March 17, 2024 23:41
Configure Arduino devices on manjaro
1. add a dev rule for usb serial devices:
# /etc/udev/rules.d/01-ttyusb.rules
SUBSYSTEMS=="usb-serial", TAG+="uaccess", MODE="0666"
2. reload rules
sudo udevadm control --reload
3. add yourself to uucp group
sudo usermod -aG uucp $USER
@ceiborg
ceiborg / laser.sh
Created September 22, 2020 22:47
Laser desde la terminal
~/.yarn/bin/cncjs
@ceiborg
ceiborg / ffmpeg_instagram.sh
Created September 12, 2020 17:16
Como convertir un webm de photomosh para instagram
ffmpeg -i nombredelarchivooriginal.webm -r 30 -vf scale=1080:1080 -c:v libx264 -pix_fmt yuv420p nombredearchivonuevo.mp4
@ceiborg
ceiborg / piano.ino
Created September 5, 2020 01:19
Almohadón Musical (Tutorial YouTube)
Joe Marshall 2011
// Resonant filter based on Meeblip (meeblip.noisepages.com)
// Interrupt setup code based on code by Martin Nawrath (http://interface.khm.de/index.php/lab/experiments/arduino-dds-sinewave-generator/)
// oscillators and inline assembler optimisation by me.
//
// key input is from 8 capacitive inputs on digital input 6,7, and analog inputs 0-6
// each input is a single wire, going to something metal to touch
// (I used a bunch of big carriage bolts)
//
// sensing of this is done by getNoteKeys, using the method described at:
#include "FastLED.h"
#define NUM_LEDS 7
CRGB leds[NUM_LEDS];
#define PIXELLED 6
float v=0;
float rate= 0.01f;
float c=0;
int button = 3;
/*
#############%@
#### #########%
## #########&
#% ##########
### ############
################### ceiborg.com
################### tecnotextiles
##################
#################
r = 0
navigator.requestMIDIAccess().then(midi => {
for (var input of midi.inputs.values())
input.onmidimessage = (e) => {r = e.data[2]}
})
osc(()=>r,0,0).out()
@ceiborg
ceiborg / custom_capsense.ino
Created March 15, 2020 23:15
Custom Capsense with FastLed and Low Pass filters
#include "FastLED.h"
#define NUM_LEDS 9
CRGB leds[NUM_LEDS];
#define PIXELLED 6
float minHue = 1.0f;
float maxHue = 1.0f;
float hue =0.0f;
#define resolution 8
@ceiborg
ceiborg / IIRfilter.ino
Created March 14, 2020 23:46
IIR Filter - Low f.
void setup() {
Serial.begin(9600);
}
int v = 0;
void loop() {
int c = analogRead (A0);
Serial.print(c);
@ceiborg
ceiborg / hydra-midi.js
Created March 5, 2020 00:32
como recibir MIDI en Hydra
r = 0
g = 0.4
b = 0.3
solid(()=>r,()=>g,()=>b).out()
onmsg = (ev) => {
let note = ev.data[1]