Show Posts
Pages: [1]
1  Using Arduino / General Electronics / Re: LDR values -> MIDI information.. Voltage/Resistor/Code problem? on: April 01, 2011, 08:30:17 am
Sorry, new to the forum. Won't happen again!
2  Using Arduino / Project Guidance / Re: LDR values -> MIDI information.. Voltage/Resistor/Code problem? on: April 01, 2011, 08:29:25 am
PS

I apologise about the bad quality of the photo, only have a rubbish phone camera at hand..
3  Using Arduino / Project Guidance / Re: LDR values -> MIDI information.. Voltage/Resistor/Code problem? on: April 01, 2011, 08:28:02 am
Cheers for the reply
 
int vpin = 2;
const int analogInPin1 = A0;
// Analog input pin that the potentiometer is attached to
const int analogInPin2 = A1;


int sensorValue1 = 0;        // value read from the pot
int outputValue1 = 0; 
int sensorValue2 = 1;
int outputValue2 = 1;      // value output to the PWM (analog out)

void setup() {
  // initialize serial communications at 9600 bps:
  Serial.begin(9600);
  pinMode(vpin, OUTPUT);
}

void loop() {
  digitalWrite(vpin, HIGH);
  // read the analog in value:
  sensorValue1 = analogRead(analogInPin1);
  sensorValue2 = analogRead(analogInPin2); 

  // print the results to the serial monitor:
  Serial.print("sensor1 = " );                       
  Serial.print(sensorValue1);     
  Serial.print("\t output = ");   
  Serial.println(outputValue1);   
 

  Serial.print("sensor2 = " );                       
  Serial.print(sensorValue2);     
  Serial.print("\t output = "); 
  Serial.println(outputValue2);   
 
 
  // wait 10 milliseconds before the next loop
  // for the analog-to-digital converter to settle
  // after the last reading:
  delay(10);                     
}
4  Using Arduino / General Electronics / LDR values -> MIDI information.. Voltage/Resistor/Code problem? on: April 01, 2011, 08:14:36 am
Hello, this is our first post on the forum although we have browsed for a while..

We are currently producing a circuit that takes the values from LDRs on the circuit and maps them to different controls of a synthesiser (for example pitch, volume etc)

However in the initial stages we are having trouble with the readings from the LDR, we have set up 2 LDRs at the moment to test. On 1 of the LDRs, when the resistor is being covered the value increases, it is the opposite on the other.

Could anybody shed some light on this situation and how we could make both of the values coming from the LDRs read the same?


Thanks in advance  smiley
5  Using Arduino / Project Guidance / LDR values -> MIDI information.. Voltage/Resistor/Code problem? on: April 01, 2011, 08:12:53 am
Hello, this is our first post on the forum although we have browsed for a while..

We are currently producing a circuit that takes the values from LDRs on the circuit and maps them to different controls of a synthesiser (for example pitch, volume etc)

However in the initial stages we are having trouble with the readings from the LDR, we have set up 2 LDRs at the moment to test. On 1 of the LDRs, when the resistor is being covered the value increases, it is the opposite on the other.

Could anybody shed some light on this situation and how we could make both of the values coming from the LDRs read the same?


Thanks in advance smiley
Pages: [1]