Skip to content

Instantly share code, notes, and snippets.

View kasperkamperman's full-sized avatar

Kasper Kamperman kasperkamperman

View GitHub Profile
void setup()
{
size(500,500);
strokeWeight(2);
}
void draw()
{ background(128);
rotateRect(width/2,height/2,100,100,frameCount%360);
@kasperkamperman
kasperkamperman / audiovisualize.pde
Created June 29, 2017 13:05
AudioVisualiseExample
import processing.sound.*;
Amplitude amp;
AudioIn in;
float previousVolume = 0.0;
void setup() {
size(640, 640);
background(255);
@kasperkamperman
kasperkamperman / CommaSeparatedMessageListener.cs
Last active June 12, 2017 19:19
Quick Example how to read comma separated strings in Unity with SerialCommUnity.
// Code example for this Code:
// https://github.com/DWilches/SerialCommUnity
//
// Below the modified SampleMessageListener to show how to parse comma separated strings
// Start with DemoSceneAutoPoll
/**
* SerialCommUnity (Serial Communication for Unity)
@kasperkamperman
kasperkamperman / fxaa.glsl
Created May 12, 2017 10:31
Port of fxaa.glsl code from Reinder Nijhoff to Processing
// Created by Reinder Nijhoff 2016
// @reindernijhoff
//
// https://www.shadertoy.com/view/ls3GWS
// FXAA code from: http://www.geeks3d.com/20110405/fxaa-fast-approximate-anti-aliasing-demo-glsl-opengl-test-radeon-geforce/3/
//
// ported to work in Processing by Kasper Kamperman.com
#define FXAA_SPAN_MAX 8.0
#define FXAA_REDUCE_MUL (1.0/FXAA_SPAN_MAX)
@kasperkamperman
kasperkamperman / graduationblog.md
Last active March 19, 2017 08:57
Graduating with a blog

Graduation with a blog (pilot)

  • Homepage with introduction person, training, graduation and business thesis topic.
  • On the homepage the division into categories must be equal visible.
  • Not all areas of interest to the client, so we distinguish between tabs and tabs for clients teacher.

Categories for the "customer"/general reader (Pages)

This are the items in the menu bar on top.

@kasperkamperman
kasperkamperman / sk9822_gbc_compare.ino
Last active November 17, 2016 21:14
First prototype sketch to find equal values of GBC and normal values.
/*
First try to match SK9822 GBC with RGB values.
Based on the test code of Louis Beaudoin.
The difference is best visible in the green color. Probably because our eye is more sensitive for green?
SK9822 high brightness green tends more to lime color (instead of the APA102 green).
I tried to match them (just GBC 15 and finding a similar rgb value on GBC 31). It's not possible.
GBC controlled pixels seem more lime, while without GBC they are more blueish green.
@kasperkamperman
kasperkamperman / tembooGoogleSpreadSheetExample.pde
Created June 23, 2016 21:23
The Temboo Save To Spreadsheet tutorial example (https://temboo.com/processing/save-to-spreadsheet) has an error, this example corrects it:
/* FIX for Temboo Save Mouse Click position tutorial
https://temboo.com/processing/save-to-spreadsheet
The example given doesn't work because it's missing the ClientId, ClientSecret and the RefreshToken
I've added them in this example below.
See appendRow for all the things you can add (the fields you can fill in):
https://temboo.com/library/Library/Google/Spreadsheets/AppendRow/
Of course you have to fill in your own credentials. To obtain them, just follow the tutorial steps.
@kasperkamperman
kasperkamperman / drawTest.pde
Created June 22, 2016 20:23
Processing concept with a concept to draw on.
//https://processing.org/reference/clear_.html
// we use a canvas (PGraphics) to draw on.
// in this case we can erase it (now with keypress)
// and we can display our "pen" without that it draws itself on the canvas.
PGraphics canvas;
color selectedColor;
@kasperkamperman
kasperkamperman / glitch.pde
Created June 21, 2016 10:43
Happy OpenCV Glitch accident
/*
Happy Glitch accident:
http://giphy.com/gifs/fTGmbedzRZfLq
Uses the OpenCV for Processing library:
https://github.com/atduskgreg/opencv-processing
*/
import processing.video.*;
@kasperkamperman
kasperkamperman / microphoneSoundLevel.ino
Created June 1, 2016 15:21
read a soundsensor and calibrate the volume.
/* script to calibrate (sound level normalizing) a microphone (or other sensor).
used with Sound Sensor v2.0 from flamingoeda.com / electronic bricks
sampling based on Arduino Cookbook recipe "detecting sound" chapter 6.7
dim_curve idea by Jims <http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1174674545>
created 7 september 2011 Kasper Kamperman
http://www.kasperkamperman.com
This example code is in the public domain.
*/