Ayudar a que compile, que me falta?
Publicado por Angel (4 intervenciones) el 09/10/2018 00:23:37
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
#include <stdio.h>
#include <stdlib.h>
#include <cstdio>
#define CKPSENSOR 9
#define GROUND realy?
#define LEDUP 0
#define LEDDOWN 1
#define RPMMAX 3200
#define RPMMIN 1000
const:
CKPSENSOR PIN9
GROUND realy?
LEDUP PIN0
LEDDOWN PIN1
RPMMAX 3200 (it's RPM to proced to set ON the "LEDUP")
RPMMIN 1000
var:
pastPulse =0 (save on this variable the past pulse value)
actualPulse=0 (obtaning this from read an arduino port)
actualRPM (obtain this from calculate many things)
readingTime (count the time for every seconds count
actualRPM)
**principal looping process (principal function)
chekIfTimeHappened(readingTime)
if false (actual time is not completed)
actualPulse = readArduinoPort (port = CKPSENSOR)
compare (pastPulse & actualPulse)
if diferent
actual RPM= (actualRPM + 1)
if equals
nothing XD
if true
chek RPM> PRMMAX
if true
turnOnArduinoPort(LEDUP)
Valora esta pregunta


0