below is the code I've used for well over a year...dediced I should upgrade now the program will not work or compile.
Timer timer2 = new Timer(10, new ActionListener() {
public void actionPerformed(ActionEvent e) {
serial.write('\r');
for(int i=0; i<16; i++)
{
radecArray[i]= serial.read();
}
radecString = new String(radecArray);
try {
processNexus(radecString);
} catch (PhidgetException exception) {
printError(exception.getErrorNumber(), exception.getDescription());
}
}
});
timer2.start();
The compile error I get is...
/home/pi/scopeDogFolder/scopedog/scopedog.java:323: error: incompatible types
radecArray[i]= serial.read();
^
required: char
found: byte[]
-------------------------------------------------------------------
Docs say read() returns a char and this was the case before the upgrade. It appears now to return a byte
How do I fix this???