hola alguien tan amable de decirme porque no puedo copilar esto soy nuevo en arduino y no hay manera de copilarlo seguro que estoy realizando algo mal.
muchas gracias
01.# Include "SevenSegment.h"
02.
03. SevenSegment seg7(19,16,15,13, // ?1,?2,?3,?4, SevenSegment seg7 (19,16,15,13, / / 1 digit, 2 digit, 3 digit, 4 digit
04. 18,14,11,9,8,17,12,10); // A,B,C,D,E,F,G,DP 18,14,11,9,8,17,12,10); / / A, B, C, D, E, F, G, DP
05.
06. unsigned long lastPulseTime; unsigned long lastPulseTime;
07. unsigned long pulseInterval; unsigned long pulseInterval;
08.
09. // ???????????????? / / Falling edge detection pulse rotation
10. void senseRotation( void ) { void senseRotation (void) (
11. unsigned long cur = micros (); unsigned long cur = micros ();
12. unsigned long dif = cur - lastPulseTime; // ?????????? unsigned long dif = cur - lastPulseTime; / / difference between the previous edge
13. pulseInterval = (pulseInterval - (pulseInterval >> 2)) + (dif >> 2); // ???? pulseInterval = (pulseInterval - (pulseInterval>> 2)) + (dif>> 2); / / smooth
14. lastPulseTime = cur; lastPulseTime = cur;
15. } )
16.
17. void setup () { void setup () (
18. lastPulseTime = 0; lastPulseTime = 0;
19. pulseInterval = 0; pulseInterval = 0;
20. attachInterrupt (0, senseRotation, FALLING ); // 0 = D2, FALLING = ????? attachInterrupt (0, senseRotation, FALLING); / / 0 = D2, FALLING = falling
21. seg7. begin (); // 7??LED???? seg7. begin (); / / 7 LED segment begins operation
22. } )
23.
24. unsigned long lastUpdateTime; unsigned long lastUpdateTime;
25.
26. void loop () { void loop () (
27. if (seg7. update ()){ // ??????????????????????????? if (seg7. update ()) (/ / called at short intervals as possible, so do dynamic lighting control
28. unsigned long cur = millis (); unsigned long cur = millis ();
29. if (cur - lastUpdateTime > 60){ // 60ms???LED??? if (cur - lastUpdateTime> 60) (/ / 60ms update interval LED
30.
31. uint16_t rpm = 60000000 / (pulseInterval * 2); // RPM???? uint16_t rpm = 60000000 / (pulseInterval * 2); / / RPM find
32. seg7. print (rpm); // 7??LED???? seg7. print (rpm); / / 7 LED segment display update
33.
34. lastUpdateTime = cur; lastUpdateTime = cur;
35. } )
36. } )
37. } )