@@ -281,19 +281,22 @@ void RMT_Repeated_Write_Blink() {
281
281
Serial.println (" Using RMT Writing repeated N times to blink an LED." );
282
282
Serial.println (" Blinking at 1s on + 1s off :: 2 blinks" );
283
283
// repeating blink_1s_rmt_data (1s on + 1s off) 2 times for 2 blinks
284
- if (!rmtWriteRepeated (BLINK_GPIO, blink_1s_rmt_data, RMT_SYMBOLS_OF (blink_1s_rmt_data) - 1 , 2 )) {
284
+ if (!rmtWriteRepeated (BLINK_GPIO, blink_1s_rmt_data, RMT_SYMBOLS_OF (blink_1s_rmt_data), 2 )) {
285
285
Serial.println (" ===> rmtWrite Blink 1s Error!" );
286
286
}
287
+ delay (4000 + 1000 ); // it should blink 2 times and stop automatically
287
288
Serial.println (" Blinking at 500ms on + 500ms off :: 4 blinks" );
288
289
// repeating blink_500ms_rmt_data (500ms on + 500ms off) 4 times for 4 blinks
289
- if (!rmtWriteRepeated (BLINK_GPIO, blink_500ms_rmt_data, RMT_SYMBOLS_OF (blink_500ms_rmt_data) - 1 , 4 )) {
290
+ if (!rmtWriteRepeated (BLINK_GPIO, blink_500ms_rmt_data, RMT_SYMBOLS_OF (blink_500ms_rmt_data), 4 )) {
290
291
Serial.println (" ===> rmtWrite Blink 0.5s Error!" );
291
292
}
293
+ delay (4000 + 1000 ); // it should blink 4 times and stop automatically
292
294
Serial.println (" Blinking at 250ms on + 250ms off :: 8 blinks" );
293
295
// repeating blink_250ms_rmt_data (250ms on + 250ms off) 8 times for 8 blinks
294
- if (!rmtWriteRepeated (BLINK_GPIO, blink_250ms_rmt_data, RMT_SYMBOLS_OF (blink_250ms_rmt_data) - 1 , 8 )) {
296
+ if (!rmtWriteRepeated (BLINK_GPIO, blink_250ms_rmt_data, RMT_SYMBOLS_OF (blink_250ms_rmt_data), 8 )) {
295
297
Serial.println (" ===> rmtWrite Blink 0.25s Error!" );
296
298
}
299
+ delay (4000 + 1000 ); // it should blink 8 times and stop automatically
297
300
Serial.println (" Blinking is OFF for 2 seconds" );
298
301
delay (2000 );
299
302
}
0 commit comments