Text to Serial
in
Programming Questions
•
3 years ago
I've been trying to write a sketch which will allow me to read the current song playing in winamp from a text file (nowplaying.txt) and output it through usb to an arduino.
So far, the code i have returns the error on the "if" line : The type of the expression must be an array type but it resolved to String (keep in mind that i have yet to add the serial aspect)
So far, the code i have returns the error on the "if" line : The type of the expression must be an array type but it resolved to String (keep in mind that i have yet to add the serial aspect)
- String original;
- String current;
- PFont font;
- void setup() {
- font = loadFont("CourierNew36.vlw");
- size(400,400);
- String[] original = loadStrings("nowplaying.txt");
- }
- void draw() {
- String[] current = loadStrings("nowplaying.txt");
- if (!current[0].equals(original[0])) {
- original = current;
- print(original[0]);
- textFont(font);
- text(original[0],20,200);
- }
- }
1

)