Read analog i/p 4m FSR (Force Sensitive Resistor)and O/p Audio- Sync Problem

Hello All,

I am currently integrating an FSR to my Arduino UNO. I am successful with the two things below

  1. Read the FSR input from Analog input pin0.
  2. Output Audio using PWM pin 9.

Now i need to do some audio effects based on the FSR input. but when i integrate both, i am not successful. kindly provide me some pointers asap.

Below is the sample code :

void loop(){

fsrReading = analogRead(fsrPin);
Serial.print("Analog reading = ");
Serial.println(fsrReading); // the raw analog reading
delay(1000);
audioHook(); // required here

}

Thanks a lot in advance :slight_smile:

What do you mean by 'audio output'? What hardware is connected to your proposed output pin, and what sort of signal does it require? If you haven't designed this part yet, consider using a voice shield.

What is audioHook()?

Is fsrReading declared as a global variable?

Are you getting any errors?

I don't see anything wrong with what you show us, but there is a lot missing that is probably important. Is the Serial link set up correctly? How is audioHook using fsrReading?

Steve