Это видео недоступно.
Сожалеем об этом.

How to Use the Temperature Sensor on the Raspberry Pi Pico in C

Поделиться
HTML-код
  • Опубликовано: 17 авг 2024
  • This video covers how to use the on-board temperature sensor in the RP2040 chip on the Raspberry pi Pico. We use a Visual Studio Code project to program the brand-new Raspberry Pi Pico microcontroller board. We created a program which uses the analogue to digital converter (ADC) in the Pico to read the internal temperature of the RP2040 and does the necessary data conversion to output the temperature of the chip to a windows machine over a USB serial interface.
    This video provides a brief overview of how the temperature sensor operates. Then we set up the analogue to digital converter (ADC) to read the onboard temperature of the RP2040 chip. It also covers how to perform the required data processing to take the raw ADC output and convert it into a voltage then again into temperature. We also discuss the inaccuracies and problems you may face when using the RP2040’s on-board temperature sensor.
    The source code for this project (and a written article version) is available here: learnembeddeds...
    Timestamps
    00:00 - Introduction
    00:15 - How the Temperature Sensor works
    00:55 - What are we making?
    01:20 - Programming
    04:55 - Conclusion
    If this video helped you, please consider leaving a like and subscribing, thank you!
    To see my other videos on the Raspberry Pi Pico, check out the playlist here: • Pico Tutorials
    You can find more embedded systems tutorials and projects on my website learnembeddeds...
    -- Equipment I use regularly --
    The following links are affiliate links where I may make a small percentage on qualifying sales through these links. Use the respective UK or US links listed.
    Budget Soldering Iron: UK: amzn.to/3pQpvUu US: amzn.to/3bBawIJ
    Breadboards: UK: amzn.to/3solZCe US: amzn.to/3dGsHiS
    Jumper Cables: UK: amzn.to/37JfToi US: amzn.to/3r384S9
    Camera: UK: amzn.to/3qKLwFr US: amzn.to/3pK0V7C
    Lens: UK: amzn.to/380lQxp US: amzn.to/3knH3WL
    Tripod: UK: amzn.to/37H0Nzw US: amzn.to/3byKHsV
    All videos and tutorials on this channel and mentioned websites are for educational purposes only.

Комментарии • 21

  • @gadjetsvideo
    @gadjetsvideo 3 года назад

    Thanks for the video. I used Circuitpython and the adafruit libraries for Onewire and DS18x20 to read temp. from a DS18B20

  • @gregoriodaluzz
    @gregoriodaluzz 3 года назад +2

    Nice video! Could you do a video showing how to implement the same procedure with just ? I know it would be harder, but it would be cool to learn more about the microcontroller.

    • @LearnEmbeddedSystems
      @LearnEmbeddedSystems  3 года назад +2

      Great suggestion, I will consider this or similar for a future video! Will probably continue using the Pico c/c++ SDK for more basic tutorials but will at some point move to more low-level programming tutorials!

  • @smartinc1397
    @smartinc1397 6 месяцев назад

    Hello. Before your videos, I thought that I was cold in the room =) is it really 8 degrees there? =))
    Thank you so much for the videos, good job. Thank you. Good luck and success in this matter)) 🙂

  • @skf957
    @skf957 3 года назад +1

    Nice tutorial, thank you.
    Please take this for the genuine feedback that it is: Could you please increase the font size on your VSC. My old eyes just can't keep up!

    • @LearnEmbeddedSystems
      @LearnEmbeddedSystems  3 года назад

      Already fixed in later videos! But I appreciate your feedback, it helps make my videos better for everyone thank you.

  • @schlingelgen
    @schlingelgen 3 года назад +1

    Why is the conversion rate while using python 3.3 / 1

  • @HasanAYousef
    @HasanAYousef 3 года назад

    Great work, thanks. Can you make another one showing his to connect LCD and show the temperature on it? Thanks

  • @Ma1ne2
    @Ma1ne2 3 года назад

    Great video! I actually postet a question about this problem on Github in the pico-sdk. You helped me now realizing, how badly calibrated the sensor actually is. For me it's the other direction, sitting in a cold winter while my pico is telling me is 40 deg! I'll try and see, if I can calibrate it a little, but an external sensor is of course the better option.

  • @georgelynntone5886
    @georgelynntone5886 3 года назад +1

    Good video.

  • @brentrill
    @brentrill Год назад

    doesnt the pico ADC scale raw 12bit data to 16bit? in the while loop, your raw variable is uint16_t, yet when you convert it, you use the 12bit value.

  • @zyghom
    @zyghom 3 года назад

    thanks for your efforts, with regards to calibration (this sensor or another): would it be just a formula: value +/- the delta or much more complicated? in fact even BMP280 that I have attached to SPI requires "face tuning" I believe vs. reference sensor, thx

  • @Morkiller
    @Morkiller 3 года назад +1

    I have seen all your videos, thanks for making learning this easy!
    By the way, I have been looking for some information about using some kind of module like the MCP2515 for read messages from can bus via the SPI pins from the pico or using the pico as a "keyboard", Could you make a video showing something like that? just as a petition.

    • @LearnEmbeddedSystems
      @LearnEmbeddedSystems  3 года назад +1

      I am glad you are finding my videos helpful! I could certainly do a video regarding CAN communication, I am not sure if I have that exact chip but I can have a look around. This video will most likely be come after my SPI communication video.
      Could you please clarify what you mean by using the pico as a keyboard?

    • @Morkiller
      @Morkiller 3 года назад

      ​@@LearnEmbeddedSystems what I meant whit the "keyboard" is something like on the ESP32, where you can write an script with key commands, and it automatically execute the orders once you plug on a PC. Waiting for your next video!!

  • @kalanobody3052
    @kalanobody3052 7 месяцев назад

    CTRL+SHIFT++

  • @JoseGustavoAbreuMurta
    @JoseGustavoAbreuMurta 3 года назад

    Its too fast to see. The file “pico_sdk_import.cmake” must be in the projects directory.
    I copied from pico-examples. Thank you.

  • @Budzique
    @Budzique 3 года назад

    I cant tell you how long I scratched my head over this until I found adc_set_temp_sensor_enabled(1); because I kept getting odd values. Nice video. Check out my source code for a SSD1306 oled at my github/jbud