Hi. Thanks for the tutorials. I note that the sound seems to play when the button is released. I'd like to have the action when it's initially pressed in my application. Any suggestions?
@profgallaugher7 ай бұрын
Check out the other button tutorials in bit.ly/circuitpython-tutorials. You’ll find ideas and techniques there. Hack on!
@JeffBecker-f5o8 ай бұрын
Very informative videos. Thank you. I am trying to create a python program on a newly purchased Raspberry Pi 4. I want to put the Pi in a pedal car with LED lights in the exhaust. (8 of them) I have a potentiometer that the user can press to make the LEDs flash at 6 different rates as they press the pedal. This all works well but I would like to add sound also. That means when you press the pedal, I want the LED to change speed and the sound to either get louder or faster. I can't seem to get the LED flashing at the same time sound plays. Is there some code that will achieve this? Thank you in advance. Jeff
@profgallaugher7 ай бұрын
Check in the course playlist. You’ll see various techniques that I teach my students in the bit.ly/circuitpython-tutorials list. Good luck!
@randomthingz9631 Жыл бұрын
when i try to make it i get a import error : no module named board, is there a way I can fix this?
@profgallaugher Жыл бұрын
Sounds like you need to go through the earlier video in the playlist to install CircuitPython and Blinka. When you get a no such module it means that the library you are using (board in this case) was not installed on your computer (which is the case I’d you haven’t set up blinka) or you baked the module wrong (eg it’s not spelled properly with same all lowercase lettering). Good luck!
@MrArniePi Жыл бұрын
Nice video, thanks for creating. Why would someone use debouncer over RPi.GPIO for buttons? The reason I ask is because debouncer is no longer compatible with Python versions less than 3.8. As a result I switched my Raspberry Pi from Python 3.7 to Python 3.12 but now one of the libraries I use (openAI) has an issue with Python 3.12. While the OpenAI devs fix their issue with Python 3.12, I could have just switched Pi to Python 3.8-3.11instead but opted to just use RPi.GPIO instead.
@antoinea6652 жыл бұрын
how can we add mutiple buttoons ? with button1 = digitalio.DigitalInOut(board.D5) button1.switch_to_input(pull=digitalio.Pull.UP) button1 = Debouncer(button1) and more or there is an other solution ? Thanks
@profgallaugher2 жыл бұрын
Just crear different buttons with different names and pins. Be careful. The code you list shows button1 used in all three lines. That last line that passes a configuration into Debouncer needs to have a different name on the left of the equal sign. Look at the code for a good naming template to use. Good luck!
@antoinea6652 жыл бұрын
@@profgallaugher Thanks you :)
@profgallaugher2 жыл бұрын
Student asked if you can use fStrings for this. Absolutely (always try it out). It'd be like this: pygame.mixer.music.load(path + f"sound{sound_number}.mp3")
@MrDrake333 Жыл бұрын
is f`string a way to make the chosen sound file at random? (Im looking for such a funktion)
@ergundegirmencioglu5888 Жыл бұрын
hallo. how can i make piano with raspberry pi
@profgallaugher Жыл бұрын
Check out the full playlist for ideas and all playlists on the channel.