#369

  Переглядів 93,134

Andreas Spiess

Andreas Spiess

День тому

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

КОМЕНТАРІ: 322
@AndreasSpiess
@AndreasSpiess 3 роки тому
Attention: @2:43: The green pins are GPIO, not Ground (Thank you, George!)
@AhmedAli-op6ng
@AhmedAli-op6ng 3 роки тому
Make a video on rasberry pico.
@typxxilps
@typxxilps 3 роки тому
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 3 роки тому
After all these years. I still believe that you are the best Instructor.
@AndreasSpiess
@AndreasSpiess 3 роки тому
Thank you!
@Average_Geo
@Average_Geo 3 роки тому
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 3 роки тому
Thank you. I did not find one video covering all types of sensors. This is why I made it.
@martinrcflyer4089
@martinrcflyer4089 3 роки тому
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.
@AndreasSpiess
@AndreasSpiess 3 роки тому
Glad it was helpful!
@catalinalb1722
@catalinalb1722 3 роки тому
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 3 роки тому
There is a "commands.txt" file in the repo...
@printednest
@printednest 3 роки тому
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 3 роки тому
You are welcome! I do not particularly like Alexa because she does not understand Swiss German nor a "Swiss Accent" :-(
@printednest
@printednest 3 роки тому
@@AndreasSpiess dont worry, if it understands czech accent, it should also understand to you:), and if not, you can hack it? :)
@Georg161280
@Georg161280 3 роки тому
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 UKpostsrs 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 UKposts 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 UKposts 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 3 роки тому
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 3 роки тому
​@@AndreasSpiess done. Best Regards.
@AndreasSpiess
@AndreasSpiess 3 роки тому
Thank you for supporting the channel!
@mtarquinio
@mtarquinio 3 роки тому
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.
@AndreasSpiess
@AndreasSpiess 3 роки тому
Thanks for the info about the MLX90614!
@Salfke
@Salfke 3 роки тому
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 3 роки тому
These are great boards with lots of possibilities!
@marksterling8286
@marksterling8286 3 роки тому
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 3 роки тому
Glad you enjoyed it! Loose connections are a big pain in the a... , I agree.
@anokhautomation4453
@anokhautomation4453 2 роки тому
Very very useful information and tutorial. Thanks for sharing your valuable knowledge 🙏
@AndreasSpiess
@AndreasSpiess 2 роки тому
You are welcome!
@enricosaccheggiani3192
@enricosaccheggiani3192 3 роки тому
Very good video. Thanks. Especially to connect sensors with I2C is very interesting
@AndreasSpiess
@AndreasSpiess 3 роки тому
Agreed. Most sensors I use are I2C
@BarackBananabama
@BarackBananabama 3 роки тому
This is a great topic and I'll keep it in my personal library list!
@AndreasSpiess
@AndreasSpiess 3 роки тому
That is what I was hoping for ;-)
@soilstorm
@soilstorm 6 місяців тому
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 6 місяців тому
You are a student, so you should not know everything. Otherwise you would be an expert ;-)
@sanamessous1897
@sanamessous1897 Рік тому
Very helpful video with useful informations and documentation. Thank you !
@AndreasSpiess
@AndreasSpiess Рік тому
You are welcome!
@zlobni1
@zlobni1 3 роки тому
Thank you for the useful information!
@AndreasSpiess
@AndreasSpiess 3 роки тому
Glad it was helpful!
@ChrisHalden007
@ChrisHalden007 3 роки тому
Excellent vidéo as always. Thank you Andreas 👍
@AndreasSpiess
@AndreasSpiess 3 роки тому
Glad you liked it!
@TheRintincola
@TheRintincola 3 роки тому
Great video and very useful information !
@AndreasSpiess
@AndreasSpiess 3 роки тому
Glad it was helpful!
@malnek12
@malnek12 2 роки тому
Thank you for this. Keep up the great work!
@AndreasSpiess
@AndreasSpiess 2 роки тому
You are welcome!
@charcomojado
@charcomojado 3 роки тому
Thank you for this guide!
@AndreasSpiess
@AndreasSpiess 3 роки тому
You are welcome!
@turkerozturk6889
@turkerozturk6889 2 роки тому
Very informative content. Thanks.
@AndreasSpiess
@AndreasSpiess 2 роки тому
You are welcome!
@SeanCannon_ph
@SeanCannon_ph 3 роки тому
I think this is the 'tube I didn't know I needed. The mud settles.... Thank you.
@AndreasSpiess
@AndreasSpiess 3 роки тому
You are welcome. Maybe you need it later...
@SeanCannon_ph
@SeanCannon_ph 3 роки тому
@@AndreasSpiess Now and later!
@Palominostudio
@Palominostudio 3 роки тому
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 3 роки тому
Thank you. I used the ADS1115 also with ESP32 which does not have a good ADC.
@grahamrobinson1438
@grahamrobinson1438 3 роки тому
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
@AndreasSpiess
@AndreasSpiess 3 роки тому
The 10 last videos never had numbers. But they will get one later...
@grahamrobinson1438
@grahamrobinson1438 3 роки тому
@@AndreasSpiess thank you.
@scrapwomblecreatives6944
@scrapwomblecreatives6944 3 роки тому
Thank you for the information I found it useful.
@AndreasSpiess
@AndreasSpiess 3 роки тому
Glad to hear it!
@Jemacaza
@Jemacaza 3 роки тому
Great tutorial, thanks
@AndreasSpiess
@AndreasSpiess 3 роки тому
You're welcome!
@VolkerKtnbch
@VolkerKtnbch 3 роки тому
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 3 роки тому
Thanks for the info! I did not know. With the cheap SD cards, I did not use the lite version lately...
@VolkerKtnbch
@VolkerKtnbch 3 роки тому
@@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
@JoseBerruezo
@JoseBerruezo 3 роки тому
Nice video, I would like to see the sensor integration with node red. Regards
@AndreasSpiess
@AndreasSpiess 3 роки тому
I think you can call python scripts of node-red.
@beware_the_moose
@beware_the_moose 3 роки тому
There must be a gpio plugin, I'm sure I've seen it either in home assistant or nodered
@smartassist9700
@smartassist9700 3 роки тому
Thank you for great video!
@AndreasSpiess
@AndreasSpiess 3 роки тому
My pleasure!
@mrtnsnp
@mrtnsnp 3 роки тому
Looking forward to your take on the Raspberry Pi Pico.
@AndreasSpiess
@AndreasSpiess 3 роки тому
They are on order...
@ESGamingCentral
@ESGamingCentral 2 місяці тому
Thank you for this.
@AndreasSpiess
@AndreasSpiess 2 місяці тому
My pleasure!
@raulramirez6074
@raulramirez6074 3 роки тому
Excelente y muy ilustrativo como siembre, un abrazo !!
@AndreasSpiess
@AndreasSpiess 3 роки тому
Gracias!
@rsg1296
@rsg1296 3 роки тому
Sehr gut, Herr Speiss, wie immer, danke.
@AndreasSpiess
@AndreasSpiess 3 роки тому
Bitte, gern geschehen.
@sledgeHammerRulez
@sledgeHammerRulez 3 роки тому
Tx Andreas, I was planning to connect a DS812 temp sensor to my pi ... and now I now how!
@AndreasSpiess
@AndreasSpiess 3 роки тому
I hope it will work!
@GeirAtleStorhaug
@GeirAtleStorhaug 3 роки тому
Great video, thank you!
@AndreasSpiess
@AndreasSpiess 3 роки тому
Glad you liked it!
@renelefebvre53
@renelefebvre53 3 роки тому
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 3 роки тому
Merci beaucoup! My amateur call sign is HB9BLA. So I thought, that is enough BLA,BLA ;-)
@warrenrice1231
@warrenrice1231 3 роки тому
Another awesome video
@AndreasSpiess
@AndreasSpiess 3 роки тому
Thank you!
@erikkudra2393
@erikkudra2393 3 роки тому
Thanks for great video. I have been considering to start learning python for long time. I guess the time is here.
@AndreasSpiess
@AndreasSpiess 3 роки тому
I also see more and more signs which point in this direction.
@piconano
@piconano 3 роки тому
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 3 роки тому
I also mainly use copy-paste. But this is ok for the moment ;-)
@BerndFelsche
@BerndFelsche 3 роки тому
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 3 роки тому
Good to know. This is probably why I like ready-made libraries ;-) It saves me some time and Adafruit did a good job.
@plooonk
@plooonk 3 роки тому
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 3 роки тому
I made some videos about that. Maybe you look into my Raspberry playlist.
@RonSheely
@RonSheely 3 роки тому
Thank you. Have you experimented with hardware interrupts on Rpi?
@AndreasSpiess
@AndreasSpiess 3 роки тому
I do not plan to use interrupts on a Linux system. Its real-time capabilities seem not great...
@WacKEDmaN
@WacKEDmaN 3 роки тому
great job..as always Andreas :) is there not a software serial library for rpi? save you disabling the shell..
@AndreasSpiess
@AndreasSpiess 3 роки тому
I do not know. But you do not disable the shell. You still can use ssh.
@billywallace1360
@billywallace1360 3 роки тому
A useful overview, thanks Andreas. i2cdetect is showing a second device at 0x1a. Did you also have an MCP9808 temperature sensor connected?
@AndreasSpiess
@AndreasSpiess 3 роки тому
I used the Argon case and I assume it uses this address. But I did not investigate.
@billywallace1360
@billywallace1360 3 роки тому
@@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).
@dennyfox3139
@dennyfox3139 3 роки тому
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 3 роки тому
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 3 роки тому
@@AndreasSpiess yup it helps when you have alot of devices on the bus.. and long lines..
@jamesdinsmore9022
@jamesdinsmore9022 3 роки тому
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.
@AndreasSpiess
@AndreasSpiess 3 роки тому
I liked it too :-)
@John2009R
@John2009R 3 роки тому
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 3 роки тому
It does not work on the standard lite version.
@Lavabo-Quebec
@Lavabo-Quebec 3 роки тому
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 3 роки тому
The word "and" always reduces the number of interested viewers (intersection of two interests). So that is not a good word for a UKpostsr ;-)
@bobrowles43
@bobrowles43 2 роки тому
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 2 роки тому
Micropython is not the same as "real" python. So I would not trust that a mix will work. But you can try...
@mytube1000javed
@mytube1000javed 3 роки тому
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.
@AndreasSpiess
@AndreasSpiess 3 роки тому
I do not know how this should work :-(
@mikewillis1592
@mikewillis1592 3 роки тому
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 3 роки тому
Me too have a few on order...
@userou-ig1ze
@userou-ig1ze 3 роки тому
is better than the esp32 chips, and new esp32-s3 chips, I wonder?
@usufcom
@usufcom 3 роки тому
Interested to see the processing power for speech and video in action
@Ownedyou
@Ownedyou 3 роки тому
@@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 3 роки тому
@@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?
@InfiniteWonderz2
@InfiniteWonderz2 3 роки тому
New episode! Hands on knees, back straight and sitting in front row!
@grmasdfII
@grmasdfII 3 роки тому
Hands on pen and paper, you're supposed to take notes!
@AndreasSpiess
@AndreasSpiess 3 роки тому
@ InfiniteWonderz : Thank you! @grmasdfil: UKposts has a replay function ;-)
@BerndFelsche
@BerndFelsche 3 роки тому
I've got wobble juice in one hand. Temporarily.
@nf1902
@nf1902 2 роки тому
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 2 роки тому
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.
@crckdns
@crckdns 3 роки тому
Thanks for that! I wanted to try the new micro raspberry and this video will be useful! Edit: pico i mean
@AndreasSpiess
@AndreasSpiess 3 роки тому
I am not sure if Circuitpython runs on the Pico. They decided for Micropython.
@crckdns
@crckdns 3 роки тому
@@AndreasSpiess but... :( Don't destroy my dreams just when i discover something new 🙀😹
@AndreasSpiess
@AndreasSpiess 3 роки тому
A beta should run...
@crckdns
@crckdns 3 роки тому
@@AndreasSpiess thanks, will try
@y2ksw1
@y2ksw1 3 роки тому
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.
@AndreasSpiess
@AndreasSpiess 3 роки тому
Challenge accepted
@programatumicro
@programatumicro 3 роки тому
Thank you very much
@AndreasSpiess
@AndreasSpiess 3 роки тому
You are welcome!
@Hex-Mas
@Hex-Mas 3 роки тому
Thanks this is grate.
@AndreasSpiess
@AndreasSpiess 3 роки тому
You're welcome!
@ralph9987
@ralph9987 3 роки тому
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 3 роки тому
Just enter the name of the sensor and Raspberry Pi into Google
@DougHanchard
@DougHanchard 3 роки тому
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 3 роки тому
No. Most of my sensors are on ESP32 and I use wireless/MQTT
@mikehensley78
@mikehensley78 3 роки тому
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! :)
@AndreasSpiess
@AndreasSpiess 3 роки тому
We will see ;-)
@userou-ig1ze
@userou-ig1ze 3 роки тому
@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 3 роки тому
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.
@krukhlis
@krukhlis 3 роки тому
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.
@AndreasSpiess
@AndreasSpiess 3 роки тому
I plan a video, yes.
@McTroyd
@McTroyd 3 роки тому
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.
@AndreasSpiess
@AndreasSpiess 3 роки тому
100 and 400 seem to be quite common.
@tmate8215
@tmate8215 2 роки тому
Nice video thanks. Have you looked at coding on Raspberry Pi remotely with Visual Studio Code using the Remote Development extension?
@AndreasSpiess
@AndreasSpiess 2 роки тому
No. I mostly use the Pi as a server, and not for realtime stuff. There I use microcontrollers
@jackpatteeuw9244
@jackpatteeuw9244 3 роки тому
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 3 роки тому
You can use optical and magnetic as you like. Depending on your situation. I have no preference.
@jackpatteeuw9244
@jackpatteeuw9244 3 роки тому
@@AndreasSpiess How do you connect them to a RPi and what library is need to read them ?
@AndreasSpiess
@AndreasSpiess 3 роки тому
I made a video on how to connect sensors to a Raspberry
@noamw3841
@noamw3841 3 роки тому
Great video! What are the advantages of connecting a sensor to the raspberry pi instead of through an arduino?
@junaidpv
@junaidpv 3 роки тому
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 3 роки тому
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.
@csongorvarga
@csongorvarga 3 роки тому
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 3 роки тому
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.
@ronm6585
@ronm6585 3 роки тому
Thanks.
@AndreasSpiess
@AndreasSpiess 3 роки тому
You are welcome!
@LeXXai
@LeXXai 3 роки тому
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 3 роки тому
Not a lot of my projects use interrupts. Then I still have my MCUs...
@dreamcat4
@dreamcat4 3 роки тому
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 3 роки тому
I do not know Rust. But for the moment everything is pointing in the direction of Python in this field :-(
@dreamcat4
@dreamcat4 3 роки тому
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 3 роки тому
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 3 роки тому
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 3 роки тому
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..
@tifendro
@tifendro 3 роки тому
Pefect !
@AndreasSpiess
@AndreasSpiess 3 роки тому
Thank you!
@francescofaccodelagarda5408
@francescofaccodelagarda5408 3 роки тому
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 3 роки тому
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 3 роки тому
@@AndreasSpiess Thank you very much you wonder swiss-person!!
@ScienceLab760
@ScienceLab760 3 роки тому
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.
@AndreasSpiess
@AndreasSpiess 3 роки тому
Maybe in the future...
@wanderingsaint2659
@wanderingsaint2659 Рік тому
can you please do a video on grove ultrasonic sensor with raspberrypi setup and software
@AndreasSpiess
@AndreasSpiess Рік тому
Just google and you will find it.
@mannhansen9337
@mannhansen9337 3 роки тому
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 3 роки тому
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 3 роки тому
@@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.
@186scott
@186scott Рік тому
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 Рік тому
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 Рік тому
@@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
@sayantanmaiti2513
@sayantanmaiti2513 3 роки тому
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
@AndreasSpiess
@AndreasSpiess 3 роки тому
So far I never needed 8GB. I use 2 or 4GB versions
@sayantanmaiti2513
@sayantanmaiti2513 3 роки тому
@@AndreasSpiess should I buy that pi4B 2/4gb or buy the old 3B+?
@AndreasSpiess
@AndreasSpiess 3 роки тому
For sure a Pi4. It is much better.
@sayantanmaiti2513
@sayantanmaiti2513 3 роки тому
@@AndreasSpiess thanks a lot sir
@petittoto7433
@petittoto7433 3 роки тому
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 3 роки тому
We are on 350m. And it is always good to know the competition ;-)
@del_v000
@del_v000 3 роки тому
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.
@AndreasSpiess
@AndreasSpiess 3 роки тому
www.google.com ;-)
@Hassanmohamed-lf4sg
@Hassanmohamed-lf4sg 3 роки тому
@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 3 роки тому
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.
@MisterkeTube
@MisterkeTube 3 роки тому
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 3 роки тому
You are right: Real-time applications are in the domain of microcontrollers.
@SzymonJakubiak
@SzymonJakubiak 3 роки тому
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.
@AndreasSpiess
@AndreasSpiess 3 роки тому
Thanks for the info!
@chuxxsss
@chuxxsss 3 роки тому
17 has before I see your vlog Andreas. Hot here in Australia so not going prospecting. Like we have hobbies mate.
@AndreasSpiess
@AndreasSpiess 3 роки тому
I just was outside. It snows and is cold. Still better on your side, I think.
@chuxxsss
@chuxxsss 3 роки тому
@@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.
@MrPlastkort
@MrPlastkort 3 роки тому
I have a tinkerboard.. can i use raspbian so it can become 100 % raspi ?
@AndreasSpiess
@AndreasSpiess 3 роки тому
I do not know. I only use Raspberries
@ivko5673
@ivko5673 4 місяці тому
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 3 місяці тому
I never used Ubuntu, so I do not know.
@ivko5673
@ivko5673 3 місяці тому
@@AndreasSpiess thanks a lot). I'm going to check it)
@lottery248
@lottery248 3 роки тому
looking forward that the Raspberry Pi 5 to have faster I/O for even more sensors lol.
@AndreasSpiess
@AndreasSpiess 3 роки тому
You saw that we had to throttle the speed to read one of the sensors. It is fast enough for that purpose...
@PankajNikam
@PankajNikam 3 роки тому
Hi Andreas, I love your videos and I would like you to make a video of Raspberry Pi Pico :)
@AndreasSpiess
@AndreasSpiess 3 роки тому
You have to sleep one night (or become a Patreon) ;-)
@PankajNikam
@PankajNikam 3 роки тому
@@AndreasSpiess You are the best Andreas :) I respect you a lot. Thank you for the reply.
@PhG1961
@PhG1961 3 роки тому
Indeed interesting ! As usual. You probably didn't expect any other comment....
@AndreasSpiess
@AndreasSpiess 3 роки тому
Thank you. The video currently performs bad. Rank 10 of 10. This is not what I have expected :-(
@PhG1961
@PhG1961 3 роки тому
@@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 UKposts 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... ;-)
@rickharold7884
@rickharold7884 Рік тому
Cool
@AndreasSpiess
@AndreasSpiess Рік тому
Thank you!
@YandiBanyu
@YandiBanyu 3 роки тому
Hey, I just found out today about Raspberry Pi Pico. Maybe you should take a look at it!
@AndreasSpiess
@AndreasSpiess 3 роки тому
Already ordered...
@Cam2Art
@Cam2Art 3 роки тому
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 3 роки тому
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 3 роки тому
@@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 3 роки тому
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 3 роки тому
@@AndreasSpiess The gpiozero, all lower case, is a high level wrapper of RPi.GPIO
@Cam2Art
@Cam2Art 3 роки тому
@@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.
@naimfuad5913
@naimfuad5913 3 роки тому
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 3 роки тому
I have a few Picos on order...
@andremicallef804
@andremicallef804 3 роки тому
@@AndreasSpiess yay will you check out the Arduino port for the Pico!
@jkaart
@jkaart 3 роки тому
Btw, do you know Ruuvitag's?
@AndreasSpiess
@AndreasSpiess 3 роки тому
I tried to buy one. Unfortunately it does not work with Paypal :-(
@stephenjames2951
@stephenjames2951 3 роки тому
Zooming in on some of the text displays would would help.
@AndreasSpiess
@AndreasSpiess 3 роки тому
Unfortunately I do not have this possibility :-(
@stephenjames2951
@stephenjames2951 3 роки тому
@@AndreasSpiess Thanks for the content, I have a project with my brother replacing an arduino with RPI so this is quite timely.
@AmazingMj07
@AmazingMj07 3 роки тому
👍👍
@AndreasSpiess
@AndreasSpiess 3 роки тому
Thank you!
@charlesrg
@charlesrg 3 роки тому
We talk a lot about sensors and buttons and trying to be energy efficient as possible. I'm wondering why we are not using battery less sensors and buttons, Philips Hue Tap has been around for so many years and I still don't see an alternative for the DIY public. It seems that the only option so far is to interface an EnOcean(www.enocean.com/en/products/enocean_modules_24ghz/) module to our ESP32 or Raspberry Pi and use their Motion/Temperature/Humidity/Lux sensors or buttons. Looks like Eltako uses exact the same modules, hard to believe there is only one way and so few doing battery less devices.
@AndreasSpiess
@AndreasSpiess 3 роки тому
Enocean have great products. But you need a different technology (no Wi-Fi) to use them because they produce extremely low energies.
@kirillkirichenko
@kirillkirichenko 3 роки тому
Even in Siberia the temperature does not get below 0 Kelvin ( -1725 C) :)
@AndreasSpiess
@AndreasSpiess 3 роки тому
:-))
@andreasrivera3516
@andreasrivera3516 2 роки тому
I have an arduino. But raspberry pi sensors. Can I use them on my arduino?
@AndreasSpiess
@AndreasSpiess 2 роки тому
You have to check if they support the 5 volt of the Arduino. Then you can use them.
@christianf1480
@christianf1480 3 роки тому
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.
@krukhlis
@krukhlis 3 роки тому
IMHO, RPi is not really applicable for direct orchestration of sensors. Or, at least, not all sensors should be connected to RPi directly. Raspberry Pi OS is not a real-time system, I had tons of issues working with sensors that are accessible as "/dev/***" only -- just because OS was busy with something else when my software had to communicate to sensors. The same with i2c. Both with my C++ program and Python based. But yes, thank you once again for another helpful video.
@AndreasSpiess
@AndreasSpiess 3 роки тому
You are right: Real-time and Linux is not a good fit. Most of my sensors are not time critical, thou.
Radar Sensors from $3 to over $100: Which one is Best?
14:31
Andreas Spiess
Переглядів 144 тис.
Use the very attractive new ATTINY chips for your projects
14:34
Andreas Spiess
Переглядів 187 тис.
I Can Save You Money! - Raspberry Pi Alternatives
15:04
Linus Tech Tips
Переглядів 3,1 млн
Rutgers University Confirmed: Meshtastic and LoRa are dangerous
13:27
Andreas Spiess
Переглядів 702 тис.
The Raspberry Pi Pico WAS Overrated! But that changed!
10:18
GreatScott!
Переглядів 578 тис.
Raspberry Pi Analog Water Sensors ADC Tutorial
19:24
rdagger68
Переглядів 105 тис.
463 Why most Arduino Soil Moisture Sensors suck (incl. solution)
10:59
Andreas Spiess
Переглядів 58 тис.
Hacker's Guide to UART Root Shells
17:40
Flashback Team
Переглядів 447 тис.
We can do THIS now! - Lumafield CT Scanner
18:37
Linus Tech Tips
Переглядів 1 млн
The Ultimate Guide to using Motors in Robotics (including ROS, Raspberry Pi)
25:56
Articulated Robotics
Переглядів 283 тис.
Raspberry Pi Battery Power
20:34
ExplainingComputers
Переглядів 332 тис.
😍ЛУЧШАЯ фишка Айфон 15🍏
0:35
Demin's Lounge
Переглядів 552 тис.
СЛОМАЛСЯ ПК ЗА 2000$🤬
0:59
Корнеич
Переглядів 93 тис.
Честный обзор ПНВ GD918  Снял летающие стержни SKYFISH
42:16
Дмитрий Коржевский
Переглядів 44 тис.