One thing I will also suggest is that you can use BOTH an Arduino and a Pi. In a project I'm working on, I'm letting the Arduino be the powerhouse for I/O interactions with sensors and transmit the data back via Serial to the PI, who is acting as a Websocket server for other things to connect to as well as handling other math computations on the sensor's data, leaving the Arduino to only worry about managing sensors. Because the Arduino IDE is even available on the Raspberry Pi, you can have a fully set up development kit ready and on standby.
I have been watching your channel for the last two weeks, after taking a hiatus from electronics for a few years. Literally any topic I can think of you have already done an excellent video on!
One thing you didn't touch on is the fact that the Raspberry Pi is not a real-time system. Because it runs a full OS, when you delay 1000 ms, you may get a delay of 1010 ms instead. Not a big deal, but it does add up in the long run. The Arduino platform, on the other hand is a real-time system. 1000 ms means 1000 ms. (Real-time might not be the correct term here.)
Rick Seiden if using the Rpi os then yes, but there are other options available. I heard about a real-time Linux Kernel and other small but yet usable operative systems made for rt applications
nope. The Linux kernel schedules tasks and threads for multitasking, you can't use it as a single-task real-time environment. The only way to obtain the same degree of control over hardware that you get with an Arduino is running your program after the bootloader with no OS.
I didn't know there was a real-time Linux Kernel. Actually, as Paul-Adrian Stoleriu says below, I didn't think it was possible to have one. I'm not saying they don't exist, just that I didn't know about them. I've made some great projects with my Raspberry Pis, and the real-time issue never came up, because I didn't rely on it for those projects.
I like both. I used to use kernel modules for timing with sysfs to interact with user space, but now I use an Arduino to provide a software and hardware abstraction layer that simplifies development and protects my much more expensive raspberry pi from electrical damage.
Two projects I have always wanted to see done with a RPI...solar panel alignment system using solar tracking (panel follows the sun for max power) and similar auto window blind adjustment to most efficiently adjust vertical blinds to allow blocking direct sunlight as the sun tracks across the sky.
Extremely well done comparative analysis. I would add that in addition to data collection and analysis, RPi excels at Internet-style communication, especially if you invest time in learning Python. I put custom web server front ends on most of my projects so I can use RESTful clients on my tablet and phone to control them. I also run Arduino IDE on a permanently integrated RPi zero w controller so I can update software without recabling my Arduino projects. In fact I don't even need to get off the couch.
Please do a project using Raspberry Pi and Arduino together. Arduino GPIO with the brains of the Pi would be cool. Maybe an irrigation system where you can access a web server front end to control, or something similar?
Why adding a 8-bit controller to a 32/64-bit ARM core(s) with plenty of RAM? When you want to do, for example, just add a PCA9685 : github.com/vanvught/rpidmx512/tree/master/lib-pca9685
As always, great video, and not for just the topic at hand (which is better for what), but the detail you go to regarding the whole process: declarations, IDE, and more. Awesome instructional and succinct! I wish more authors but as much time into preplanning executing their works. Cheers!!
I recommend the DIY Roomba Sweeper project with Raspberry Pi. I've been toying around with this idea for a little bit and have seen a couple examples on UA-cam. Some useful features would be collision avoidance and some type of space mapping algorithm.
The GPIO can definitely be awesome for getting started with simple hardware development that also involves a software-in-an-OS side. But for things that need a lot of GPIO stuff and not really a complete operating system, I'd directly use a Microcontroller like an Arduino, or an ESP if you want a bit of networking as well. I personally use the GPIO more like a custom pin header to include things like fan control and a power button and LED, perhaps also for sensors in the future (though only if it's really stationary and requires to run with an OS).
Finally a video on the Pi GPIO - I might have a play with this soon, just for a change :) BTW, I don't understand the reason to mention 'void' all the time. Noobs keep asking the same question over and over, what this 'void' is. Just call the function Setup or Loop. No reason to mention 'void' all the time. Just my .2 cents.
Notice the flash in the upper right corner on the booting screen? That is an indication that there are to low current from the charger. It usually need at least a 2.1 A charger. Also notice, you can use python, C or Scratch to control the IO pins.
I accidentally notice that almost everytime that you start speaking, you inhale so hard like if you were breathless And now I can't unnotice... ... nor you all
Now I have a behavior of not putting it after programming in Kotlin, F#, TypeScript, Haskell, Python, OCaml When I program in C, for minutes I get compile errors until I switch my behavior and start putting ";", such a shame those old languages have stupid parsers hand-crafted that don't use formal parsing theory and need to be told then statements finish.
+Lulz Felipe, That is BECAUSE they are OLD languages. C is from beginning of 1970:th, made to compile Unix and the tools. The compiler theories have developed MUCH since the Algol languages (which inspired C and other languages, as they used compiler compiles, like Yacc and Lex). The computers was so slow, that the programming languages wasn't suitable for modern functional languages, and the compiler theories wasn't developed enough for languages like Haskell and Ocaml.
I started with Raspberry Pi for electronics projects until I came across your channel few months ago. Since then its been all Arduino. Until you shift to Pi I am with arduino.
Do the remote supervising system with motion detectors and sensors (for doors and windows). Plus the USB camera - when the sensors are triggered, than a camera can activate to start capturing (making photos) and upload them to remote account + send an alarm email/sms to you. This would combine the arduino elements (sensors) and raspberry functions (USB, access to FTP, emails, etc.). But this will be probably a project for 2 or 3 episodes.
RBPL1 I have already created one using python. It captures pics videos timelapse and automatically uploads to my Google drive (+ I have FTP and Dropbox also ) with a click of a button from a custom android app that I have built using app inventor....I am also developing the app using native android studio using kotlin. If u are really interested I can start video tutorial series.😄
Another cool way to use your Raspberry Pi, is to set it as headless, meaning no need to use peripherals. Instead you can connect to the Raspberry Pi via SSH, essentially enabling remote access to the Pi. To make your Pi headless, install the Rasbpian Lite image (no desktop available) which is very lightweight compared to full desktop version, as it doesn't install any additional software or desktop libraries. You can then connect via SSH, from your PC, to run your scripts or manage the Pi. I would recommend to use VSCode Insiders and remotely connect to your Pi to start developing. This is an IDE that provides code highlighting, as well as many other features via extensions, a really powerful, yet free tool.
7:58 What about showing us some kind of GPS tracking system for a raspberry pi, connected with the ODB2 connector of a car. ODB2 shares some info about the car's specs. Like mileage etc. The raspberry Pi could connect with the user's addressbook (contacts) or calendar via APIs to figure out if a certain trip is business or leisure.
I would love to see more Raspberry Pi videos. Anything would be great using Python. I'm starting to focus a little more on the Pi because it just seems more powerful and can do more complex tasks. Also, I'm trying to attempt to focus on a system since it's hard for me to learn all things things right now. Finally, I'm finding Python very helpful for my other programing tasks so learning that language is very helpful 👍👍👍
It would be very interresting to have a video around the wireless communication (radio) between an arduino and a raspberry. Let's say the arduino is where the sensors are connected and the data logging part is on the raspberry (like that we can have a UI to display the data later)
I have a project where I need at least two analog outputs, X & Y and one analog input Z. Ten bit resolution in/out would be ideal. This part of the project is all hardware and will probably use a three wire SPI interface. This will be for an addressable video camera that does not continuously scan, but can operate completely statically. It can be parked on a single pixel and measure it continuously or scan in any pattern desired. Full raster, pseudo random, full random, spiral, tracking microscan, etc. Microscanning a small region also improves data collecting efficiency as the entire field of view need not be read in each time. Aspect ratio is 1:1. I want to use the Raspberry Pi because it has magnificent video display support built in and full file system support, unlike Arduino. A hybrid Pi/Arduino approach is not out of the question. For the curious, the project is called the Philocam and can be seen, in process, on my own YT channel.
i would very much like to see you control motors with the pi 3 B, i think it would be a brilliant demo of what it can do also if you need more ideas for pi videos, you could re-create some electronic analysis tool like an oscilloscope, or make a variable power supply where the pi controls the amount of current and/or voltage from variables in code. love the videos, and im glad you have started pi projects
You can install Processing 3, this program have the hardware io library and by the way you can make a graphic environment or use a camera to control the raspberry
Awesome! This the first C programming tutorial I've seen on the PI and it was a great introduction. A question though - can you see any advantages to using C except familiarity? I can understand that in a memory and processor limited cpu like the arduino it's absolutely needed but on the resource rich environment of the PI I think the python tooling is so much richer. Either way thanks for the video - it's great to see your detailed analysis.
It's very useful if you need performance (for example generating a pwm signal) since it bottlenecks the RPi a bit. For most applications, however, python is fine
Alan Ramírez Herrera In that way you are absolutely right. But you have to look in another way onto a Project with a Raspberry Pi. Performance is secondary.
For us, coming from VB, XOJO allows you tu program in a fully graphic environment as well as,in a command line one, and even web. Not free, but excellent.
One of the advantages is the ability to run any linux program including webservers, etc. and still having the ability to connect your electronic parts to it.
The raspberry pi is easier for programmers like me. Since it runs linux, there're many things to play with the software. For example, using nodejs to remotely control it via firebase is a much easier way to build complicated IOT projects.
I find RPi easier/faster to work with when whatever I'm doing has to have connectivity to networks/peripherals/etc - it's already built into the hardware. But Arduino isn't a full SBC, it's an MCU - much better when you need finer control over timings and stuff, you don't have to fight against the multitasking bloat or play within the cracks on a "full" computer - and small code runs faster, simple hardware runs faster (if it has same spec, anyhow) - MCU or SoC is just the better choice than SBC for some things.
You're not even intended to use the Arduino for really complicated IOT things. The Arduino is a microcontroller board (like @P said), you program close to the metal, you don't run a whole OS, it's better for fine control and real-time but you shouldn't use it for a web server or to otherwise communicate with networks. An SBC is far better for more advanced things, especially for things with cameras or network connectivity. There's kind of a middle ground in the form of the ESP8266 and ESP32 series, microcontrollers with a pretty good amount of processing power which are generally capable of come in boards built around network connectivity, Wi-Fi and Bluetooth, and can be easily programmed with Lua, Python or even Node.js thanks to their power and the fact that they usually have 1MB or more flash storage.
@@lithiumwyvern_ tell that to the people that make CNC controllers based on 8-bit Arduinos. :-) But yes, the different devices have different strength and weaknesses. You can still add simple network and IO protocols like for IoT. You can still use IPv6 on them, which you actually should do instead of IPv4. ;-)
Thank you! I have a version 1 Raspberry Pi that I bought with big plans and never got around to doing anything with it. A CarPuter to use a touchscreen, GPS, MP3 player and interact with my Megajolt car ignition system. As an arduino. It is ovrrkill. but if you have a project where heavy processing is needed. Then yes. a RPi is the way to go.
Also the raspberry Pi (Rpi) can have connection with arduino by USB, and have a bidirectional communication, with that you can easily use both and now you have the vintages of arduino like ADC. A good project could be an intelligent cae that map his specific route and of course add another's items like distance measure, lights and so.. Interesting introduction of RPI
I'd like see a video on building a ceep NAS. Meaby from an old laptop or from a Pi. There are some videos of this kind here on UA-cam but I really like YOUR way of explaining things. Thanks for all the hard work you put in you videos.
I have a couple of original Pi 1s doing basically arduino type stuff in my home automation system, but they run a basic java server. They run i2c library and I expand to a bunch of ADC inputs, and a bunch of opto isolated outputs. Why Pi, because I had them, and I wanted to have a bit more processing capability for the data. Now I'd use an esp32 for similar application, but these Pis have been in service for close to 8 years and have up times since the last time I was messing around with power -- about 250 days. The java server can do things a bit easier for data processing and analysis before sending it along to the home automation brain. For instance I can pick which ADC post processes I want to use when subscribing to an ADC input in the home automation brain, either straight data, or one of several mathematical smoothing algorithms -- SMA, WMA, and Bezier -- just the ones I implemented. Arduino could do it, but it would be pretty taxing on the CPU to that much data smoothing. Just depends what the use case is, and what you have around.
Connecting Arduino to raspberry pi through i2c communication will be a nice project. Raspberry pi as master and Arduino as slave. And I think this will also increase the gpio pins...
What I'd love to see is something like a Raspberry Pi controlled system, (perhaps wit ha LCD/touchscreen interface) controlling various arduino-based sub-systems for home automation. Basically, have a PI with touch screen on the wall and connect via wifi or similar to various arduino boxes to control lights, shutters, A/C, etc.
i like watching you writing the python, and putting the semicolon at the end of each line before quickly deleting it. Been doing that for a while in lua =D
I have been using a pi as a controller for a robot and I have been getting very good results , The only downside is that I need to run a motor controler off a seperate 12v battery for propulsion.
Thank you for sharing your knowledge. Great tutorial. As a feedback to your channel, I would like to see a project of a DRM/DRM+ radio transmitter and receiver, using Arduino and Raspberry Pi (which I believe could be the best choose because of the SDR processing power needed). This could be a very important development.
It's also possible to program the Pi directly through the PC (just for Win 10). Just install Windows 10 IOT on the PI and Visual Studio on the PC. Then open an Arduino-Wireing-Project in Visual Studio and there you go .... The thing ist, the Pi might have an other drawback besides the ones you mentioned: It can't do very accurate timing, because there is still an OS Running in the background.
Raspberry Pi = small computer. useful for - low power Server applications (like a webserver, print server, server to controll some smart home stuff etc.) - Media applications (the graphics are quite good for such a small/cheap unit) Arduino, Teensy = Microcontroller stuck on a tiny PCB. - Replaces a Microcontroller if you are to lazy to solder one into your circuit (+ it is a LOT easier to program than for something like an AVR or a PIC without a firmware/toolkit like arduino) -Useful as an usb interface / controller, like for example in homemade input devices (keyboards, joysticks etc.) and in robotics
Raspberry piiiii 😍😍😍 I love to build DIY projects ... I am an electrical and electronics engineering student . I made a project using raspberry pi (iot) with the help of my computer science engineering students ... its really cool to make use of raspberry pii (for me hardware only) .. all thought i am not familiar in programming..this video helps me ... a lot.... thanks #Great Scott
One important thing, you didn't mentioned is, that you can run multiple programms in parallel, because you execute the code on a Operation system. May it's not an RTOS but in most cases it isn't necessary. I jused this fact, to controll a IR-LED in a sub-programm with delays, that didn't affect the main Programm noticeable.
So what I wanna know is "How stable is Raspberry Pi, When it comes to inputing and outputing data on the fly?" AvE says you cannot trust arduino to not crash during critical operations that require external coms. Ex. Let's say you have a moving object that is reporting it's position to the R.P. then the R.P. does the math and tells the object to proceed to the next coordinate. The moving object is logging data. It doesn't have to transmit all the data. It just has to get 'home' safely. Can Raspberry Pi find it's way home without crashing in the woods somewhere? This may be bit long winded, but basically how stable is Raspberry Pi with processing external data?
You can always go with more powefull uCs like ARM, and other for more complex projects, pies aren't really cheap ( and not sure if worth or precise enough, you still need to run a OS in background)
Shuncey Balba" Mayonnaise, informally mayo, is a thick cold sauce or dressing usually used in sandwiches and composed salads. It is a stable emulsion of oil, egg yolk, and acid, either vinegar or lemon juice. There are many variants using additional flavorings. "Wikipedia
so the raspberry pi can use something similar to timers, im not sure how familiar you are with linux, but linux can send a signal to your program, and you can then send a signal to the linux kernel, for say a timer, and then you would be able to handle timed events, and with quite a bit of work you can even make bare metal code for the raspberry pi and handle interrupts, though unfortunately this is annoying to do, because the lower level parts of the raspberry pi are quite poorly documented (you need to know hardware addresses, you have to know exactly how the pi boots up, and you have to know how to handle different cpu modes).
I have an off-brand SBC with a TFT display. I used the image the manufacturer provided since I failed to deploy the kernel module myself. There are 3 GPIO pins dedicated for buttons that was not programmed. I pulled together my limited knowledge in python and managed to make the buttons send commands to i3-msg
Fun fact:In future you can officialy run Arduino Schetches on rPi ": The idea is there's a tonne of people that know how to use Arduino and they can take their knowledge and apply it to this," Banzi told the Embedded Linux Conference 2018 in Portland in the US.
I want to see a smart home controlling future with raspberry pi 3 which will have automatic water tank filling, power management with solar pcu. automatic stair lighting, motion sensing outdoor lighting with motion capturing, home security when in home or out of home, disconnecting the external cunnections when lightning or thunderstorm is happening to prevent internal home appliance getting damaged from lightning etc.
I think that they are not comparable as they offer really different functions. For example raspberry can multitask. Arduino is a real time system... its just why can they both coexist at the same time. Because you need both of them for different things.
Raspberry Pi seems to be good for graphics and arduino is good at logic. Would be cool to see an arduino-raspberry duo possibly running Processing on the Pi being controlled through serial by the arduino. That way you get the best of both worlds
The main problem of Linux boards like RPi 3 is the fact that the interrupts cannot be handled from user space (aka your program code). Any callbacks in WiringPi are in fact polling the state of the pin and then calling when there is change of state. This is quite problematic if you want to handle lots of inputs and want to relay on precision. The other issue is the unpredictable behavior of the multi-threading code which is neat if you need them, but can be problematic if you want to drive step motors, reading speed counters or measure sonar time etc. In my projects MCU is just necessary to delegate such delicate tasks reliably.
I am thinking of making a raspberry pi based security system for my shed. The idea being that it recognises a when there is a moving object and takes a picture every few seconds while there is a moving object, I would ideally like me to be able to remote access the images or even a stream and also be sent a notification when the alarm is triggered. Going an extra step would be to incorporate facial recognition into the code and attempt to get pictures of the face of the would be intruder. My shed has internet access and links to my houses central HDD so storage wouldn't be an issue for the volume of data being transmitted.
Thanks. I see them as complimentary systems. One raspberry pi can be connected to several Arduinos. Arduinos are much more robust if you want embedded systems though (And cheaper!)
A BMS based on a Raspberry Pi seems like it could be very useful (assuming that it's possible). I've been trying for a while to dream up a BMS that could monitor and optimize each cell individually by being aware of it's specifications (which is probably unnecessary, but could potentially make it very beginner friendly) and a Pi seems like it could be a good way to achieve that
I want to see big project - Smart home. And also make app for Android, that we can to control parameters on distance . Thank you, Mister! You make great work)))
You are such a nice knowledgeable electronics person and i personally thank you for teaching me about lithium ion batteries. But would like to know about implementation of battery protection circuit for e-scooter battery pack utility.
I have a doubt..was the led pin 15 numbered according to wiringPi numbering or BCM numbering from 8:14. From the video..I am thinking it was physical pin 10
Next project? Pi HAT for ADC and programmable interrupt timer with illustrative app development. Multi channel ADC is important to many. C/C++ is preferred for efficiency on SBC's if you need to do any DSP.
I found that the best option is that of using an Arduino/clone (maybe one of those cheap Minis) connected to the Raspberry Pi. So you have the power of a computer, combined with Arduino functionality (for example, controlling The WS* family of LED strips using the FastLED library). The only difficulty is that some kind of protocol has to be used to interface the two systems.
BTW, you can try QtCreator IDE -- it offers much more help when writing C (and C++) code. Also, it is better to boot Raspberry into console mode, so that GUI does not eat away its processing power. Again you can use QtCreator to setup cross-compilation on your PC (ABI is arm-linux-gnueabihf) and setup a Remote Device to run the compiled binary on.
One thing I will also suggest is that you can use BOTH an Arduino and a Pi. In a project I'm working on, I'm letting the Arduino be the powerhouse for I/O interactions with sensors and transmit the data back via Serial to the PI, who is acting as a Websocket server for other things to connect to as well as handling other math computations on the sensor's data, leaving the Arduino to only worry about managing sensors. Because the Arduino IDE is even available on the Raspberry Pi, you can have a fully set up development kit ready and on standby.
it's nuts how far we've come in 5 years. A single ESP32 (or Pi Zero W) can basically do all the now lmao.
@Rushil69420 the esp32 is amazing for these iot data transfer stuff. Rpi 2w is good for something that needs a cam.
This is the best channel on UA-cam, you inspired me to go into electrical engineering
I have been watching your channel for the last two weeks, after taking a hiatus from electronics for a few years. Literally any topic I can think of you have already done an excellent video on!
One thing you didn't touch on is the fact that the Raspberry Pi is not a real-time system. Because it runs a full OS, when you delay 1000 ms, you may get a delay of 1010 ms instead. Not a big deal, but it does add up in the long run. The Arduino platform, on the other hand is a real-time system. 1000 ms means 1000 ms.
(Real-time might not be the correct term here.)
Rick Seiden if using the Rpi os then yes, but there are other options available. I heard about a real-time Linux Kernel and other small but yet usable operative systems made for rt applications
Axel Montini
Perhaps you could use tiny core Linux to that effect?
nope. The Linux kernel schedules tasks and threads for multitasking, you can't use it as a single-task real-time environment. The only way to obtain the same degree of control over hardware that you get with an Arduino is running your program after the bootloader with no OS.
Paul-Adrian Stoleriu
Ah, thanks
I didn't know there was a real-time Linux Kernel. Actually, as Paul-Adrian Stoleriu says below, I didn't think it was possible to have one. I'm not saying they don't exist, just that I didn't know about them.
I've made some great projects with my Raspberry Pis, and the real-time issue never came up, because I didn't rely on it for those projects.
Legend has it he sold his drawer of raspberry pi boards during the pandemic and bought an island in the Bahamas
I like both. I used to use kernel modules for timing with sysfs to interact with user space, but now I use an Arduino to provide a software and hardware abstraction layer that simplifies development and protects my much more expensive raspberry pi from electrical damage.
always a pleasure to be notified about your videos! Thanks for sharing your valuable knowledge!
You can run bare metal C on raspberry pi, just like Arduino :).
Two projects I have always wanted to see done with a RPI...solar panel alignment system using solar tracking (panel follows the sun for max power) and similar auto window blind adjustment to most efficiently adjust vertical blinds to allow blocking direct sunlight as the sun tracks across the sky.
im trying to make an ai based solar mppt using raspi
Is there a pi clone available with 5v output pins? I think that would be more convenient.
Pi has 5 v
@@Noor-oh4jq pi takes 5v but outputs 3.3 v through its gpio pins.
@@electronichaircut8801 Pi outputs both, at least Pin 1 is 3.3v I think and at least pins 2 and 4 output 5v (I say at least because there may be more)
@@deansdrawings6844 Yeah, but logic high on the i/o pins are 3,3v.
You mean 5V GPIO output pin? Because 5V DC output is already available.
Extremely well done comparative analysis. I would add that in addition to data collection and analysis, RPi excels at Internet-style communication, especially if you invest time in learning Python. I put custom web server front ends on most of my projects so I can use RESTful clients on my tablet and phone to control them. I also run Arduino IDE on a permanently integrated RPi zero w controller so I can update software without recabling my Arduino projects. In fact I don't even need to get off the couch.
You don't need anything but network to work with RPi. SSH gives you ultimate power of remote control.
Wow - *Best video* I've seen this year. Thank you for this.
Please do a project using Raspberry Pi and Arduino together. Arduino GPIO with the brains of the Pi would be cool. Maybe an irrigation system where you can access a web server front end to control, or something similar?
Yup, +1
Why adding a 8-bit controller to a 32/64-bit ARM core(s) with plenty of RAM? When you want to do, for example, just add a PCA9685 : github.com/vanvught/rpidmx512/tree/master/lib-pca9685
@@ArjanvanVught what does that do?
@@YOUnoobGER read the link?
As always, great video, and not for just the topic at hand (which is better for what), but the detail you go to regarding the whole process: declarations, IDE, and more. Awesome instructional and succinct! I wish more authors but as much time into preplanning executing their works. Cheers!!
I recommend the DIY Roomba Sweeper project with Raspberry Pi.
I've been toying around with this idea for a little bit and have seen a couple examples on UA-cam. Some useful features would be collision avoidance and some type of space mapping algorithm.
The GPIO can definitely be awesome for getting started with simple hardware development that also involves a software-in-an-OS side. But for things that need a lot of GPIO stuff and not really a complete operating system, I'd directly use a Microcontroller like an Arduino, or an ESP if you want a bit of networking as well.
I personally use the GPIO more like a custom pin header to include things like fan control and a power button and LED, perhaps also for sensors in the future (though only if it's really stationary and requires to run with an OS).
Finally a video on the Pi GPIO - I might have a play with this soon, just for a change :) BTW, I don't understand the reason to mention 'void' all the time. Noobs keep asking the same question over and over, what this 'void' is. Just call the function Setup or Loop. No reason to mention 'void' all the time. Just my .2 cents.
please make more tutorials on raspberry pi
+LogicalOne ua-cam.com/video/CUPsuVD8SCk/v-deo.html
Notice the flash in the upper right corner on the booting screen? That is an indication that there are to low current from the charger. It usually need at least a 2.1 A charger.
Also notice, you can use python, C or Scratch to control the IO pins.
I accidentally notice that almost everytime that you start speaking, you inhale so hard like if you were breathless
And now I can't unnotice...
... nor you all
oh fuck you now I can't focus on the vid
Lol
so breathtaking
Daaammnn you're right, how I haven't notice before?
He's just too close to the mic, I suppose.
I love you Scott, i was looking for these answers, you told them very clearly.
7:00 ... hahaha all the semicolons
Kinda understandable if he comes from c. Took me a month and a linter to get rid of that behavior^^
ah no shit, i just pointed it out no reason to be triggered
Now I have a behavior of not putting it after programming in Kotlin, F#, TypeScript, Haskell, Python, OCaml
When I program in C, for minutes I get compile errors until I switch my behavior and start putting ";", such a shame those old languages have stupid parsers hand-crafted that don't use formal parsing theory and need to be told then statements finish.
+Lulz Felipe, That is BECAUSE they are OLD languages. C is from beginning of 1970:th, made to compile Unix and the tools. The compiler theories have developed MUCH since the Algol languages (which inspired C and other languages, as they used compiler compiles, like Yacc and Lex). The computers was so slow, that the programming languages wasn't suitable for modern functional languages, and the compiler theories wasn't developed enough for languages like Haskell and Ocaml.
likewise we python devs forget semicolons and curly brackets when we have to code C ;)
I started with Raspberry Pi for electronics projects until I came across your channel few months ago. Since then its been all Arduino. Until you shift to Pi I am with arduino.
7:07 : O G ! the ";" in python ! brings back old memories
All of your videos are highly informative.
Do the remote supervising system with motion detectors and sensors (for doors and windows). Plus the USB camera - when the sensors are triggered, than a camera can activate to start capturing (making photos) and upload them to remote account + send an alarm email/sms to you. This would combine the arduino elements (sensors) and raspberry functions (USB, access to FTP, emails, etc.). But this will be probably a project for 2 or 3 episodes.
RBPL1 I have already created one using python.
It captures pics videos timelapse and automatically uploads to my Google drive (+ I have FTP and Dropbox also ) with a click of a button from a custom android app that I have built using app inventor....I am also developing the app using native android studio using kotlin.
If u are really interested I can start video tutorial series.😄
Alarms in the form of SMS is also there.
Camera can act as a motion detector and sensor using opencv.
Gunesh Shanbhag are you a UA-camrs tooo
Make video on it pls
Another cool way to use your Raspberry Pi, is to set it as headless, meaning no need to use peripherals. Instead you can connect to the Raspberry Pi via SSH, essentially enabling remote access to the Pi. To make your Pi headless, install the Rasbpian Lite image (no desktop available) which is very lightweight compared to full desktop version, as it doesn't install any additional software or desktop libraries. You can then connect via SSH, from your PC, to run your scripts or manage the Pi. I would recommend to use VSCode Insiders and remotely connect to your Pi to start developing. This is an IDE that provides code highlighting, as well as many other features via extensions, a really powerful, yet free tool.
7:58
What about showing us some kind of GPS tracking system for a raspberry pi, connected with the ODB2 connector of a car.
ODB2 shares some info about the car's specs. Like mileage etc.
The raspberry Pi could connect with the user's addressbook (contacts) or calendar via APIs to figure out if a certain trip is business or leisure.
I would love to see more Raspberry Pi videos. Anything would be great using Python. I'm starting to focus a little more on the Pi because it just seems more powerful and can do more complex tasks. Also, I'm trying to attempt to focus on a system since it's hard for me to learn all things things right now. Finally, I'm finding Python very helpful for my other programing tasks so learning that language is very helpful 👍👍👍
I had been always waiting for this video super helpful video
It would be very interresting to have a video around the wireless communication (radio) between an arduino and a raspberry.
Let's say the arduino is where the sensors are connected and the data logging part is on the raspberry (like that we can have a UI to display the data later)
Thanks for the video!! I haven't really tried to use the Raspberry Pi for electronics, but seeing how it works, I think I might!
I really love your videos. I like how you write down things too.
I have a project where I need at least two analog outputs, X & Y and one analog input Z. Ten bit resolution in/out would be ideal. This part of the project is all hardware and will probably use a three wire SPI interface.
This will be for an addressable video camera that does not continuously scan, but can operate completely statically. It can be parked on a single pixel and measure it continuously or scan in any pattern desired. Full raster, pseudo random, full random, spiral, tracking microscan, etc. Microscanning a small region also improves data collecting efficiency as the entire field of view need not be read in each time. Aspect ratio is 1:1. I want to use the Raspberry Pi because it has magnificent video display support built in and full file system support, unlike Arduino. A hybrid Pi/Arduino approach is not out of the question. For the curious, the project is called the Philocam and can be seen, in process, on my own YT channel.
WoW, thanks for introducing JCL PCB. It's worth trying!!!!!!!!
GreatScott! OMG YOU HAVE A NEW VIDEO
i would very much like to see you control motors with the pi 3 B, i think it would be a brilliant demo of what it can do
also if you need more ideas for pi videos, you could re-create some electronic analysis tool like an oscilloscope, or make a variable power supply where the pi controls the amount of current and/or voltage from variables in code.
love the videos, and im glad you have started pi projects
Always enjoy your videos.
Thanks for a great episode! I'd like to see a project with Raspberry Pi and an Arduino in conjunction, communicating with each other over I2C.
You can install Processing 3, this program have the hardware io library and by the way you can make a graphic environment or use a camera to control the raspberry
Awesome! This the first C programming tutorial I've seen on the PI and it was a great introduction. A question though - can you see any advantages to using C except familiarity? I can understand that in a memory and processor limited cpu like the arduino it's absolutely needed but on the resource rich environment of the PI I think the python tooling is so much richer. Either way thanks for the video - it's great to see your detailed analysis.
northshorepx Using Python is always the better choice on a Raspberry Pi.
It depends on the type of project.
Usually C is much faster than python because C compiles to machine code and python needs an interpreter, however, you have Cython
It's very useful if you need performance (for example generating a pwm signal) since it bottlenecks the RPi a bit.
For most applications, however, python is fine
Alan Ramírez Herrera In that way you are absolutely right. But you have to look in another way onto a Project with a Raspberry Pi. Performance is secondary.
For us, coming from VB, XOJO allows you tu program in a fully graphic environment as well as,in a command line one, and even web. Not free, but excellent.
Raspberry Pi also has a 5V GPIO pin, just clearing that up! Great video
One of the advantages is the ability to run any linux program including webservers, etc. and still having the ability to connect your electronic parts to it.
The raspberry pi is easier for programmers like me. Since it runs linux, there're many things to play with the software. For example, using nodejs to remotely control it via firebase is a much easier way to build complicated IOT projects.
I find RPi easier/faster to work with when whatever I'm doing has to have connectivity to networks/peripherals/etc - it's already built into the hardware.
But Arduino isn't a full SBC, it's an MCU - much better when you need finer control over timings and stuff, you don't have to fight against the multitasking bloat or play within the cracks on a "full" computer - and small code runs faster, simple hardware runs faster (if it has same spec, anyhow) - MCU or SoC is just the better choice than SBC for some things.
You're not even intended to use the Arduino for really complicated IOT things. The Arduino is a microcontroller board (like @P said), you program close to the metal, you don't run a whole OS, it's better for fine control and real-time but you shouldn't use it for a web server or to otherwise communicate with networks. An SBC is far better for more advanced things, especially for things with cameras or network connectivity. There's kind of a middle ground in the form of the ESP8266 and ESP32 series, microcontrollers with a pretty good amount of processing power which are generally capable of come in boards built around network connectivity, Wi-Fi and Bluetooth, and can be easily programmed with Lua, Python or even Node.js thanks to their power and the fact that they usually have 1MB or more flash storage.
@@lithiumwyvern_ tell that to the people that make CNC controllers based on 8-bit Arduinos. :-)
But yes, the different devices have different strength and weaknesses. You can still add simple network and IO protocols like for IoT. You can still use IPv6 on them, which you actually should do instead of IPv4. ;-)
It will be awesome if you can make a video on LIDAR and Maping of Unknown Environment.
7:04 I see what you did there with deleting all the semicolons!
He is prob used to C language and he made a mistake
Awesome, dude! That's a great option for more complex projects! 😊
Hi! Can you review the raspberry Pi pico, the latest model of raspberry Pi in a much small package...
Thank you!
I have a version 1 Raspberry Pi that I bought with big plans and never got around to doing anything with it.
A CarPuter to use a touchscreen, GPS, MP3 player and interact with my Megajolt car ignition system.
As an arduino. It is ovrrkill.
but if you have a project where heavy processing is needed.
Then yes.
a RPi is the way to go.
ya gotta love a great channel ! awesome video !
Also the raspberry Pi (Rpi) can have connection with arduino by USB, and have a bidirectional communication, with that you can easily use both and now you have the vintages of arduino like ADC. A good project could be an intelligent cae that map his specific route and of course add another's items like distance measure, lights and so.. Interesting introduction of RPI
I'd like see a video on building a ceep NAS. Meaby from an old laptop or from a Pi. There are some videos of this kind here on UA-cam but I really like YOUR way of explaining things. Thanks for all the hard work you put in you videos.
Great introduction of C in Pi.
That was something very interresting and i was looking for that since a while.
Thanks you for your video.
I have a couple of original Pi 1s doing basically arduino type stuff in my home automation system, but they run a basic java server. They run i2c library and I expand to a bunch of ADC inputs, and a bunch of opto isolated outputs. Why Pi, because I had them, and I wanted to have a bit more processing capability for the data. Now I'd use an esp32 for similar application, but these Pis have been in service for close to 8 years and have up times since the last time I was messing around with power -- about 250 days. The java server can do things a bit easier for data processing and analysis before sending it along to the home automation brain. For instance I can pick which ADC post processes I want to use when subscribing to an ADC input in the home automation brain, either straight data, or one of several mathematical smoothing algorithms -- SMA, WMA, and Bezier -- just the ones I implemented. Arduino could do it, but it would be pretty taxing on the CPU to that much data smoothing. Just depends what the use case is, and what you have around.
Connecting Arduino to raspberry pi through i2c communication will be a nice project. Raspberry pi as master and Arduino as slave. And I think this will also increase the gpio pins...
You can also install node.js on the pi and use javascript to program it, which solves the problem of timers as javascript is event based
He is definitely familiar with C family though still uses semicolons on python :)). Video was great! Good Job!
This video is gonna get a LOOOOT of views
A video about SPI, UART and i2c sounds interesting.
Great video, GreatScott!
What I'd love to see is something like a Raspberry Pi controlled system, (perhaps wit ha LCD/touchscreen interface) controlling various arduino-based sub-systems for home automation. Basically, have a PI with touch screen on the wall and connect via wifi or similar to various arduino boxes to control lights, shutters, A/C, etc.
Do a zero-cross voltage level proyect or something that controls the power output but with an micro Controller! Would love that (maybe even a PID)
i like watching you writing the python, and putting the semicolon at the end of each line before quickly deleting it. Been doing that for a while in lua =D
I would like to see how to do computer vision (like YOLO object detection) on a rasperry pi board. Wish you the best, Great Scott!
I have been using a pi as a controller for a robot and I have been getting very good results , The only downside is that I need to run a motor controler off a seperate 12v battery for propulsion.
I'd definitely be interested in a video about the MicroPython pyboard. I've heard about it, but never looked at it in more details.
I put it on my to do list
Awesome! Python at last!
Sorry for the date but raspberry pi 3 has a 5v pin outputs. I recommend you looking for a pin schematic ;)
Thank you for sharing your knowledge. Great tutorial. As a feedback to your channel, I would like to see a project of a DRM/DRM+ radio transmitter and receiver, using Arduino and Raspberry Pi (which I believe could be the best choose because of the SDR processing power needed). This could be a very important development.
4:02 void loop(){} is while(1){}
5:08 The programable GPIO pin is 3.3 V instead of 5V. Those pin which you do e.g. digitalWrite(pin, value); to!
It's also possible to program the Pi directly through the PC (just for Win 10). Just install Windows 10 IOT on the PI and Visual Studio on the PC. Then open an Arduino-Wireing-Project in Visual Studio and there you go ....
The thing ist, the Pi might have an other drawback besides the ones you mentioned: It can't do very accurate timing, because there is still an OS Running in the background.
Raspberry Pi = small computer. useful for
- low power Server applications (like a webserver, print server, server to controll some smart home stuff etc.)
- Media applications (the graphics are quite good for such a small/cheap unit)
Arduino, Teensy = Microcontroller stuck on a tiny PCB.
- Replaces a Microcontroller if you are to lazy to solder one into your circuit (+ it is a LOT easier to program than for something like an AVR or a PIC without a firmware/toolkit like arduino)
-Useful as an usb interface / controller, like for example in homemade input devices (keyboards, joysticks etc.) and in robotics
Raspberry piiiii 😍😍😍
I love to build DIY projects ...
I am an electrical and electronics engineering student . I made a project using raspberry pi (iot) with the help of my computer science engineering students ... its really cool to make use of raspberry pii (for me hardware only) .. all thought i am not familiar in programming..this video helps me ... a lot.... thanks #Great Scott
Look into ROS ;) I use Ubuntu mate on my PI
Hey scott what about a review of a cheap power supply for those of us that are unsure about wiring up an AC power supply ourselves?
One important thing, you didn't mentioned is, that you can run multiple programms in parallel, because you execute the code on a Operation system. May it's not an RTOS but in most cases it isn't necessary. I jused this fact, to controll a IR-LED in a sub-programm with delays, that didn't affect the main Programm noticeable.
So what I wanna know is "How stable is Raspberry Pi, When it comes to inputing and outputing data on the fly?" AvE says you cannot trust arduino to not crash during critical operations that require external coms. Ex. Let's say you have a moving object that is reporting it's position to the R.P. then the R.P. does the math and tells the object to proceed to the next coordinate. The moving object is logging data. It doesn't have to transmit all the data. It just has to get 'home' safely. Can Raspberry Pi find it's way home without crashing in the woods somewhere? This may be bit long winded, but basically how stable is Raspberry Pi with processing external data?
You can always go with more powefull uCs like ARM, and other for more complex projects, pies aren't really cheap ( and not sure if worth or precise enough, you still need to run a OS in background)
Shuncey Balba" Mayonnaise, informally mayo, is a thick cold sauce or dressing usually used in sandwiches and composed salads. It is a stable emulsion of oil, egg yolk, and acid, either vinegar or lemon juice. There are many variants using additional flavorings. "Wikipedia
so the raspberry pi can use something similar to timers, im not sure how familiar you are with linux, but linux can send a signal to your program, and you can then send a signal to the linux kernel, for say a timer, and then you would be able to handle timed events, and with quite a bit of work you can even make bare metal code for the raspberry pi and handle interrupts, though unfortunately this is annoying to do, because the lower level parts of the raspberry pi are quite poorly documented (you need to know hardware addresses, you have to know exactly how the pi boots up, and you have to know how to handle different cpu modes).
I have an off-brand SBC with a TFT display. I used the image the manufacturer provided since I failed to deploy the kernel module myself. There are 3 GPIO pins dedicated for buttons that was not programmed.
I pulled together my limited knowledge in python and managed to make the buttons send commands to i3-msg
Fun fact:In future you can officialy run Arduino Schetches on rPi ": The idea is there's a tonne of people that know how to use Arduino and they can take their knowledge and apply it to this," Banzi told the Embedded Linux Conference 2018 in Portland in the US.
I want to see a smart home controlling future with raspberry pi 3 which will have automatic water tank filling, power management with solar pcu. automatic stair lighting, motion sensing outdoor lighting with motion capturing, home security when in home or out of home, disconnecting the external cunnections when lightning or thunderstorm is happening to prevent internal home appliance getting damaged from lightning etc.
I think that they are not comparable as they offer really different functions. For example raspberry can multitask. Arduino is a real time system... its just why can they both coexist at the same time. Because you need both of them for different things.
Raspberry Pi seems to be good for graphics and arduino is good at logic. Would be cool to see an arduino-raspberry duo possibly running Processing on the Pi being controlled through serial by the arduino. That way you get the best of both worlds
The main problem of Linux boards like RPi 3 is the fact that the interrupts cannot be handled from user space (aka your program code). Any callbacks in WiringPi are in fact polling the state of the pin and then calling when there is change of state. This is quite problematic if you want to handle lots of inputs and want to relay on precision. The other issue is the unpredictable behavior of the multi-threading code which is neat if you need them, but can be problematic if you want to drive step motors, reading speed counters or measure sonar time etc. In my projects MCU is just necessary to delegate such delicate tasks reliably.
I am thinking of making a raspberry pi based security system for my shed. The idea being that it recognises a when there is a moving object and takes a picture every few seconds while there is a moving object, I would ideally like me to be able to remote access the images or even a stream and also be sent a notification when the alarm is triggered. Going an extra step would be to incorporate facial recognition into the code and attempt to get pictures of the face of the would be intruder. My shed has internet access and links to my houses central HDD so storage wouldn't be an issue for the volume of data being transmitted.
Thanks. I see them as complimentary systems. One raspberry pi can be connected to several Arduinos. Arduinos are much more robust if you want embedded systems though (And cheaper!)
A BMS based on a Raspberry Pi seems like it could be very useful (assuming that it's possible). I've been trying for a while to dream up a BMS that could monitor and optimize each cell individually by being aware of it's specifications (which is probably unnecessary, but could potentially make it very beginner friendly) and a Pi seems like it could be a good way to achieve that
Thank you for doing this! Love you man for showing off python!!
Very educational video! Pleas more!
Great Scott please make a video on *What is tinker and how to use it*
as a masochist, you can also programm it using the bash console! ("echo 1 > /sys/class/gpio/gpio15/value") ;)
I want to see big project - Smart home. And also make app for Android, that we can to control parameters on distance . Thank you, Mister! You make great work)))
You are such a nice knowledgeable electronics person and i personally thank you for teaching me about lithium ion batteries. But would like to know about implementation of battery protection circuit for e-scooter battery pack utility.
I have a doubt..was the led pin 15 numbered according to wiringPi numbering or BCM numbering from 8:14. From the video..I am thinking it was physical pin 10
Next project? Pi HAT for ADC and programmable interrupt timer with illustrative app development. Multi channel ADC is important to many. C/C++ is preferred for efficiency on SBC's if you need to do any DSP.
7:03 He had just put that semicolon.. and then removed it really quick...mhmmmmmmmmm
He made a mistake
hehee
Hi, would you make more of you basic 10.. videos? really liked these.
I found that the best option is that of using an Arduino/clone (maybe one of those cheap Minis) connected to the Raspberry Pi. So you have the power of a computer, combined with Arduino functionality (for example, controlling The WS* family of LED strips using the FastLED library). The only difficulty is that some kind of protocol has to be used to interface the two systems.
BTW, you can try QtCreator IDE -- it offers much more help when writing C (and C++) code. Also, it is better to boot Raspberry into console mode, so that GUI does not eat away its processing power. Again you can use QtCreator to setup cross-compilation on your PC (ABI is arm-linux-gnueabihf) and setup a Remote Device to run the compiled binary on.