#369

Sdílet
Vložit
  • čas přidán 23. 07. 2024
  • How to connect sensors to a Raspberry Pi? Where to get the needed libraries? Does everything just work, or do we need to know some tricks?
    The video covers:
    - Digital Sensors
    - One wire sensors
    - I2C sensors
    - SPI sensors
    - Analog sensors
    - Serial sensors
    I am a proud Patreon of ‪@greatscottlab‬ , ‪@ElectroBOOM‬ , ‪@ELECTRONOOBS‬ , ‪@EEVblog‬ , and others. No Docker, No Microsoft Teams, Zoom
    Links:
    Raspberry Pi4 US: amzn.to/3pP32HZ
    Raspberry Pi4 DE: amzn.to/3avMga
    Commands and Programms: github.com/SensorsIot/Raspber...
    The links above usually are affiliate links that support the channel (no additional cost for you).
    Supporting Material and Blog Page: www.sensorsiot.org
    Github: www.github.com/sensorsiot
    My Patreon Page: / andreasspiess
    Discord: / discord
    If you want to support the channel, please use the links below to start your shopping. No additional charges for you, but I get a commission (of your purchases the next 24 hours) to buy new stuff for the channel
    My Amazon.com shop: www.amazon.com/shop/andreassp...
    For Banggood bit.ly/2jAQEf4
    For AliExpress: bit.ly/2B0yTLL
    For Amazon.de: amzn.to/2r0ZCYI
    For Amazon UK: amzn.to/2mxBaJf
    For ebay.com: ebay.to/2DuYXBp
    profile.php?...
    / spiessa
    www.instructables.com/member/...
    Please do not try to email me. This communication channel is reserved for my primary job
    As an Amazon Associate, I earn from qualifying purchases
    #no#midroll#ads
  • Věda a technologie

