Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
arduino:arduino_mkrzero [2020/12/14 18:10]
admin [Simple Audio Player]
arduino:arduino_mkrzero [2021/01/02 15:39]
admin [Further Informations]
Line 4: Line 4:
 [[https://store.arduino.cc/arduino-mkr-zero-i2s-bus-sd-for-sound-music-digital-audio-data?queryID=undefined|Arduino MKR ZERO (I2S bus & SD for sound, music & digital audio data)]]\\ [[https://store.arduino.cc/arduino-mkr-zero-i2s-bus-sd-for-sound-music-digital-audio-data?queryID=undefined|Arduino MKR ZERO (I2S bus & SD for sound, music & digital audio data)]]\\
  
-On Arch Linux it needs more than one attempt to upload the code, the /dev/ttyACM0 can't be opened: **No device found on ttyACM0**!\\ +A great description and general information about the SAMD21 one could find here: [[https://learn.sparkfun.com/tutorials/samd21-minidev-breakout-hookup-guide/samd21-overview|SpartkFun SAMD21 Overview]]\\ 
 ---- ----
 ==== Installation ==== ==== Installation ====
Line 20: Line 21:
 or\\ or\\
 [[https://github.com/adafruit/SD/archive/master.zip|Arduino SD Library by Adafruit]]\\ [[https://github.com/adafruit/SD/archive/master.zip|Arduino SD Library by Adafruit]]\\
 +
 +On Arch Linux it needs more than one attempt to upload the code, the /dev/ttyACM0 can't be opened: **No device found on ttyACM0**!\\ 
  
 ---- ----
Line 25: Line 28:
  
 In open/libraries/ArduinZero one finds the SimpleAudioPlayerZero example.\\ In open/libraries/ArduinZero one finds the SimpleAudioPlayerZero example.\\
-These comands one need:\\+These commands are needed:\\
    SD.begin(28);   //Initializes the SD library and card    SD.begin(28);   //Initializes the SD library and card
    AudioZero.begin(2*44100);   //Initializes the DAC, 44100kHz stereo => 88200 sample rate    AudioZero.begin(2*44100);   //Initializes the DAC, 44100kHz stereo => 88200 sample rate
Line 32: Line 35:
  
 [[https://www.arduino.cc/en/Tutorial/SimpleAudioPlayerZero|Simple audio player]]\\ [[https://www.arduino.cc/en/Tutorial/SimpleAudioPlayerZero|Simple audio player]]\\
-The quality of the WAV file needs to be 88200 Hz mono, 8-bit unsigned PCM.\\+The quality of the WAV file needs to be 44100kHz stereo and decoded with 8-bit unsigned PCM.\\
 The audio signal is on pin DAC0/A0.\\ The audio signal is on pin DAC0/A0.\\
  
 **Some bugs are in the original code!**\\ **Some bugs are in the original code!**\\
-- one needs a delay after Serial.begin\\+- one needs a short delay after Serial.begin\\
 - the SD-card pin is 28\\ - the SD-card pin is 28\\
 +
 here is the fixed code:\\ here is the fixed code:\\
 {{ :arduino:simpleaudioplayerzero_fixed.zip |SimpleAudioPlayerZero_Fixed}}\\ {{ :arduino:simpleaudioplayerzero_fixed.zip |SimpleAudioPlayerZero_Fixed}}\\
  
 +Unfortunately there is quite some bad humming after playing a file.\\
  
 ---- ----
Line 55: Line 60:
 <img src="https://content.arduino.cc/assets/Pinout-MKRZERO_latest.png"> <img src="https://content.arduino.cc/assets/Pinout-MKRZERO_latest.png">
 </html>\\ </html>\\
-//picture from [[https://www.arduino.cc/|Arduino.cc]]//\\+//pinout digram by [[https://www.arduino.cc/|Arduino.cc]]//\\
  
 The onboard LED is on pin 32. One could use LED_BUILTIN instead.\\ The onboard LED is on pin 32. One could use LED_BUILTIN instead.\\
Line 94: Line 99:
  
 ---- ----
 +==== Further Informations ====
 +
 +[[https://learn.adafruit.com/adafruit-feather-m0-basic-proto/adapting-sketches-to-m0|
 +Adapting Sketches to M0 & M4 by Lady Ada]]\\
 +
 +[[https://www.omzlo.com/articles/your-arduino-samd21-adc-is-wrong-did-you-notice|Your Arduino SAMD21 ADC is wrong: did you notice? - omzlo.com]]\\
 +
 +[[https://webusb.github.io/arduino/|Arduino Web USB]]\\
 +
 +[[https://www.instructables.com/ATSAMD21g18-Bootloader-With-J-link-Debugger/|ATSAMD21g18 Bootloader With J-link Debugger
 +- instructable.com]]\\
 +
 +[[https://www.avdweb.nl/arduino/samd21/sam-15x15|Sam 15x15 - avdweb.nl]]\\
 +
 +----
 +
 ==== License ==== ==== License ====