...
- ATSAMD21G18 microcontroller
- 32-Bit ARM Cortex M0+ at 48 MHz
- Flash Memory: 256 KB
- SRAM: 32 KB
- Compatible with the Arduino Zero board and can be programmed using the Arduino IDE as an Arduino Zero
- A buzzer is mounted on the Cubetto PCB and connected to Arduino pin number 17 (pin "A3" on the Arduino Zero and named "PA04" in the SAMD21 documentation)
- The SAMD21 has a built-in Digital Audio Converter (DAC) attached to pin A0
- The buzzer on the Cubetto is not attached to this pin. It is attached to a digital (2-state) output pin and Pulse Width Modulation (PWM) must be used to play audio on the mounted buzzer.
- The analog pin A0 might be available via a pad on the Cubetto PCB
Cubetto Firmware
Primo Video Guide to Updating the Cubetto Firmware Using the Arduino IDE:
...
- https://www.arduino.cc/reference/en/language/variables/utilities/progmem/
- http://www.nongnu.org/avr-libc/user-manual/group__avr__pgmspace.html
Audio Libraries and Code Samples
- Arduino PWM tone() function for SAMD
- Arduino PWM tone() function for AVR
- AudioZero audio library for Arduino Zero
- https://github.com/arduino-libraries/AudioZero/blob/master/src/AudioZero.cpp
- Play sampled audio using the built-in DAC on pin A0
- PWM audio for Arduino with Atmega168 at 16 MHzSAMD21 Timer library for the Arduino Zerohttps://github.com/avandalen/avdweb_SAMDtimerfor Arduino with Atmega168 at 16 MHz
- https://forumplayground.arduino.cc/index.php?topic=454243.0/Code/PCMAudio/
Arduino/SAMD21 Timers
- Forum thread: "Changing Arduino Zero PWM Frequency"
- Forum Thread: "PWM on Arduino Zero Questions"
- Forum thread: "How this timer even works ?"
- https://www.hackster.io/voske65/high-speed-pwm-on-arduino-atsamd21-859b06
- http://www.ermicro.com/blog/?p=1971
- Single and dual slope PWM
- Newbie's Guide to AVR PWM
- Smoothly Changing a Timer’s Frequency on the Arduino Zero
- https://gist.github.com/nonsintetic/ad13e70f164801325f5f552f84306d6f
- https://arduino.stackexchange.com/questions/41569/arduino-zero-timer-setup
- SAMD21 Timer library for the Arduino Zero
- https://github.com/adafruit/Adafruit_ZeroTimer
...