Skip to content

Instantly share code, notes, and snippets.

View todocono's full-sized avatar
🤖
Flow?

Rodolfo todocono

🤖
Flow?
View GitHub Profile
/*
Based on ReceiveSingleValue by Oliver Steele, 2020-2022
See more at https://osteele.github.io/Arduino_SerialRecord/
Arduino code
Programmed in class - Interaction Lab 2022Fall
This example code is in the public domain.
*/
/* This is a code example for Arduino, to be used on Recitation 7
You need to have installed SerialRecord and FastLED libraries.
It requires NeoPixel WS2812 at pin 3
Interaction Lab
IMA NYU Shanghai
2022 Fall
*/
#include "SerialRecord.h"
#include <FastLED.h>
/* This is a code example for Processing, to be used on Recitation 7
You need to have installed the SerialRecord library.
Interaction Lab
IMA NYU Shanghai
2022 Fall
*/
import processing.serial.*;
import osteele.processing.SerialRecord.*;
/*
ReceiveSingleValue w/NeoPixel
This code works on Processing (after installing SerialRecord there as well:
ONLY FOR PROCESSING:
import processing.serial.*;
import osteele.processing.SerialRecord.*;
Serial serialPort;
SerialRecord serialRecord;
int size = 100;
int l = 100;
int h = 200;
void setup() {
colorMode(HSB, 360, 100, 100);
size(800, 400);
drawPurpleTiles();
}
color m;
int brushSize = 50;
void setup() {
colorMode(HSB, 360, 100, 100);
size(800, 400);
drawTiles();
}
void draw() {
int x = 200;
int speed;
void setup() {
size(400, 800);
float r = random(2, 5);
speed = int(r);
noStroke();
}
int x = 200;
color c;
void setup() {
size(400, 800);
noStroke();
}
void draw() {
drawBackground();
//Exercise coded during class 09
//IMA
int buzzer = 8;
int led = 9; // the PWM pin the LED is attached to
int brightness = 0; // how bright the LED is
int fadeAmount = 5; // how many points to fade the LED by
int count;
/*
Finite state machine with
Ultrasound HC-SR04 with Cherokey 4WD.
Programmed by Rudi - NYU Shanghai
Date: 28 Sept 2022
This example code is in the public domain.