Hi all,
Im new here, and this is also my first Arduino project.
This is my setup:
- Arduino UNO
- Velleman Audio Shield
- LCD display 16x2
I want to use the ISD1700 library and LiquidCrystal library together. If i use only the ISD1700 library it works fine. If i use the LiquidCrystal library it also works fine. But if i want to use it together it doesn't work. I don't get an error in the Arduino program. This is my code:
//include
#include <LiquidCrystal.h>
#include <ISD1700.h>
ISD1700 chip(10);
// AUDIO
int vol=0; //volume 0=MAX, 7=min
int interval = 5000;
long tijd = 0;
boolean timerGestart = false;
// LCD
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
// Print a message to the LCD.
lcd.print("Print message");
Serial.begin(9600);
Serial.println("Sketch is starting up");
}
void loop() {
// put your main code here, to run repeatedly:
int value = analogRead(A0);
//value = map(value, 600, 950, 0, 255);
Serial.println(value);
// Turn off the display:
lcd.noDisplay();
delay(500);
// Turn on the display:
lcd.display();
delay(500);
if (value < 5 ) {
if (!timerGestart){
tijd = millis();
timerGestart = true;
}
if ((millis() - tijd) > interval) {
Serial.print("play");
chip.pu();
chip.play();
timerGestart = false;
}
} else if (value > 5) {
timerGestart = false;
}
}
I think the problem is something with ISD1700 chip (10); I think the libraries uses the same digital ports or something like that? I try to change the ports but then the code doen't work. Can somebody tell me how I can set this up so it can work together?
If my post is incomplete please let me know. This is my first project and i have no idea what information is needed to debug the problem.
Thanks a lot.