007 - ESP32 MicroPython: Lets make some noise in MicroPython

preview_player
Показать описание
In this video we will learn how to play some familiar melodies in MicroPython. It is similar to Arduino Tone library but a lot more easier in MicroPython.

For circuit diagram and source code, visit my blogs at:

Please Like and Share this to your friends.

You comments and suggestions is highly welcome.

And please do Subscribe now.

Thank you,
#TechToTinker
#MicroPython
#ESP32
Рекомендации по теме
Комментарии
Автор

Learning little by little, below is reference for me or anyone else interested, my buzzer seems to be broken so I did not continue with second part.

import machine
import time

p23 = machine.Pin(23, machine.Pin.OUT) # <-- Configures GPIO pin 23 as an output pin

buzzer = machine.PWM(p23)

buzzer.freq(1047) # Set the frequency (1047 Hz = musical note C6)
buzzer.duty(50) # Set the duty cycle (50% = moderate loudness)

time.sleep(1) # Buzz for 1 second

buzzer.duty(0) # Turn off the buzzer
buzzer.deinit() # Release the PWM resource

agriperma
Автор

love the series! Please keep them coming!

latavish
Автор

Great job. I wrote my own lib similar to this and this is a great way to learn for people to to MP!

mytechnotalent
Автор

@9:53 when i run "play(p23, mario, 1, 50)" i will get an Error saying
"Traceback (most recent call last):

File "<stdin>", line 1, in <module>
File "<stdin>", line 109, in play
ValueError: frequency must be from 1Hz to 40MHz"

And there is just a long single Beep. How can i fix this?

MXDBZZ
Автор

this is awssome! so we can even make it say a "hello" ?

aas_shortforsmthin
Автор

Hi, how would you make a code so it plays the buzzer every 10 seconds on a loop forever? I really need to design a code like this.

mainbraine
Автор

Не получается установит модуль machine установка рушится с ошибками в момент сборки pycrypto

alech
welcome to shbcf.ru