Editing Tutorial Digital IO

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 9: Line 9:
 
* you can read in the status of a GPIO  
 
* you can read in the status of a GPIO  
 
* you can connect a switch or a push-button and read its status into a variable
 
* you can connect a switch or a push-button and read its status into a variable
 
== Related Components ==
 
The components are related to the [[LMUBox]]. For more components, see the [[Hardware List]]. Many of the pages on actuators and sensors include additional examples.
 
 
=== Microcontroller ===
 
* [[ESP8266 D1 Mini]]
 
* [[ESP32 Web Kit]] with integrated OLED Display from Heltec
 
* [[ESP8266 ESP-12F]] NodeMCU Module from AZDelivery
 
 
=== Actuators ===
 
* [[LED]]s in different colors to connect externally
 
* [[RGB LED]] multi-color LED
 
* [[LED Ring NeoPixel]]
 
* [[Piezo Speaker]]
 
* [[Speaker]]
 
* [[SG90 Servo]] Micro Servo Motor
 
* [[Stepper Motor and ULN2003]] 28BYJ-48 ULN2003 5V Stepper Motor + ULN2003 Driver Board
 
* [[IRF520 Module]] Power MOSFET switching module ('electronic relay')
 
 
=== Sensors (and physical controllers) ===
 
* [[push button]]
 
* [[Switch]]
 
* [[PIR Sensor]] passive infrared motion sensor
 
  
 
= Instructional Videos =
 
= Instructional Videos =
  
 
The videos are a first test... the ones marked with ** will be replaced over the next months with new versions.
 
The videos are a first test... the ones marked with ** will be replaced over the next months with new versions.
 
If you use the [[ESP8266_D1_Mini]] have a look at this file about which Pins to use: https://micropython-on-wemos-d1-mini.readthedocs.io/en/latest/basics.html
 
 
  
 
== Digital Output: Adding an external LED to the controller ==
 
== Digital Output: Adding an external LED to the controller ==
Line 45: Line 19:
 
<youtube>0KGgYsEZcZM</youtube>
 
<youtube>0KGgYsEZcZM</youtube>
  
 
Here is a short video of how to connect and control an LED on the [[ESP8266_D1_Mini]].
 
 
<youtube>GHE5A0WT5AE</youtube>
 
 
 
If you use the [[ESP8266_D1_Mini]] have a look at this file about which Pins to use: https://micropython-on-wemos-d1-mini.readthedocs.io/en/latest/basics.html
 
  
 
== Digital Output: Connectin an external LED (old version using WebREPL **) ==
 
== Digital Output: Connectin an external LED (old version using WebREPL **) ==
Line 59: Line 26:
  
  
== PWM Output: connecting a servo and and LED ==
+
== PWM Output: connecting a servo (old version using WebREPL **) ==
In this video on youtube (45:39) we explain the concept of pulse width modulation (PWM) and how to program it in MicrpPython. We show how to use PWM to control a servo and the brightness of an LED: https://youtu.be/XovIHYo7s1A
+
In this video on youtube (14:40) we explain the concept of pulse width modulation (PWM) and how to program it in MicrpPython. We show how to use PWM to controll a servo: https://youtu.be/_4bXk8JjQSk
 
 
<youtube>XovIHYo7s1A</youtube>
 
 
 
 
 
== PWM Output: connecting a servo (old version using WebREPL **, 14:40) ==
 
  
 
<youtube>_4bXk8JjQSk</youtube>
 
<youtube>_4bXk8JjQSk</youtube>
Line 72: Line 34:
 
In this video on youtube (23:56) we explain how to create a sound on a digital output pin. We have two versions, one with the sleep function and one with pulse width modulation (PWM) in MicrpPython. We also show how to add an  [[PAM8403_Stereo_Amplifier]]: https://youtu.be/HPQMvL1SP_c
 
In this video on youtube (23:56) we explain how to create a sound on a digital output pin. We have two versions, one with the sleep function and one with pulse width modulation (PWM) in MicrpPython. We also show how to add an  [[PAM8403_Stereo_Amplifier]]: https://youtu.be/HPQMvL1SP_c
  
<youtube>HPQMvL1SP_c</youtube>
+
<youtube>_4bXk8JjQSk</youtube>
  
  
Line 79: Line 41:
  
 
<youtube>va1beT6sxLs</youtube>
 
<youtube>va1beT6sxLs</youtube>
 
 
Here is a short video of how to connect a button and how to read a digital value from the ESP8266_D1_Mini with micropython.
 
 
<youtube>Cb_nYYs-pag</youtube>
 

Please note that all contributions to Sketching with Hardware at LMU Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see My wiki:Copyrights for details). Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)