Komentáře • 324

  • @AndreasSpiess
    @AndreasSpiess  Před 3 lety +48

    Attention: @2:43: The green pins are GPIO, not Ground (Thank you, George!)

    • @AhmedAli-op6ng
      @AhmedAli-op6ng Před 3 lety +3

      Make a video on rasberry pico.

    • @typxxilps
      @typxxilps Před 3 lety +1

      I had thought that you were sitting on those new Picos from raspberry foundation to prepare such video.
      I thought you would be the first normal user, not the usual sale chain guys.
      Hope you will get such soon. Meanwhile I watch the older stuff on your channel.

  • @johnparra4791
    @johnparra4791 Před 3 lety +44

    After all these years. I still believe that you are the best Instructor.

  • @martinrcflyer4089
    @martinrcflyer4089 Před 3 lety +5

    Thank you for this video. It’s a keeper. Your video is an excellent round up of using sensors on a Pi with Python code. It is very useful, not just for those starting out but also as a good reference.

  • @Average_Geo
    @Average_Geo Před 3 lety +2

    Nicely put together tutorial, Andreas! I appreciate the tips to get things working in the boot/config.txt file and the ADC suggestion. I will definitely reference this video again for an upcoming project!

    • @AndreasSpiess
      @AndreasSpiess  Před 3 lety

      Thank you. I did not find one video covering all types of sensors. This is why I made it.

  • @catalinalb1722
    @catalinalb1722 Před 3 lety +2

    Thank you for this valueable raspberry lesson :) I did went a second time through the video step by step and wrote down all the command lines. :)

    • @AndreasSpiess
      @AndreasSpiess  Před 3 lety +1

      There is a "commands.txt" file in the repo...

  • @printednest
    @printednest Před 3 lety +5

    This channel is simply ESP online school. I am working on 3d printable projects enhanced by ESP and here I get 90% of the information. I would like some video on ESP integration connected to Amazon Alexa in future? Thank you for you amazing work :)

    • @AndreasSpiess
      @AndreasSpiess  Před 3 lety +6

      You are welcome! I do not particularly like Alexa because she does not understand Swiss German nor a "Swiss Accent" :-(

    • @printednest
      @printednest Před 3 lety +1

      @@AndreasSpiess dont worry, if it understands czech accent, it should also understand to you:), and if not, you can hack it? :)

  • @marksterling8286
    @marksterling8286 Před 3 lety

    Andreas a wonderful video, the T-coupler was very cool much more tidy than my nest of wires between my pi and the breadboard. Every project I have to take time to check for loose or bad connections. Thank you.

    • @AndreasSpiess
      @AndreasSpiess  Před 3 lety +1

      Glad you enjoyed it! Loose connections are a big pain in the a... , I agree.

  • @Salfke
    @Salfke Před 3 lety

    Usefull learning video. I've got some pi's lying around but always wanted to start with it. Maybe this is the right moment.
    Thanks

    • @AndreasSpiess
      @AndreasSpiess  Před 3 lety

      These are great boards with lots of possibilities!

  • @BarackBananabama
    @BarackBananabama Před 3 lety +1

    This is a great topic and I'll keep it in my personal library list!

  • @sanamessous1897
    @sanamessous1897 Před 2 lety

    Very helpful video with useful informations and documentation. Thank you !

  • @enricosaccheggiani3192

    Very good video. Thanks.
    Especially to connect sensors with I2C is very interesting

  • @ChrisHalden007
    @ChrisHalden007 Před 3 lety

    Excellent vidéo as always. Thank you Andreas 👍

  • @Georg161280
    @Georg161280 Před 3 lety +1

    Thank you for this video and all the work you put into this channel!
    That's pure gold for an occasional maker like me.
    Explained very well and clearly, exciting topics, important information for all
    conceivable projects and lots of input for own ideas.
    I've stumbled across the channel when I recently started playing around with an ESP32
    cam board and have now watched almost all of the videos.
    Your voice is very pleasant to hear (at least in the not very old videos, obviously
    a microphone or audio pipeline update) and the Swiss accent is very helpful for me.
    Despites I can speak English quite well i do not yet understand all of the technical terms.
    The other maker channels / videos that I have found so far are much more difficult to understand because these CZcamsrs speak much faster and less clearly.
    With your videos I learn this electronic technical terms without any effords.
    In addition, the Swiss accent sounds a lot more pleasant to me than, for
    example, Saxon, Swabian or even Oxford (maybe because I'm a Bavarian;)).
    Since I do not "use" any advertising on CZcams by haveing adblock
    active and because I am so enthusiastic about your videos, I would like
    to support the channel with a donation.
    However, I don't feel like opening another account at Patreon.
    (I'm account parsimonious since I take unattendet online accounts as savety
    threats and also to lazy to care accordingly for another one)
    Is therefore a way to send you money via e.g. PayPal or bank transfer?
    I did not find anything like this on your website or your CZcams profile.
    Please stay the way you are and don't be intimidated by any trolls or envious people.
    What you are producing here is really great and certainly a big help for interested people of all age, electronic beginners and also advanced makers!
    (Useful && interesting) --debug output value contains: "Very true!"
    --> It's the first channel i've subscribed.

    • @AndreasSpiess
      @AndreasSpiess  Před 3 lety

      Thank you for your nice words and welcome on the channel! I am glad my videos are helpful. If you want to support the channel on PayPal: AndreasSpiess@paypal.me

    • @Georg161280
      @Georg161280 Před 3 lety

      ​@@AndreasSpiess done. Best Regards.

    • @AndreasSpiess
      @AndreasSpiess  Před 3 lety

      Thank you for supporting the channel!

  • @zlobni1
    @zlobni1 Před 3 lety +1

    Thank you for the useful information!

  • @TheRintincola
    @TheRintincola Před 3 lety +1

    Great video and very useful information
    !

  • @turkerozturk6889
    @turkerozturk6889 Před 2 lety

    Very informative content. Thanks.

  • @charcomojado
    @charcomojado Před 3 lety +1

    Thank you for this guide!

  • @malnek12
    @malnek12 Před 3 lety

    Thank you for this. Keep up the great work!

  • @soilstorm
    @soilstorm Před 9 měsíci

    This is Life Saver Video for my project, I am a CSE Student and hugely struggling about the lack of knoledge I have.

    • @AndreasSpiess
      @AndreasSpiess  Před 9 měsíci

      You are a student, so you should not know everything. Otherwise you would be an expert ;-)

  • @anokhautomation4453
    @anokhautomation4453 Před 3 lety

    Very very useful information and tutorial. Thanks for sharing your valuable knowledge 🙏

  • @Jemacaza
    @Jemacaza Před 3 lety +1

    Great tutorial, thanks

  • @smartassist9700
    @smartassist9700 Před 3 lety +1

    Thank you for great video!

  • @mtarquinio
    @mtarquinio Před 3 lety +12

    Great to see some Python code on the channel. I love when you show when things don't work - in my case, I got stuck trying to make a MLX90614 work only to find out it too does not with the default 400 kHz ic2 clock frequency.

  • @rsg1296
    @rsg1296 Před 3 lety

    Sehr gut, Herr Speiss, wie immer, danke.

  • @renelefebvre53
    @renelefebvre53 Před 3 lety

    Comment dire ? Merci pour votre travail qui est excellent. Rapide, clair, direct, sans bla bla et vraiment utile pour nous, les bricoleurs avec déjà une bonne expérience en soft et hard.

    • @AndreasSpiess
      @AndreasSpiess  Před 3 lety

      Merci beaucoup! My amateur call sign is HB9BLA. So I thought, that is enough BLA,BLA ;-)

  • @GeirAtleStorhaug
    @GeirAtleStorhaug Před 3 lety

    Great video, thank you!

  • @Uncle-Duncan-Shack
    @Uncle-Duncan-Shack Před 3 lety

    Great video on a very useful subject, so much nice stuff to play with.
    That ADS1115 is something very useful, going to get some to play with.
    Perfect for something needing a fast, high resolution differential input.
    Thanks for the information.
    Kind regards,
    South Africa

    • @AndreasSpiess
      @AndreasSpiess  Před 3 lety

      Thank you. I used the ADS1115 also with ESP32 which does not have a good ADC.

  • @scrapwomblecreatives6944

    Thank you for the information I found it useful.

  • @ESGamingCentral
    @ESGamingCentral Před 5 měsíci

    Thank you for this.

  • @warrenrice1231
    @warrenrice1231 Před 3 lety

    Another awesome video

  • @raulramirez6074
    @raulramirez6074 Před 3 lety

    Excelente y muy ilustrativo como siembre, un abrazo !!

  • @erikkudra2393
    @erikkudra2393 Před 3 lety +1

    Thanks for great video. I have been considering to start learning python for long time. I guess the time is here.

    • @AndreasSpiess
      @AndreasSpiess  Před 3 lety +1

      I also see more and more signs which point in this direction.

  • @sledgeHammerRulez
    @sledgeHammerRulez Před 3 lety

    Tx Andreas, I was planning to connect a DS812 temp sensor to my pi ... and now I now how!

  • @SeanCannon_ph
    @SeanCannon_ph Před 3 lety

    I think this is the 'tube I didn't know I needed. The mud settles.... Thank you.

  • @mrtnsnp
    @mrtnsnp Před 3 lety +1

    Looking forward to your take on the Raspberry Pi Pico.

  • @VolkerKtnbch
    @VolkerKtnbch Před 3 lety

    Thanks for the pinout command. This is very handy!! A hint from me: This tool is provided by the GPIO Zero Python library, which is installed by default on the Raspberry Pi OS desktop image, but not on Raspberry Pi OS Lite.

    • @AndreasSpiess
      @AndreasSpiess  Před 3 lety

      Thanks for the info! I did not know. With the cheap SD cards, I did not use the lite version lately...

    • @VolkerKtnbch
      @VolkerKtnbch Před 3 lety

      @@AndreasSpiess By not running the GUI on devices that don't need it, you not only save space on the disk but ram and CPU cycles as well - the latter being expensive on raspi

  • @piconano
    @piconano Před 3 lety

    Very useful video. The interested parties can hit the ground running with your sample code.
    I really need to learn python properly, I can read and understand python code, but writing python code from scratch, is another story!
    Thanks God for Cut and Paste.
    It's hard to give up C, specially when I've been programing in C since 1985 :(
    Suffering from "old dog and new tricks" syndrome.

    • @AndreasSpiess
      @AndreasSpiess  Před 3 lety

      I also mainly use copy-paste. But this is ok for the moment ;-)

  • @grahamrobinson1438
    @grahamrobinson1438 Před 3 lety

    Andreas, many thanks for your excellent videos.
    I have appreciated that you have been numbering your videos. For me, who found you recently, they have been very useful for me whilst catching up on past videos.
    I notice that you have stopped the numbering. This is fine for me as I am nearly caught up.
    Perhaps you could continue numbering the videos.
    Many thanks again.
    Graham

  • @JoseBerruezo
    @JoseBerruezo Před 3 lety +11

    Nice video, I would like to see the sensor integration with node red. Regards

    • @AndreasSpiess
      @AndreasSpiess  Před 3 lety +4

      I think you can call python scripts of node-red.

    • @beware_the_moose
      @beware_the_moose Před 3 lety +2

      There must be a gpio plugin, I'm sure I've seen it either in home assistant or nodered

  • @jamesdinsmore9022
    @jamesdinsmore9022 Před 3 lety

    I like the concept of using Adafruit's CircuitPython and Arduino experience to have so many essential libraries available from one place. PIP3 takes a lot of hunting out of the equation.

  • @BerndFelsche
    @BerndFelsche Před 3 lety +1

    Do check the register alignment byte order and data type (scaling) with the MAX SPI devices. I had to reverse engineer Arduino libraries to make it work reliably in an ATtiny for translating the output to I2C... ATtiny with MAX mounted close to the sensor to minimise potential for interference. Don't recall the gruesome details but it took an all-nighter to resolve.
    P.S. Another motivation was to makes the uC use only scaled integer arithmetic for fast results and lower power... It was sending temperature on an attached RTD and the self heating had to be negligible.

    • @AndreasSpiess
      @AndreasSpiess  Před 3 lety +2

      Good to know. This is probably why I like ready-made libraries ;-) It saves me some time and Adafruit did a good job.

  • @dennyfox3139
    @dennyfox3139 Před 3 lety +2

    The default I2C pins GPIO3 and GPIO4 have 1.8K pullup resistors on the Raspberry Pi board. No need for external pullups. It's a good idea to check if the sensor boards you are using also have pullups on them too. If they do, they will be in parallel with the ones on the Pi. Most BME280 modules have 10k pullups on them, which is not low enough to cause loading issues. If you have many I2C modules connected, you may need to be concerned with too much loading and need to remove pullups from your modules.

    • @AndreasSpiess
      @AndreasSpiess  Před 3 lety +2

      You are right with the internal pull-ups. I understood that the pull-ups have to be at the end of the (long) line. That is why I mentioned the possibility.

    • @WacKEDmaN
      @WacKEDmaN Před 3 lety

      @@AndreasSpiess yup it helps when you have alot of devices on the bus.. and long lines..

  • @programatumicro
    @programatumicro Před 3 lety

    Thank you very much

  • @Hex-Mas
    @Hex-Mas Před 3 lety

    Thanks this is grate.

  • @nf1902
    @nf1902 Před 3 lety

    thanks for the upload, im using the MAX31855 and successfully recording, however i would like to use 3x thermocouples, how would i change the code to read three boards and also would the wiring be the same for the three boards except changing the cs for each one?

    • @AndreasSpiess
      @AndreasSpiess  Před 3 lety

      You have to connect each CS to another Raspberry pin and create more than one MAX31855 objects, each with a different CS pin. MOSI and SCK are all connected together.

  • @plooonk
    @plooonk Před 3 lety

    This is great, thanks for this overview. At the beginning you shortly show a screenshot of data being graphed over time. How do you create such real time graphs from your sensor readings while also storing the incoming data? Any tips or recommended software for storing and showing incoming sensor data?

    • @AndreasSpiess
      @AndreasSpiess  Před 3 lety

      I made some videos about that. Maybe you look into my Raspberry playlist.

  • @RonSheely
    @RonSheely Před 3 lety +1

    Thank you. Have you experimented with hardware interrupts on Rpi?

    • @AndreasSpiess
      @AndreasSpiess  Před 3 lety +1

      I do not plan to use interrupts on a Linux system. Its real-time capabilities seem not great...

  • @tifendro
    @tifendro Před 3 lety

    Pefect !

  • @John2009R
    @John2009R Před 3 lety

    The pinout command is great and I didn't know about it. I immediately paused the video to try it on my always on mqtt pi. It seemed to hang for quite a while and I was worried but eventually printed.

    • @AndreasSpiess
      @AndreasSpiess  Před 3 lety

      It does not work on the standard lite version.

  • @billywallace1360
    @billywallace1360 Před 3 lety

    A useful overview, thanks Andreas. i2cdetect is showing a second device at 0x1a. Did you also have an MCP9808 temperature sensor connected?

    • @AndreasSpiess
      @AndreasSpiess  Před 3 lety

      I used the Argon case and I assume it uses this address. But I did not investigate.

    • @billywallace1360
      @billywallace1360 Před 3 lety

      @@AndreasSpiess I had a quick search and there's some info on the RaspberryPi forums that suggests that you communicate with a microcontroller on that address for things like setting the fan speed or killing power. One user has written his own replacement daemon for the case (gitlab.com/DarkElvenAngel/argononed).

  • @naimfuad5913
    @naimfuad5913 Před 3 lety +1

    Great video as always! Straight to the point with 'dumb-down' explanation for beginner like me. Hopefully you can review the Raspberry Pi Pico next.

    • @AndreasSpiess
      @AndreasSpiess  Před 3 lety

      I have a few Picos on order...

    • @andremicallef804
      @andremicallef804 Před 3 lety

      @@AndreasSpiess yay will you check out the Arduino port for the Pico!

  • @ronm6585
    @ronm6585 Před 3 lety

    Thanks.

  • @WacKEDmaN
    @WacKEDmaN Před 3 lety

    great job..as always Andreas :)
    is there not a software serial library for rpi? save you disabling the shell..

    • @AndreasSpiess
      @AndreasSpiess  Před 3 lety +1

      I do not know. But you do not disable the shell. You still can use ssh.

  • @Lavabo-Quebec
    @Lavabo-Quebec Před 3 lety

    i really enjoy all your tutorial!! If possible one subject covered i would like to see would be a pi (zero or else) with MotioneyOS, a camera AND a DHT11 or DHT22 connected so we can have camera AND temperature and humidity sensor (for outdoor camera). I dont know if that is possible. MotionEye could be on another Pi with 2-3 pi-zero for camera

    • @AndreasSpiess
      @AndreasSpiess  Před 3 lety +1

      The word "and" always reduces the number of interested viewers (intersection of two interests). So that is not a good word for a CZcamsr ;-)

  • @InfiniteWonderz2
    @InfiniteWonderz2 Před 3 lety +2

    New episode! Hands on knees, back straight and sitting in front row!

    • @grmasdfII
      @grmasdfII Před 3 lety

      Hands on pen and paper, you're supposed to take notes!

    • @AndreasSpiess
      @AndreasSpiess  Před 3 lety

      @
      InfiniteWonderz : Thank you!
      @grmasdfil: CZcams has a replay function ;-)

    • @BerndFelsche
      @BerndFelsche Před 3 lety

      I've got wobble juice in one hand. Temporarily.

  • @ralph9987
    @ralph9987 Před 3 lety

    This was awesome video. as a noob, i had no idea of what was going on. can you suggest a dummies guide 101 to this topic please, maybe somwething that discusses only one sensor at a time and a step by step tutorial? cheers and thanks

    • @AndreasSpiess
      @AndreasSpiess  Před 3 lety

      Just enter the name of the sensor and Raspberry Pi into Google

  • @mikewillis1592
    @mikewillis1592 Před 3 lety +13

    Hope you are going to cover the new PI microcontroller boards, the PI Pico soon. I have a pair on order. They are only €4 each.

    • @AndreasSpiess
      @AndreasSpiess  Před 3 lety +6

      Me too have a few on order...

    • @userou-ig1ze
      @userou-ig1ze Před 3 lety +1

      is better than the esp32 chips, and new esp32-s3 chips, I wonder?

    • @usufcom
      @usufcom Před 3 lety

      Interested to see the processing power for speech and video in action

    • @Ownedyou
      @Ownedyou Před 3 lety +2

      @@userou-ig1ze no, they are not "better" as they don't have a wireless interface, touch detection and a few other things. Also they are slower. But they are more energy efficient and may be usefull for projects that don't require the ESP32 horsepower. ESP32 modules are cheaper but if you want a dev board, I don't know if you can get a ESP32 devboard for 4Eur.

    • @shadow7037932
      @shadow7037932 Před 3 lety

      @@AndreasSpiess when you review it, can you make sure to compare it to the STM32 Fs and the MCU used in the Teensy 4.1 in terms of raw performance as well as power usage please?

  • @crckdns
    @crckdns Před 3 lety

    Thanks for that!
    I wanted to try the new micro raspberry and this video will be useful!
    Edit: pico i mean

    • @AndreasSpiess
      @AndreasSpiess  Před 3 lety +1

      I am not sure if Circuitpython runs on the Pico. They decided for Micropython.

    • @crckdns
      @crckdns Před 3 lety

      @@AndreasSpiess but... :(
      Don't destroy my dreams just when i discover something new 🙀😹

    • @AndreasSpiess
      @AndreasSpiess  Před 3 lety +1

      A beta should run...

    • @crckdns
      @crckdns Před 3 lety

      @@AndreasSpiess thanks, will try

  • @mikehensley78
    @mikehensley78 Před 3 lety +2

    i did a Heltec ESP8266 WiFi Kit 8 with micropython after uploading a ssd1306 lib file it took like 10 lines of code to print 3 lines of text on the screen! super easy! pretty different from arduino. i hope you do more videos on micro-python! :)

  • @mytube1000javed
    @mytube1000javed Před 3 lety

    Hi
    Great useful video as usual.
    I have a question: how to use a Lidar sensor as a mouse or for making touch screen sensor for any lcd or led display.

  • @y2ksw1
    @y2ksw1 Před 3 lety

    Now you have covered this argument, you gotta do also the Raspberry Pi Microcontroller 😄
    That one however has ADC converters and some other yummy features, and is way more affordable than the Arduino.

  • @csongorvarga
    @csongorvarga Před 3 lety

    You had a video where you mention which type of mosfet you like to use to switch loads on EPS pins. Do you remember which one was that? And which mosfet?

    • @AndreasSpiess
      @AndreasSpiess  Před 3 lety +1

      I used MOSFETS in different videos. For 3.3 V, I usually use logic level MOSFETS like the IRLB8721 or the IRLZ44. These are N-channel. For 5 volt a lot more FETS should work.

  • @bobrowles43
    @bobrowles43 Před 2 lety

    Thank you as usual. Still relatively new so this may be a basic question. Are you using the CircuitPython libraries in the standard python3 interpreter? I assumed you had to be in CircuitPython to use those.

    • @AndreasSpiess
      @AndreasSpiess  Před 2 lety

      Micropython is not the same as "real" python. So I would not trust that a mix will work. But you can try...

  • @userou-ig1ze
    @userou-ig1ze Před 3 lety

    @5:12: the libraries from circuit python are not easily usable! Only if you have an esp32-s2 (ironically, less powerful and no bluetooth!) and solder a new usb connection, you can *actually* use circuit python. The native esp32 support has been discontinued and is only supported as an additional 'wifi/heavy lifting' module ('airlift'). I really would like to know if there's an easy 'plug and play' possibility!

    • @AndreasSpiess
      @AndreasSpiess  Před 3 lety

      You are right. I was not specific enough. The S2 will get some followers. S3, S4 .... Also the new Pi Pico will be supported by Circuitpython.

  • @McTroyd
    @McTroyd Před 3 lety

    I thought most I2C devices were 100 KHz, but some could manage faster? Or is my information out of date? Thanks for the video in any case! I didn't even realize the RPi supported 1-wire.

  • @tmate8215
    @tmate8215 Před 2 lety

    Nice video thanks. Have you looked at coding on Raspberry Pi remotely with Visual Studio Code using the Remote Development extension?

    • @AndreasSpiess
      @AndreasSpiess  Před 2 lety

      No. I mostly use the Pi as a server, and not for realtime stuff. There I use microcontrollers

  • @LeXXai
    @LeXXai Před 3 lety

    Nice. But one problem of Pi devices work without hardware Interrupt on userland space inside of linux os environment.
    But for all sensors used pool method for get data. And CPU on this time can't sleep.

    • @AndreasSpiess
      @AndreasSpiess  Před 3 lety

      Not a lot of my projects use interrupts. Then I still have my MCUs...

  • @jackpatteeuw9244
    @jackpatteeuw9244 Před 3 lety

    What do you suggest for reading shaft speed (RPM) ? There are a couple of different types of sensors (optical, Hall Effect, magnetic, etc.)

    • @AndreasSpiess
      @AndreasSpiess  Před 3 lety

      You can use optical and magnetic as you like. Depending on your situation. I have no preference.

    • @jackpatteeuw9244
      @jackpatteeuw9244 Před 3 lety

      @@AndreasSpiess How do you connect them to a RPi and what library is need to read them ?

    • @AndreasSpiess
      @AndreasSpiess  Před 3 lety

      I made a video on how to connect sensors to a Raspberry

  • @dreamcat4
    @dreamcat4 Před 3 lety +1

    For the more adventurous programmer, you can also learn Rust on the RPi. And it includes embedded libraries for accessing pheripherals on the 40 pin header. Rust is an excellent candidate language for embedded software, and so your same program can then be ported to also run on cheaper embedded MCU platforms. Such as ESP32, Nordic NRF, etc.

    • @AndreasSpiess
      @AndreasSpiess  Před 3 lety

      I do not know Rust. But for the moment everything is pointing in the direction of Python in this field :-(

    • @dreamcat4
      @dreamcat4 Před 3 lety

      Rust is the language that tries to do all memory safety at compile time. So it gives many detailed compiler errors, to ensure that your code does not have memory leaks or buffer overruns. This also means there is no performance overheads of a garbage collector. And compiled rust is as fast as C/C++. Because in other languages to the runtime memory management cleanup task can randomly interrupt your program to perform cleanup duties. Rust does not have it. Also rust has a good interfaces / modules types system. And otherwise has some very advanced and modern language features. Rust forces the developer to do more work to achieve a given level of program functionality. But the trade is a fair one, that the programs you write are going to be less buggy and of a higher quality. Thanks to having to fix all of the many compiler errors. In Rust, the built in help system is the compiler itself. So not you know what rust really is. It is meant to be a very modern language. With very modern features. And also address the issue of memory management in C and C++. But without also adding the performance burden of a runtime.

    • @dreamcat4
      @dreamcat4 Před 3 lety

      In other words: you cannot have your cake and eat it. You have to prioritize at the language level which features of the programming language are more important to you. It is very much a trade off. This is the progress poiint where we are as civilization in the year 2021.
      Actually there are 2 main solutions to this difficult problem. One solution already exists: which is to use a very well integrated and well optimized development platform such as Apple iOS. In such a system you have to do everything through the official Apple API calls. And then Apple can do a lot of hard work behind the scenes to optimize and have an amazing runtime in those libraries. Which can then work well with apples very specific and well integrated hardware resources. To ensure all programs can access those resources in a most effecient way. Of course also making the developer obey these very proprietary runtime APIs. And they only work well on apple hardware.
      The other second solution is to hope in future we get new technological advances and breakthroughs in the runtimes of open source projects. That address the issues of existing runtimes in existing languages. However that is very complicated and difficult work. And you cannot really do it in an existing language with an existing runtime. Because then it will very often break backwards compatibility. It is instead easier to start from the point where rust is. Which is to say: without a mandatory runtime. Although rust does have a very limited optional runtime. It is not a full memory management / garbage collector etc.

    • @AndreasSpiess
      @AndreasSpiess  Před 3 lety

      Thank you for you information. As you indicate, for me the most important fact is the "ecosystem". For microcontrollers and hobby it should contain lots of libraries, examples, and a community which solved and openly documented all problems I will encounter. Then the fun per time factor is highest. These criteria are different if you want to build commercial applications. But with "Agile" I see these two areas coming closer...

    • @reeldeelz2940
      @reeldeelz2940 Před 3 lety

      Another language with python like syntax and great C interop is Nim which works well with microcontrollers such as esp32 because garbage collection is optional..

  • @krukhlis
    @krukhlis Před 3 lety

    BTW, do you plan to review new Raspberry silicon? I mean their new custom microcontroller. I believe one of the reason they have produced it is actually to serve as a middle tier between realtime-sensors processing and slow-poke RPi mainboards under RPiOS control.

  • @sayantanmaiti2513
    @sayantanmaiti2513 Před 3 lety

    Should I buy the Pi4 B with the 8gb ram? Since I heard it had some problems with overheating and software bugs, I'm confused a bit

  • @ScienceLab760
    @ScienceLab760 Před 3 lety

    hi very interesting video, thanks for share, maybe possible send the values obtain of sensors from raspberry to one website and make remote estation to get information, thanks.

  • @DougHanchard
    @DougHanchard Před 3 lety

    Nicely done Andreas!
    Have you experimented with using the newest Raspberry Pi and connect it to an Arduino board with sensors already connected to Arduino C++ sensors and edit the data output to be ported to the raspberry via GPIO?

    • @AndreasSpiess
      @AndreasSpiess  Před 3 lety +1

      No. Most of my sensors are on ESP32 and I use wireless/MQTT

  • @SzymonJakubiak
    @SzymonJakubiak Před 3 lety +1

    Old ESP32 modules are not supported by the current version of CircuitPython. As CircuitPython is not compatible with MicroPython you can't use the same libraries on these chips. Only new ESP32-S2 microcontrollers are supported by CircuitPython.

  • @Hassanmohamed-lf4sg
    @Hassanmohamed-lf4sg Před 3 lety

    @Andreas Spiess
    Hello Andreas,
    I am trying to read an accelerometer data stream using arduino nano 33 ble, i get the device conntected and subscribe to the characteristic. but still having problems with getting the values, it would be really nice if you can help me getting it work. thanks and by the way nice and very informative videos :)

    • @AndreasSpiess
      @AndreasSpiess  Před 3 lety

      Unfortunately I cannot do remote debugging :-( But I am sure you find the problem if you check every function alone before you try everything together.

  • @186scott
    @186scott Před rokem

    I am making a digital Speedo and wondering how do I connect a speed sensor to the raspberry pi and how to program it as the speed sensor does 6 pulses every 1 revolution

    • @AndreasSpiess
      @AndreasSpiess  Před rokem

      Linux systems are not good for real time applications. So if you need to measure exact times, maybe you use an Arduino or an ESP32 for the measuring and connect it to the Raspberry via Serial or WiFi.

    • @186scott
      @186scott Před rokem

      @@AndreasSpiess I will keep that in mind if the way I plan on doing it doesn't work as I have the code working out the speed but for the displaying of the speed it updates every X milliseconds ( I would like to have an Arduino do that and send the data to the raspberry pi but I don't have alot of room as it will be going into a classic mini with a center speedo so it is unfortunately rather cramped

  • @wanderingsaint2659
    @wanderingsaint2659 Před 2 lety

    can you please do a video on grove ultrasonic sensor with raspberrypi setup and software

  • @rickharold7884
    @rickharold7884 Před 2 lety

    Cool

  • @PankajNikam
    @PankajNikam Před 3 lety

    Hi Andreas, I love your videos and I would like you to make a video of Raspberry Pi Pico :)

    • @AndreasSpiess
      @AndreasSpiess  Před 3 lety +1

      You have to sleep one night (or become a Patreon) ;-)

    • @PankajNikam
      @PankajNikam Před 3 lety

      @@AndreasSpiess You are the best Andreas :) I respect you a lot. Thank you for the reply.

  • @petittoto7433
    @petittoto7433 Před 3 lety +1

    I don't expect to use Raspberry, so why do I watch the video to the end ?
    But I didn't know that parts of Switzerland are so low, the Leman is at 370m, I checked and 8:48 220m is possible. Thank you !

    • @AndreasSpiess
      @AndreasSpiess  Před 3 lety

      We are on 350m. And it is always good to know the competition ;-)

  • @mannhansen9337
    @mannhansen9337 Před 3 lety

    I have done some testing of DHT11 and BME280 lately. using Python and C. They will only transmit garbage when connected to 3.3 V. When using 5 Volts they work perfectly since middle of December. The wires used are Dupont female-female and about 10 cm's long. The sensors are breakout boards from Ebay. Just my 2 cents.

    • @AndreasSpiess
      @AndreasSpiess  Před 3 lety

      Thank you for sharing your experience. I always look at the datasheets of the sensors or boards. Sometimes they include a 3.3 volt regulator, sometimes not.

    • @mannhansen9337
      @mannhansen9337 Před 3 lety

      @@AndreasSpiess At lot of the El Cheapo stuff on Ebay has no datasheet or a schematic. I use my Tektronix 465 scope or Salae Logic analyzer to troubleshoot.The DHT11 sensor has a very high D.O.A rate and should be avoided.They also stop working after 3-4 years. Use the DHT22 or DHT12 (I2C) instead. Then comes BME280 from Bosch. This is a very good sensor but when you buy one on Ebay there is great chance that you get a BMP280. Without humidity sensor. The I2C address is most often 0x76 for BME280 or 0x77 not so often. Use an I2C scanner if in doubt.

  • @del_v000
    @del_v000 Před 3 lety

    I am interested in lora satellites and I have seen your videos about two small satellites. please prefer me some links so that I could gain some knowledge.

  • @francescofaccodelagarda5408

    Good evening Andreas!
    I have been following your wonderful youtube channel for a long time, and I really cant thank you enough...
    I wanted to ask you a little advice:
    I am trying to connect a RFID reader to Raspberry (No problem there), but I have also connected a touch display. The touch display wants to use exclusively the following Pins (which, from docs I have, the RFID ariel also needs):
    PIN 19 (MOSI)
    PIN 21 (MISO)
    PIN 23 (SCK)
    PIN 22 (GPIO 6)..
    Do you think I can put the RFID on other pins or is it an impossible task (I could use an Arduino and connect via USB but I'd rather not if at all possible)
    THank you for ANY advice you can give.

    • @AndreasSpiess
      @AndreasSpiess  Před 3 lety

      Google "SPI interface". You will see: MISO, MOSI, and SCK are in parallel for all sensors. Only CS or CE (Chip select) is a separate pin for each device. You have to tell your code which pin you use.

    • @francescofaccodelagarda5408
      @francescofaccodelagarda5408 Před 3 lety

      @@AndreasSpiess Thank you very much you wonder swiss-person!!

  • @MrPlastkort
    @MrPlastkort Před 3 lety

    I have a tinkerboard.. can i use raspbian so it can become 100 % raspi ?

  • @noamw3841
    @noamw3841 Před 3 lety

    Great video! What are the advantages of connecting a sensor to the raspberry pi instead of through an arduino?

    • @junaidpv
      @junaidpv Před 3 lety

      If the project works fine with arduino. Then arduino is the right choice. Most of the projects won't require a computer like Raspberry Pi.

    • @AndreasSpiess
      @AndreasSpiess  Před 3 lety +1

      I use the Raspberry for data storage and user interface. If the Raspberry is close to the action it makes no sense to use an additional Arduino.

  • @chuxxsss
    @chuxxsss Před 3 lety

    17 has before I see your vlog Andreas. Hot here in Australia so not going prospecting. Like we have hobbies mate.

    • @AndreasSpiess
      @AndreasSpiess  Před 3 lety

      I just was outside. It snows and is cold. Still better on your side, I think.

    • @chuxxsss
      @chuxxsss Před 3 lety

      @@AndreasSpiess No lock down here. We are safe at present. Temperature has dropped to 25 degrees here. I am hoping it changes for you soon as I just found relatives in Holland. Stay safe Andreas. Think I will go gold prospecting this weekend. That does not say things could not change here fast, but we take each day as it comes.

  • @shingamie6509
    @shingamie6509 Před 11 dny

    Greetings from Bodensee:) Kurze Frage , ist es möglich mehrere abstandsensoren zu installieren ? Wenn ja wie?

    • @AndreasSpiess
      @AndreasSpiess  Před dnem

      Weiss ich nicht. Kommt auf vieles an: Sensortyp, Interfaces (Pins) und Software. Ich würde nach ähnlichen Projekten googlen.

  • @lottery248
    @lottery248 Před 3 lety

    looking forward that the Raspberry Pi 5 to have faster I/O for even more sensors lol.

    • @AndreasSpiess
      @AndreasSpiess  Před 3 lety

      You saw that we had to throttle the speed to read one of the sensors. It is fast enough for that purpose...

  • @YandiBanyu
    @YandiBanyu Před 3 lety

    Hey, I just found out today about Raspberry Pi Pico. Maybe you should take a look at it!

  • @ivko5673
    @ivko5673 Před 7 měsíci

    Will it works if i install Ubuntu on my raspberry pi, i mean - can i plug in sensors to raspberry?(i suppose -yes, but in not sure)

    • @AndreasSpiess
      @AndreasSpiess  Před 6 měsíci

      I never used Ubuntu, so I do not know.

    • @ivko5673
      @ivko5673 Před 6 měsíci

      @@AndreasSpiess thanks a lot). I'm going to check it)

  • @PhG1961
    @PhG1961 Před 3 lety

    Indeed interesting ! As usual. You probably didn't expect any other comment....

    • @AndreasSpiess
      @AndreasSpiess  Před 3 lety

      Thank you. The video currently performs bad. Rank 10 of 10. This is not what I have expected :-(

    • @PhG1961
      @PhG1961 Před 3 lety

      @@AndreasSpiess Strange. This is a very interesting topic and very usefull. Maybe people are a bit tired of over exposure to their computer and/or CZcams because of lockdowns and staying indoor. I'm sure the video will gain interest especially with the new Rasb. Pico being available. I already ordered 3 of those. I'll promote the video to my contacts and think alikes... ;-)

  • @andreasrivera3516
    @andreasrivera3516 Před 2 lety

    I have an arduino. But raspberry pi sensors. Can I use them on my arduino?

    • @AndreasSpiess
      @AndreasSpiess  Před 2 lety

      You have to check if they support the 5 volt of the Arduino. Then you can use them.

  • @MisterkeTube
    @MisterkeTube Před 3 lety

    Unfortunately an OS like Linux makes it much more difficult to get 100% correct timing when needed. Ex. if you want to send or receive high-frequency signals, an Arduino (or Attiny or ESP8266 or ESP32 or STM32 or ...) is just way easier because you can get the timing correct with just delays (or real timer- or pin-interrupts). On a Pi, your process can get pre-empted at the critical moment, messing up the crucial timing. Optimized mechanisms as in the pigpio package can reduce the problem a bit, but are way more difficult to use. I tend to do real-time stuff on a uP (ex. Attiny84) and have it communicate with the Pi using a protocol that the Pi can handle without glitches.

    • @AndreasSpiess
      @AndreasSpiess  Před 3 lety +1

      You are right: Real-time applications are in the domain of microcontrollers.

  • @AmazingMj07
    @AmazingMj07 Před 3 lety +1

    👍👍

  • @phoebebright
    @phoebebright Před 3 lety

    Github link not complete :-/.

  • @jkaart
    @jkaart Před 3 lety

    Btw, do you know Ruuvitag's?

    • @AndreasSpiess
      @AndreasSpiess  Před 3 lety

      I tried to buy one. Unfortunately it does not work with Paypal :-(

  • @Cam2Art
    @Cam2Art Před 3 lety +1

    There is one BIG BIG downside to Circuitpython, interrupts are not supported. This obviates the real time support for example, endstop alerts which can be simply handled with the RPi.GPIO library add_event_detect function. This also includes certain i2c multiplexer which provide an interrupts based on the client state change

    • @AndreasSpiess
      @AndreasSpiess  Před 3 lety

      AFAIK I only used the circuitpython libraries and standard Python. Maybe you can combine the two libraries,I do not know. Anyway, interrupts ans linux is not the preferred combination for me...

    • @Cam2Art
      @Cam2Art Před 3 lety

      @@AndreasSpiess I just tested on a Pi Zero and the Circuitpython libraries do not conflict. There is an improved RPI GPIO library called gpiozero which encapsulates and simplifies the RPi.GPO functionality and provides high level interfaces to Buttons, Led, i2c, spi etc. My complaint really is that the Circuitpython standalone environment in comparison to Micropython does not support interrupts or treads.

    • @AndreasSpiess
      @AndreasSpiess  Před 3 lety

      I mentioned GPIOZERO. But it does not support many sensors. I am not sure if threads are not supported on the Pi. I do not use interrupts on Linux systems.

    • @Cam2Art
      @Cam2Art Před 3 lety

      @@AndreasSpiess The gpiozero, all lower case, is a high level wrapper of RPi.GPIO

    • @Cam2Art
      @Cam2Art Před 3 lety

      @@AndreasSpiess and in addition to supporting many sensors and peripherals, for example, Light, Distance, Servo and etc.. also wraps RPI architecture from a board perspective.

  • @stephenjames2951
    @stephenjames2951 Před 3 lety

    Zooming in on some of the text displays would would help.

    • @AndreasSpiess
      @AndreasSpiess  Před 3 lety

      Unfortunately I do not have this possibility :-(

    • @stephenjames2951
      @stephenjames2951 Před 3 lety

      @@AndreasSpiess Thanks for the content, I have a project with my brother replacing an arduino with RPI so this is quite timely.

  • @christianf1480
    @christianf1480 Před 3 lety +1

    Good video.
    First, like you, I start with Python librairies and Python code for I2C temperature sensor (also humidity and pressure).
    Then I found some C code that was able to do system calls in order to communicate on I2C.
    github.com/prisme60/BMP280
    And finaly, I see that the driver for BME280 and HTU21 already exists in the Linux kernel, but the only way to use them was to create my own device tree module.
    github.com/prisme60/dts_sensors_rpi
    You need to use a specific device tree compiler for raspberry that is able to compile fragments.

  • @frankb575
    @frankb575 Před 3 lety

    Currently I used a arduino as an I2C-ADC, simply because I didn’t had the necessary board.