Errore processing
In un progetto di un ECG in cui sto lavorando, nella parte processing escono alcuni errori:
Mi da’ i seguenti errori
poi in error
alla console
Cosa devo fare?.V ringrazio e le invio auguri di buona Pasqua
- Codice: Seleziona tutto
void setup() {
Serial.begin(9600);
pinMode(10, INPUT);
pinMode(11, INPUT);
}
void loop() {
if ((digitalRead(10) == 1) || (digitalRead(11) == 1)) {
Serial.println('!');
}
else {
Serial.println(analogRead(A0));
}
delay(1);
}
import processing.serial.*;
Serial myPort;
int xPos = 1;
float height_old = 0;
float height_new = 0;
float inByte = 0;
void setup () {
size(1000, 400);
println(Serial.list());
myPort = new Serial(this, Serial.list()[0], 9600);
myPort.bufferUntil('\n');
background(0xff);
}
void draw () {
}
void serialEvent (Serial myPort) {
String inString = myPort.readStringUntil('\n');
if (inString != null) {
inString = trim(inString);
if (inString.equals("!")) {
stroke(0, 0, 0xff);
inByte = 512;
}
else {
stroke(0xff, 0, 0);
inByte = float(inString);
}
inByte = map(inByte, 0, 1023, 0, height);
height_new = height - inByte;
line(xPos - 1, height_old, xPos, height_new);
height_old = height_new;
if (xPos >= width) {
xPos = 0;
background(0xff);
}
else {
xPos++;
}
}
}
Mi da’ i seguenti errori
- Codice: Seleziona tutto
Syntax error maybe a missing right parenthesis?
poi in error
- Codice: Seleziona tutto
the variable"gt" does not exist riga 11
type string[] of the last argument to method printl(obyect....) doesn't exactly match the vararg parameter riga 37
Syntax error on tokens,delete these tokens riga 37
alla console
- Codice: Seleziona tutto
expecting RPAREN,found;
Cosa devo fare?.V ringrazio e le invio auguri di buona Pasqua