Editing PAM8403 Stereo Amplifier
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 4: | Line 4: | ||
The amplifier is connected (similar to a [[speaker]]) to the ESP32/ESP8266, it is also connected to power, and then it has connections for the speakers. | The amplifier is connected (similar to a [[speaker]]) to the ESP32/ESP8266, it is also connected to power, and then it has connections for the speakers. | ||
− | [[File:Amplifier.PNG| | + | [[File:File:Amplifier.PNG|x200px]] |
− | [[File:Amplifier2.PNG| | + | [[File:Amplifier2.PNG|x200px]] |
− | [[File:Amplifer03.PNG| | + | [[File:File:Amplifer03.PNG|x200px]] |
= How to connect it electrically = | = How to connect it electrically = | ||
− | [[File: | + | [[File:Piezzo.PNG|300px]] |
− | |||
= How to control it in MicroPython = | = How to control it in MicroPython = | ||
== Basic code to generate a 500 Hz signal == | == Basic code to generate a 500 Hz signal == | ||
− | |||
<syntaxhighlight lang="python" line='line'> | <syntaxhighlight lang="python" line='line'> | ||
from machine import Pin | from machine import Pin | ||
from time import sleep, sleep_us, sleep_ms | from time import sleep, sleep_us, sleep_ms | ||
− | # assume our | + | # assume our LED is connected to Pin 26, we use it as output |
myLED = Pin(27, Pin.OUT) | myLED = Pin(27, Pin.OUT) | ||
Line 69: | Line 67: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | + | [[file:Piezo_Speaker.jpg|300px]] | |
− | [[ | + | [[file:Piezo_Speaker_close_up.jpg|300px]] |
− | [[ | ||
= Related Tutorial Videos = | = Related Tutorial Videos = | ||
<youtube>HPQMvL1SP_c</youtube> | <youtube>HPQMvL1SP_c</youtube> |