Save this video free

CE351 lec16 A music game box Task 2.3 and PWM introduction

Yiyan Li · 40:43 · Watch on YouTube

CE351 lec16 A music game box Task 2.3 and PWM introduction Watch on YouTube →

Overview

Yiyan Li walks through the CE351 music-copy game in Task 2.3, showing how timer interrupts, song-state flags, and active-low button presses coordinate playback and compare the timing of a player's presses. The lecture then introduces pulse-width modulation (PWM), explaining duty cycle, why digital PWM can replace a DAC for many loads, and the limits of Arduino's analogWrite() when output frequency must be controlled.

Key takeaways

Chapters

0:00 Timer Interrupts Coordinate Note and Song Playback
3:00 Serial Command R Starts the Copy Song
11:00 Disable Timer 3 After the Copy Song
12:00 Initialize the Game and Record the First Press
18:00 Use Button Holds to Replay Notes and Capture Timing
22:00 Compare TCNT Intervals and Handle Timer Overflow
29:00 Play Success or Failure Songs from the Interrupt Routine
31:00 PWM Duty Cycle, analogWrite(), and Frequency Limits

Keep these chapters and the full searchable transcript in your own library.

Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, Yiyan Li.

Want the full transcript?

Save this video in YouTube Collector to get its complete searchable transcript, your own AI summaries, and a library that keeps every video you collect in one place.