Raspberry Pi Pico W LESSON 37: Control a Servo With a Potentiometer in MicroPython

Поділитися
Вставка
  • Опубліковано 13 гру 2024

КОМЕНТАРІ • 31

  • @Anshu-y1w4m
    @Anshu-y1w4m Місяць тому

    please don't be disheartened with what the most people in the youtube think... you were a hero, you are a hero and you would always be...I am really really thankful to you. I started to watch you arduino tutorials last year and they were amazing and therefore i am continuing by you pico w lessons. If not for others, you are definitely a hero for me least.

  • @qzorn4440
    @qzorn4440 Рік тому +1

    A wonderful servo lesson. This can be used to position a water valve in between opened and closed for cooling or heating something up in a PID loop. 🐬 Thank you so much.

  • @larryplatzek9017
    @larryplatzek9017 Рік тому +1

    PAUL ALWAYS HAS GREAT LESSONS TO LEARN BY!

  • @navinlessing7053
    @navinlessing7053 Рік тому

    Hi Paul, I'm your student from Kenya. Started 3 weeks ago with your incredible arduino lessons from 3 years ago. I am at lesson 39 and I have learnt so much. So today I decided to check out your latest video and I'm sad to see that you changed your iconic orange t-shirt and coffee mug.😢. You still a great teacher though. May you live longest and God bless you.

  • @edSabio572
    @edSabio572 Рік тому

    Thanks Paul! It is the Math component of the lesson what makes me come back every time. A little late but catching up.

  • @stephenlightkep1621
    @stephenlightkep1621 Рік тому

    Thanks Paul. I did the homework successfully but our math was different. You Rock

  • @cbrombaugh
    @cbrombaugh Рік тому

    I AM LEGEND! Rather than converting potVal to degrees and using Paul's degrees-to- duty cycle formula, I did the math and converted directly from potVal to duty cycle. Ain't math fun?

  • @huen5047
    @huen5047 Рік тому

    Excellent video. Math works!

  • @TheTechRancher
    @TheTechRancher Рік тому

    Another Great Video Paul. Thanks for your hard work to make them.

  • @scottwait3585
    @scottwait3585 Рік тому

    Thank you Paul!

  • @patrickfox-roberts7528
    @patrickfox-roberts7528 Рік тому

    Thanks Paul.

  • @Snyouce
    @Snyouce Рік тому

    Thanks sir ❤

  • @mauriciodelabarrera6444
    @mauriciodelabarrera6444 27 днів тому

    what size pot are you using for this lab? I am using a 10k pot and using MG996r servo; the servo moves but irradical

  • @robakers6127
    @robakers6127 Рік тому

    Has any done anything with the addressable christmas lights? What would be a good reference?

    • @keithlohmeyer
      @keithlohmeyer Рік тому +1

      There is a built in Neopixel module in Micropython. Here is the example code from the docs
      from machine import Pin
      from neopixel import NeoPixel
      pin = Pin(0, Pin.OUT) # set GPIO0 to output to drive NeoPixels
      np = NeoPixel(pin, 8) # create NeoPixel driver on GPIO0 for 8 pixels
      np[0] = (255, 255, 255) # set the first pixel to white
      np.write() # write data to all pixels
      r, g, b = np[0] # get first pixel colour
      Basically the pixels are in an array and you set the R,G,B values (0 - 255). The .write method sends the data array out to the pixels. It is great fun making patterns using loops. There is also a similar dotstar (APA102) module for the more expensive other style of addressable LEDs.

  • @VeryUsMumblings
    @VeryUsMumblings 10 місяців тому

    this comment is solely for youtube juice. Good video, thanx!

  • @rschook7762
    @rschook7762 Рік тому

    I managed the homework. The math still escapes me with the substitution of variables but I'm getting there.

  • @retrobombstudios1258
    @retrobombstudios1258 Рік тому

    Please help.I have copied ths code exactly using thonny with the micropython-servo library installed.
    However,what seems to be happening is that my servo turns on its own without my input when i run the program.
    I have switched out the potentiometer for a better one but still get the same outcome.
    Any ideas where im going wrong?

  • @CayMacVintage
    @CayMacVintage Рік тому

    I keep getting Thonny backend errors when running anything with the servo. Sometimes it will work for a few seconds and crash. Not sure why. I am on a Mac M2 and the code is exactly as shown in the video

    • @jbelmont72
      @jbelmont72 11 місяців тому

      I'm getting the exact same thing. I have a Mac as well and it is happening with any program I try with the servo and Potentiometer. I have used several styles of pots and the same happens. (also tried averaging the pot values in an effort to make them more consistent and that did not help.
      on VSCode I get:
      Exception occured (maybe a connection loss) and on Thonny I receive:
      Process ended with exit code 1.
      Unable to connect to /dev/cu.usbmodem101: [Errno 2] could not open port /dev/cu.usbmodem101: [Errno 2] No such file or directory: '/dev/cu.usbmodem101'
      Process ended with exit code 1.
      Unable to connect to /dev/cu.usbmodem101: [Errno 35] Could not exclusively lock port /dev/cu.usbmodem101: [Errno 35] Resource temporarily unavailable
      If you have serial connection to the device from another program, then disconnect it there first.

    • @AscensionKS
      @AscensionKS Місяць тому

      @@jbelmont72 It's a power supply issue. I found running a seperate supply made all of the difference.

  • @brandonculver2403
    @brandonculver2403 Рік тому

    Hello Paul, I just stumbled on your channel. Have a quick question for you. Is there any way that you can use an arduino to measure distance accurately? Like a machine DRO

    • @jeremiebula4370
      @jeremiebula4370 Рік тому

      Yes, there are several ways to use an Arduino to measure distance accurately. One common approach is to use an ultrasonic sensor such as the HC-SR04 to measure the distance between the sensor and an object. The sensor emits high-frequency sound waves and measures the time it takes for the sound waves to bounce back. Based on this time measurement, the Arduino can calculate the distance to the object.
      Another approach is to use a laser distance sensor such as the VL53L0X or the Sharp GP2Y0D810Z0F. These sensors use laser light to measure distance and can provide very accurate readings.
      There are also other sensors that can be used to measure distance, such as infrared sensors, but their accuracy may be limited and they may be affected by ambient light conditions.
      Regardless of the sensor used, the Arduino can be programmed to process the distance measurements and display them on a LCD screen or send them to a computer for further analysis.

    • @AmitGupta-un3st
      @AmitGupta-un3st Рік тому

      He made a video

  • @brucemilyko8549
    @brucemilyko8549 Рік тому

    I am legend.

  • @AmitGupta-un3st
    @AmitGupta-un3st Рік тому

    I made the homework succesful

  • @freddyveza
    @freddyveza 9 місяців тому

    I am legend, but broke my oled screen during the process of making, and was so annoyed to record the solution because of that...