024 - MicroPython TechNotes: Slider Switch

แชร์
ฝัง
  • เผยแพร่เมื่อ 29 มี.ค. 2021
  • In this video, we will learn how to use SLIDER SWITCH with ESP32 using MicroPython programming language.
    For more details, visit my blog post at:
    techtotinker.com/2021/03/30/0...
    OR watch the whole playlist:
    • 000 - MicroPython Tech...
    Please do Like, Comment, Share, and Subscribe.
    Thank you.
    - George Bantique | tech.to.tinker@gmail.com
    #TechToTinker
    #MicroPython #ESP32 #GorillaCell
    #MicroPythonTutorials
    ---
    MicroPython Tutorials
    How to use slider module in MicroPython
    How to use slider switch in MicroPython
    How to read analog input in MicroPython
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 4

  • @harnaikhothi3277
    @harnaikhothi3277 3 ปีที่แล้ว +1

    Nice vedio george can you pls do vedio on pls charlieplexing i/p and o/p pls ??????????

    • @TechToTinker
      @TechToTinker  3 ปีที่แล้ว

      @Harnaik Hothi, thank you for the kind words. I actually don't know what is charlieplexing so I googled it :).
      You may try the following where I use Raspberry Pi Pico but of course you can use ESP32 or ESP8266. It uses 3 GPIOs which are GPIO 13, 12, and 11. Using the while loop it blinks 6 LEDs using 3 GPIO. Its cool. Hope you like it.
      # More details can be found in TechToTinker.blogspot.com
      # George Bantique | tech.to.tinker@gmail.com
      from machine import Pin
      from time import sleep_ms
      def b1():
      y = Pin(13, Pin.OUT)
      b = Pin(12, Pin.OUT)
      g = Pin(11, Pin.IN)
      y.value(0)
      b.value(1)
      def b2():
      y = Pin(13, Pin.OUT)
      b = Pin(12, Pin.OUT)
      g = Pin(11, Pin.IN)
      y.value(1)
      b.value(0)
      def y1():
      y = Pin(13, Pin.OUT)
      b = Pin(12, Pin.IN)
      g = Pin(11, Pin.OUT)
      y.value(1)
      g.value(0)
      def y2():
      y = Pin(13, Pin.OUT)
      b = Pin(12, Pin.IN)
      g = Pin(11, Pin.OUT)
      y.value(0)
      g.value(1)
      def g1():
      y = Pin(13, Pin.IN)
      b = Pin(12, Pin.OUT)
      g = Pin(11, Pin.OUT)
      b.value(0)
      g.value(1)
      def g2():
      y = Pin(13, Pin.IN)
      b = Pin(12, Pin.OUT)
      g = Pin(11, Pin.OUT)
      b.value(1)
      g.value(0)
      while True:
      g1()
      sleep_ms(300)
      g2()
      sleep_ms(300)
      b1()
      sleep_ms(300)
      b2()
      sleep_ms(300)
      y1()
      sleep_ms(300)
      y2()
      sleep_ms(300)

    • @harnaikhothi3277
      @harnaikhothi3277 3 ปีที่แล้ว +1

      @@TechToTinker Hi George thanks you for your help Best Regards

    • @TechToTinker
      @TechToTinker  3 ปีที่แล้ว

      @@harnaikhothi3277 you are welcome and thanks for the idea. I will create video of it later on :)