Learn MicroPython #3 - Buttons (digital input)

preview_player
Показать описание
Full code available on Github!
In this video, we will learn to use the pins in input mode so we can detect a button press. Input pins cannot provide power, but instead they measure the level of the voltage applied to the pin. The pin will report this level as either being HIGH (a logic '1') or LOW (a logic '0'). In our example, pressing the button decreases the voltage applied to the pin, causing the input pin to switch from HIGH to LOW.

We have entire playlists on learning open source software so have fun learning! The solution is right around the corner... InventBoxTutorials.
Great tutorials. Free software. Open to the world.

**************************************************
We use FREE open source software with the following machines:
(ALL open source software is free so YOU can try it too) **************************************************

CNC ROUTER / MILLING MACHINE

(As an Amazon Associate I earn from qualifying purchases.)

**************************************************
FREE VIDEO DEMOS:
Laser Cutting TIPS & TRICKS
Vinyl Cutting TIPS & TRICKS
Wood Lathing TIPS & TRICKS
Milling / CNC Router TIPS & TRICKS
Metal Lathing TIPS & TRICKS
**************************************************
Рекомендации по теме
Комментарии
Автор

I would recommend rshell for the repl as well as copying files back and forth from the uC. Great all in one package. If you don't feel comfortable in the terminal there's software like thonny

hmza
Автор

These tutorials are easy to follow. Not sure if python/ micro python is a good first language for a total beginner, but I need to know it in order to do a project I am working that automates a toolchanging process where the controller program communicates with the computer via .py code. I knownfor sure, I will be simplifying the code I write hopefully when compared to the code on a factory tool changer, but this is definitely a stepping the right direction. Thank you. I'll be following along. Subscribed.

Nordic_Goon
Автор

Please refer to the example provided and try to control it slightly as shown below.

When the button is pressed once, the LED will come on for 5 seconds and turn off. Pressing the button once will blink the LED for 5 seconds, pressing the button once again will keep the LED coming on, and pressing the button again will turn the LED off

I would like to control it as above, but if there is only one example I would like to share.

skyu
Автор

I would recommend rshell for the repl as well as copying files back and forth from the uC. Great all in one package. If you don't feel comfortable in the terminal there's software like thonny

hmza
welcome to shbcf.ru