- 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

Elettrotecnica e non solo (admin)
Un gatto tra gli elettroni (IsidoroKZ)
Esperienza e simulazioni (g.schgor)
Moleskine di un idraulico (RenzoDF)
Il Blog di ElectroYou (webmaster)
Idee microcontrollate (TardoFreak)
PICcoli grandi PICMicro (Paolino)
Il blog elettrico di carloc (carloc)
DirtEYblooog (dirtydeeds)
Di tutto... un po' (jordan20)
AK47 (lillo)
Esperienze elettroniche (marco438)
Telecomunicazioni musicali (clavicordo)
Automazione ed Elettronica (gustavo)
Direttive per la sicurezza (ErnestoCappelletti)
EYnfo dall'Alaska (mir)
Apriamo il quadro! (attilio)
H7-25 (asdf)
Passione Elettrica (massimob)
Elettroni a spasso (guidob)
Bloguerra (guerra)




