I've got a circuit set up, I've taken some pictures because I've no means to create a circuit diagram.
I made this EXACT circuit a week ago and it worked flawlessly; but now I'm trying to make it again and it does not work; all I get is garbled text, mainly question marks and solid blocks of black; the verifier shows no errors; all wires work.
I don't think I've done anything wrong, but I've built and rebuilt the circuit and received the same issue
Can anyone see anything wrong?
#include <SoftwareSerial.h>
#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
// rfid settings
SoftwareSerial RFIDSerial(8, 6);
int RFIDResetPin = 7;
char RFIDtag[14];
int RFIDindex = 0;
boolean RFIDreading = false;
// define tag id and tracks
#define NUMTAGS 5
char audiotags[NUMTAGS][14] = {"30008C4234CA",
"310022F6D93C",
"310023030F1E",
"31002304392F",
"340023030B1A"};
// make sure soundfile names are not longer then 8 chars (without filetype)
char audiofiles[NUMTAGS][16] = {"this is letters",
"this",
"is",
"a",
"test"};
void setup() {
Serial.begin(9600);
lcd.begin(16, 2);
lcd.print("System Ready");
delay(1000);
lcd.clear();
// pin13 LED
pinMode(13, OUTPUT);
// rfid setup
pinMode(RFIDResetPin, OUTPUT);
digitalWrite(RFIDResetPin, HIGH);
RFIDSerial.begin(9600);
}
void loop() {
RFIDindex = 0;
// rfid data?
while(RFIDSerial.available()) {
int readByte = RFIDSerial.read();
if(readByte == 2) RFIDreading = true;
if(readByte == 3) RFIDreading = false;
if(RFIDreading && readByte != 2 && readByte != 10 && readByte != 13){
RFIDtag[RFIDindex] = readByte;
RFIDindex++;
}
}
// check tag and play track if tag id found
checkTag(RFIDtag);
// prepare for next read
clearTag(RFIDtag);
resetReader();
}
void resetReader() {
digitalWrite(RFIDResetPin, LOW);
digitalWrite(RFIDResetPin, HIGH);
delay(150);
}
void clearTag(char one[]) {
for(int i = 0; i < strlen(one); i++){
one = 0;
- }*
}
void checkTag(char tag[]) { - if(strlen(tag) == 0) return;*
- boolean matching = true;*
- // compare tag id*
- for(int a = 0; a < NUMTAGS; a++) {*
- matching = true;*
- for(int c = 0; c < 12; c++) {*
- if(tag*
```c - != audiotags[a][c]) {
matching = false;
break;
}
}
// in case of a match play the track
if(matching) {
lcd.setCursor(0, 0);
lcd.print(audiofiles[a]);
delay(5000);
lcd.clear();
break;
}
}
}
I can't draw a circuit diagram (i don't know how)
but here are some pictures
http://upurs.us/view/38616
http://upurs.us/view/38617
http://upurs.us/view/38615*
```