[Error] expected initializer before 'void'
Publicado por Angel (4 intervenciones) el 10/10/2018 02:42:16
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#define RPMMAX 1820
#define PRMMIN 800
#define LEDUP 0
#define LEDDOWN 1
#define READTIME 1000 //time in miliseconds
#define pulses 4
int main()
void setup() //use for setup hardware only one time
{//execute this when connect/ push reset
pinMode(LEDIP , INPUT);
pinMode(LEDDOWN, OUTPUT);
}void loop()//repeat this code forever and ever
{int rpm = (pulses/4) * 60
declare variable named rpms
declare variable actualInput = 0 declare variable storagedInput = 0check ->time is < 1 second
if this true
{rpms = (pulses/4) * 60
check -> rpms > RPMMAX
if this true
{set on LEDUP
} or, if this false {set OFF LEDUP
}check -> rpms < RPMMIN
if this true
{set ON LEDDOWN
} or, if this false {set OFF LEDDOWN
} } or, if this false { actualInput = readInput in port DIScheck actualInput != storagedInput
if this true
{pulses = pulses + 1
} or, if this false {nothing XD
} storagedInput = actualInput }}ERRORES QUE ME DA:
18 1 F:\C++\C4.cpp [Error] expected initializer before 'void'
F:\C++\C4.cpp In function 'void loop()':
29 3 F:\C++\C4.cpp [Error] expected ',' or ';' before 'declare'
71 1 F:\C++\C4.cpp [Error] expected '}' at end of input
Valora esta pregunta


0

