Hello!
I tried implementing tune() function and it worked. This is the actual code:
/*
// include the library code:
#include <LiquidCrystal.h>
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);
void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
// Print a message to the LCD.
lcd.print("100Hz ");
tone(6, 100, 5000);
delay(5000);
lcd.print("1K ");
tone(6,1000,5000);
delay(5000);
lcd.print("5K ");
tone(6,5000,5000);
delay(5000);
lcd.print("10K");
tone(6,10000,5000);
delay(5000);
lcd.setCursor(0, 1);
lcd.print("20K");
//lcd.print("5.");
tone(6,20000,5000);
delay(5000);
}
void loop() {
// set the cursor to column 0, line 1
// (note: line 1 is the second row, since counting begins with 0):
lcd.setCursor(4, 1);
// print the number of seconds since reset:
lcd.print("Terminat");
}
Moderator edit: quote tags exchanged for code tags
I output the 5 frequencies on pin number 6 (7-12 are busy with the LCD). Pin 6 is connected to a simple Wheatstone bridge, which measures the resistance of the human body (whith two electrodes placed on the skin). I measure the output of the bridge with an oscilloscope or with a multimeter set on AC. I would like to do this measurements with the Arduino itself, using other pin as input. Is that possible/difficult? I read that you cannot read anything with your Arduino while using the delay() function. So, as pin 6 outputs a certain frequency, I would like the Arduino to read a certain AC voltage and, eventually, write it in a text file.
I would be appreciative for any sugestions.
Thank you!