File tree 1 file changed +9
-6
lines changed
libraries/Camera/examples/CameraCaptureWebSerial
1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -62,27 +62,30 @@ FrameBuffer fb;
62
62
63
63
/* *
64
64
* Blinks the LED a specified number of times.
65
- *
65
+ * @param ledPin The pin number of the LED.
66
66
* @param count The number of times to blink the LED. Default is 0xFFFFFFFF.
67
67
*/
68
- void blinkLED (uint32_t count = 0xFFFFFFFF ) {
68
+ void blinkLED (int ledPin, uint32_t count = 0xFFFFFFFF ) {
69
69
while (count--) {
70
- digitalWrite (LED_BUILTIN , LOW); // turn the LED on (HIGH is the voltage level)
70
+ digitalWrite (ledPin , LOW); // turn the LED on (HIGH is the voltage level)
71
71
delay (50 ); // wait for a second
72
- digitalWrite (LED_BUILTIN , HIGH); // turn the LED off by making the voltage LOW
72
+ digitalWrite (ledPin , HIGH); // turn the LED off by making the voltage LOW
73
73
delay (50 ); // wait for a second
74
74
}
75
75
}
76
76
77
77
void setup () {
78
78
pinMode (LED_BUILTIN, OUTPUT);
79
+ pinMode (LEDR, OUTPUT);
80
+ digitalWrite (LED_BUILTIN, HIGH);
81
+ digitalWrite (LEDR, HIGH);
79
82
80
83
// Init the cam QVGA, 30FPS
81
84
if (!cam.begin (RESOLUTION, IMAGE_MODE, 30 )) {
82
- blinkLED ();
85
+ blinkLED (LEDR );
83
86
}
84
87
85
- blinkLED (5 );
88
+ blinkLED (LED_BUILTIN, 5 );
86
89
}
87
90
88
91
/* *
You can’t perform that action at this time.
0 commit comments