Una mas que no compila, que me falla?
Publicado por Angel (4 intervenciones) el 09/10/2018 00:28:10
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
64
65
66
67
//Program to calculate the perfect moment to
// change gear from RPM detected
//This Should be displayed in 2 leds (first led to
// up gear and other led down gear)
#define RPMMAX 1820
#define PRMMIN 800
#define LEDUP 0
#define LEDDOWN 1
#define READTIME 1000 //time in miliseconds
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 = 0
check ->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 DIS
check actualInput != storagedInput
if this true
{
pulses = pulses + 1
}
or, if this false
{
nothing XD
}
storagedInput = actualInput
}
}
Valora esta pregunta


0