Arduino101-LFP
Specific Arduino Primer for Meergranen
Basics
Exercise in groups of two, needed:
- One Meergranen playing a sample, below referred to as Meergranen (1)
- One Meergranen hooked up to a computer with Arduino IDE open. Below referred to as Meergranen (2)
Instead of sound output you can also send control voltage (approximately) from meergranen. Lets see how we can control Meergranen (1) by sending control voltage from Meergranen (2). On Meergranen (2) load the following code:
void setup() { pinMode(11, OUTPUT); //set pin 11 in output mode } // the loop function runs over and over again forever void loop() { digitalWrite(11, HIGH); // turn the PIN on (HIGH is the highest voltage level, 5v) delay(1000); // wait for a second digitalWrite(11, LOW); // turn the PIN off by making the voltage LOW (0v) delay(1000); // wait for a second }
This is the default LED Blink example, but instead of blinking the standard built-in LED, we send the voltage to the OUTPUT jack of Meergranen. Hook up the output (lower right jack) of Meergranen (2) any of the inputs of Meergranen (1) (NOT THE OUTPUT, this one is not protected against any incoming currents at all). Listen to the output of Meergranen (1) using headphones. What do you hear? What happens when you try other inputs (left side jacks) on Meergranen (1)?