Project #20: CircuitPython – Audio Out WAV – Mk02
Project #20: CircuitPython – Audio Out WAV – Mk02
https://www.donluc.com/?p=2930
#DonLucElectronics #DonLuc #METROM0Express #CircuitPython #Sound #Project #Fritzing #Programming #Electronics #Microcontrollers #Consultant
Play a Wave File
You can use any supported wave file you like. CircuitPython supports mono or stereo, at 22 KHz sample rate, or less, and 16-bit WAV format. The METRO M0 Express boards support only mono. The reason for mono is that there's only one analog output on those boards. The 22 KHz or less because the CircuitPython can't handle more data than that, and also it will not sound much better, and the DAC output is 10-bit so anything over 16-bit will just take up room without better quality. Since the WAV file must fit on the CircuitPython file system, it must be under 2 MB.
HamletUMk01.wav = 1316 KB
We're going to play the wave file for 10 seconds, pause it, wait for a button to be pressed, and then resume the file to play through to the end. Then it loops back to the beginning and starts again. First we create the button object, assign it to pin A1, and set it as an input with a pull-up.
Now we will ask the audio playback system to load the wave data from the file HamletUMk01.wav and finally request that the audio is played through the A0 analog output pin. The audio file is now ready to go, and can be played at any time with play. Inside our loop, we start by playing the file.
DL2112Mk02
1 x Adafruit METRO M0 Express
1 x SparkFun Audio Jack Breakout
1 x Audio Jack 3.5mm
1 x Hamburger Mini Speaker
1 x Tactile Button
1 x 10K potentiometer
1 x Knob
1 x 100uF 16V Electrolytic Capacitors
1 x SparkFun Cerberus USB Cable
Adafruit METRO M0 Express
AUD - Analog A0
BUT - Analog A1
VIN - +3.3V
VIN - +5V
GND - GND
code.py
People can contact us: http://www.donluc.com/?page_id=1927
Technology Experience
-Single-Board Microcontrollers (PIC, Arduino, Raspberry Pi, Espressif, etc...)
-IoT
-Robotics
-Camera and Video Capture Receiver Stationary, Wheel/Tank and Underwater Vehicle
-Unmanned Vehicles Terrestrial and Marine
-Machine Learning
-Research & Development (R & D)
-Desktop Applications (Windows, OSX, Linux, Multi-OS, Multi-Tier, etc...)
-Mobile Applications (Android, iOS, Blackberry, Windows Mobile, Windows CE, etc...)
-Web Applications (LAMP, Scripting, Java, ASP, ASP.NET, RoR, Wakanda, etc...)
-Social Media Programming & Integration (Facebook, Twitter, YouTube, Pinterest, etc...)
-Content Management Systems (Wordpress, Drupal, Joomla, Moodle, etc...)
-Bulletin Boards (phpBB, SMF, Vanilla, jobberBase, etc...)
-eCommerce (WooCommerce, OSCommerce, ZenCart, PayPal Shopping Cart, etc...)
Instructor and E-Mentor
-IoT
-PIC Microcontrollers
-Arduino
-Raspberry Pi
-Espressif
-Robotics
-DOS, Windows, OSX, Linux, iOS, Android, Multi-OS
-Linux-Apache-PHP-MySQL
Follow Us
J. Luc Paquin – Curriculum Vitae - 2021 English & Español
https://www.jlpconsultants.com/luc/
Web: https://www.donluc.com/
Web: https://www.jlpconsultants.com/
Facebook: https://www.facebook.com/neosteam.labs.9/
YouTube: https://www.youtube.com/channel/UC5eRjrGn1CqkkGfZy0jxEdA
Twitter: https://twitter.com/labs_steam
Pinterest: https://www.pinterest.com/NeoSteamLabs/
Instagram: https://www.instagram.com/neosteamlabs/
Don Luc
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Project #20: CircuitPython – Audio Out WAV – Mk02», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.