Arduino101-LFP

From XPUB & Lens-Based wiki
Revision as of 23:20, 30 September 2019 by Ddebel (talk | contribs)

Specific Arduino Primer for Meergranen

Interfacing

Basics

Exercise 1: in groups of two, needed:

  • Two Meergranen playing a sample.

Hook up the Output of one Meergranen to any of the Analog Inputs jacks (see below) on the other Meergranen. Tweak the Potentiometers, What happens?

Meergranen-functions.jpg In and outputs of the Meergranen module. Use the output ONLY as output!



Exercise 2: 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)

Arduino-neighbour.JPG Example of hooking up.

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)?