Skip to content

Instantly share code, notes, and snippets.

🤖
Flow?

Rodolfo todocono

🤖
Flow?
Block or report user

Report or block todocono

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:fd8a39448abc4545c4d594faeae9f4e1
/* IxLab 2020S - NYU Shanghai
* coded in class
* Ideas to practice:
*
* - make it move
* - add several other balls
* - have different ball colors
*/
class Ball {
View NYUSH2020S_9_objects
/* IxLab 2020S - NYU Shanghai
* coded in class
* Ideas to practice:
*
* - make it move
* - add several other balls
* - have different ball colors
*/
class Ball {
View NYUSH2020S_9_ArduinoDrawingMachine.ino
/*
* NYU Shanghai - Interactive Media Arts
* 2020 Spring
* This code was prepared for Interaction Lab
* A simple drawing machine
*
* It is based on "Controlling a servo" by Michal Rinott <http://people.interaction-ivrea.it/m.rinott>
* the modifications by Scott Fitzgerald http://www.arduino.cc/en/Tutorial/Knob
*/
View NYUSH2020S_6_serialCommunicationGame.pde
/* IxLab 2020S - NYU Shanghai
* Coded in class 21 to introduce serial communication with multiple variables
* Ideas for exercises to practice:
* add a start button
* make an LED turn on when it's game over
* This code uses sources such as:
* Based on the readStringUntil() example by Tom Igoe
* https://processing.org/reference/libraries/serial/Serial_readStringUntil_.html
* Serial Communication Example by Jiwon at NYUSH IMA
* https://wp.nyu.edu/shanghai-ima-interaction-lab/
View NYUSH2020S_8_ArduinoPotAnalogLEDSerial.ino
/*
IxLab 2020S - NYU Shanghai
recorded during class 18 - Programming Arduino
Ideas for exercises to practice:
get creative with the application of the map function
change the pin number of the components
add a second potentiometer
Based on AnalogReadSerial - http://www.arduino.cc/en/Tutorial/AnalogReadSerial
View NYUSH2020S_7_ArduinoPotBtnLedSerial.ino
/*
*
* IxLab 2020S - NYU Shanghai
* recorded during class 17 - Digital & Analog
* Ideas for exercises to practice:
* try changing the logic: the button controls the time; the potentiometer controls if it works or not
* change the pin number of the components
* add a second LED
*
* Based on AnalogReadSerial - http://www.arduino.cc/en/Tutorial/AnalogReadSerial
View NYUSH2020S_6_arrays.pde
/* IxLab 2020S - NYU Shanghai
* recorded to introduce concepts
* Ideas for exercises to practice:
* make the balls have different size
* make the balls appear if you press a key
* make them vanish if certain time elapsed
*/
float[] x; //positions X
View NYUSH2020S_5_arrays.pde
/* IxLab 2020S - NYU Shanghai
* recorded to introduce concepts
* Ideas for exercises to practice:
* Add a third ball bouncing
* Make the size different for dif. balls
* Make the color different for dif. balls
*/
float[] x; //position of the ball 1
View NYUSH2020S_4_arrays
/* IxLab 2020S - NYU Shanghai
* recorded to introduce concepts
* Ideas for exercises to practice:
* Add a third ball bouncing
* Make the size different for dif. balls
* Make the color different for dif. balls
*/
float x1, y1; //position of the ball 1
View NYUSH2020S_4_millisIfMapReview.pde
/* IxLab 2020S - NYU Shanghai
* Example to review how to use millis(), map() and if else
* Ideas for exercises to practice:
* change the map values
* add other animations with the background that include colors
* add a bouncing ball
*/
void setup() {
size(500, 500);
You can’t perform that action at this time.