Stavo cercando di fare un programma che calcolasse la velocità in metri al secondo di un prototipo di anemometro, grazie a un interruttore ottico ma non capisco perchè il seguente codice
unsigned long duration;
unsigned double conversore = 1 / 1000000;
unsigned double tempo;
unsigned double velocità;
int a ;
void setup() {
Serial.begin(9600);
pinMode (8,INPUT);
}
void loop() {
tempo = conversore * pulseIn(8, LOW, 10000000);
velocità = 1 / tempo;
}
mi da il seguente errore
Arduino:1.6.6 (Windows 7), Scheda:"Arduino/Genuino Uno"
sketch_mar05a:4: error: stray '\340' in program
unsigned double velocità;
^
sketch_mar05a:13: error: stray '\340' in program
velocità = 1 / tempo;
^
sketch_mar05a:2: error: 'signed' or 'unsigned' invalid for 'conversore'
unsigned double conversore = 1 / 1000000;
^
sketch_mar05a:3: error: 'signed' or 'unsigned' invalid for 'tempo'
unsigned double tempo;
^
sketch_mar05a:4: error: 'signed' or 'unsigned' invalid for 'velocit'
unsigned double velocità;
^
exit status 1
stray '\340' in program
Questo report potrebbe essere più ricco di informazioni con
"Mostra un output dettagliato durante la compilazione"
abilitato in "File > Impostazioni"
grazie in anticipo per le risposte <3