This is a great starting point for anyone wanting to tinker with the RPi and electronics. I once developed a commercial product that was basically 75% this. A bit more software and a relay instead of an LED (well, in addition to the LED (...actually 3)) and a Raspberry Pi Zero. Point is: tinker, tinker, tinker.
This is a poor starting point for anyone wanting to tinker with an RPI. It breeds an unneeded dependency on proprietary tools to do what is a simple job that can be done without Windows, VS or a PC.
@@jonshouse1 There are usually multiple ways of doing things. This is one way. VS Code is open source and works on Microsoft, Mac and Linux. VSCodium is also an option if you don't want any of the telemetry stuff in the MS binaries.
@@HAGSLAB VS is not open source in any meaningful way, otherwise it would be in Debian free and would install on my Linux/Sparc machine... I've met modern programmers who simply are unable to cope without their pet IDE of preference. The entire VS/Xcode/Android studio ecosystem breeds people who are unable to cope with real programming and have poor differentiation between features of the operating system, IDE and compiler. I think it is very poor way to learn anything to use any IDE, but I find Microsoft's efforts to push their environment on students distasteful and probably in the long term harmful to open source.
2:12 It is a good habit to use a resistor to limit the current passing thru the LED. :) You can calculate using Ohms law. R = (Vsup - Vf) / Imax. Ex (3.3 - 1.7) / 20mA = 80 Ohms (100) Vsup = Suplpy voltage Vf = forward voltage of the LED Imax = maximum current thru the LED To be safe, we have to take in account also the maximum current draw of the RPI's GPIO pin = 16mA (3.3 - 1.7) / 16mA = 100 Ohm
And modern LEDs are bright enough with only 1 - 2 mA. For a green LED (3.3 - 2)/0.002 = 650R would be about right. I'd use 620R. The longer reason is that LEDs are non-linear devices. Once the voltage across it is enough to turn the LED on, its differential resistance is very low - that means a small change in LED voltage leads to a large change in current. Essentially it's like putting a short-circuit on the Pi's output, as it's trying to supply amps (not mA) to make up the voltage difference between its output and the LED's voltage. The Pi will have some limit, but it's never good to rely on that. Similarly, LEDs shouldn't be paralleled with only a single resistor - one resistor per LED is needed.
@@medicallyunexplainedsymptoms You also need to provide for component failure. LED's will typically fail open but on rare occasion they will fail short and with nowhere to shed that load your 3.3v rail goes to ground and stays there until, well, it doesn't. No resistor is like rubbing that lamp eventually that blue smoke genie is going to grant your wish for a new Pi, but not in the way you expected.
If you connect the LED in wired and logic (activating the internal pull-up resistor or the pin has an external pullup) you can omit the external resistor, but is dangerous to rely on the internal pullup resistor. The output in this case will be inverted.
I gave this a shot with my son today. We were curious about the vscode setup. It took us a few hours and eventually we had a successful blinking light. Thanks Dave. Very useful. Would be good if you had some more pi content. Always good to learn new things.
As what other have commented about in this video. If you are gonna hook an LED directly to the pins of the Pi. I would recommend that you use a BLUE LED for this, why? Because a blue LED had a forward drop of about 3 volts, were as red and green LED's have a forward drop of about 1.7 volts. Having that extra forward drop help reduce load stress on the IO pin as well as the LED.
Pretty cool using VS for the UI on the PC and running the actual compiler/linker/debugger on the PI itself. Am looking forward to using it in the near future! Thanks Dave.
The reason you don't need a resistor with LED is because the output of the PI is aready current limited. The forward voltage will stop at the point its current limited. However the GPIO will go dead at some point. I know this because we have some card access reading systems set up like this and after a couple of months the GPIO fails on every one and also affects some of the other non used gpio. So I recommend using a resistor to ensure longevity.
This is a problem is that software "engineering" is not like every other type of engineering. This is the hardware equivalent of checking that an object is not null before using it. For a noob it'll probably work fine without the check 99.999% of the time and the rest of the time, someone just turns it off and on again. But if its possible for it to be null then you need to deal with it. Unfortunately, in hardware land, once the GPIO output transistor is buggered a reset doesn't fix it - Its permanently buggered. So rather than relying on a current limit that is there probably for static protections rather than direct abuse - far easier to just make sure you're only ever drawing a couple of mA from the pins. And, just like software guys, hardware guys all ignore their own standards and occasionally make something do something because they can. So I2C with 3.3V and 5V parts is an example, each pin has a clamp diode to prevent external pulling the pin above 3.3V but with I2C some idiot will have pullups going to 5V, we rely on the fact that as they are 10k the idiot diodes will clamp at 3.3 and only a fraction of a mA will flow because its 10k but thats well within the 10mA limit. So there you go, don't do it but if you do know the limits.
Great callout for Jeff Geerling! I love both of the channels. Jeff (because he's local to me and has great content) and Dave (because he has great content). Keep up the awesome work, Dave!
Dave, this was great timing. My grandson and I are just starting out learning how to program the raspberry pi’s to notify me when the mail has been delivered to my mail box at the street. We thought your intro training was excellent as we both understood the programming and wrote our first working c code program on our new RPI’s. We each have PI 4 Mod B 8 gigs. Hope you build on the training you have started with the PI C programming. Tyler & Poppy Cobb
For all those questioning a resistor... a PI3 can only output 16 mA max on each pin. The default setting is 8 mA. I haven't used wiring pi myself so I don't know if you can change the output level through that or not. I do know if you get into the low level memory functions it can be changed that way and I think it is possible with a few other GPIO libraries.
Yes. Thar setup put the LED at risk, but more significantly, it also put the RasPi itself at risk. One really needs resistors (roughly minimum of 1k) to make the GPIO safe on the RasPi...
@@danman32 For an LED those would probably work OK (since the LED adds its own voltage drop). For things like switches or signal loads, I usually prefer 1k to be safe. This limit each pin to around 3.3mA; though granted, the rated limit is 16mA, safer to stay short of the limits.
I saw you try to run "cls" in the BASH terminal, and here I thought I was the only one to make that mistake! Apparently CMD and BASH syntax is similar enough to confuse our brains.
You have per GPIO pin and total GPIO pin current limits on the Pi. Depending on how much your LED draws you can put some strain on both the Pi and the LED.
Very cool, I learned about remote development using VSCode. I'm one of those old grey bearded UNIX guys who wouldn't generally use VSCode for this type of stuff, but I do have it for development on Windows so I will have to experiment here. This reminds me of one of the most useful features of an old '70s minicomputer, the wait LED. You could tell a lot about how your system was performing by how this LED blinked, or didn't. Now we need someone to implement a wait LED in the Raspberry Pi Linux kernel, probably in cpu_idle just before (turn off LED) and after (turn on LED) it calls cpu_relax.
Old, grey bearded wizard! Thanks Dave. From another old grey bearded wizard, 1000's miles from home. I have a Pi with me but had to use it for something else. Great tutorial, looking forward for more.
RE: No resistor for an LED running on 3.3 volts. If memory serves me correctly, diodes do weird things to either current and/or voltage, so the resistor was to act as a load to control the current/voltage to keep the LED from burning itself out. But, since you're not running that LED for more than a few seconds, I think you're safe. Then again, there's an answer to this, but it would mean dusting off and cracking open books from Radio Shack that I haven't opened since the late 80's. (Yes, I was THAT NERD/DORK/DWEEB from high school that was reading books on electronics back in high school. Why yes, I also wore mismatched clothing with high wasted pants straight from Revenge of the Nerds, too. Why do you keep asking these questions?) Short answer is I'm not gonna, because that's work and I have coding in C# to learn.
It's going to depend on the LED. For anything more than test purposes I would recommend doing the math, and you need to know the specs of the specific LED. Even among the same size, brand, and design the specs will change based on color. I haven't burned out many LEDs at 3.3v that I remember, I usually default to a something like 60R on 3.3v if I'm not going to figure it out first. But on 5V an average LED will go out immediately (not a few seconds).
It should have a resistor even though the logic voltage is similar to the LED forward voltage. The logic output will current limit but it is not a good idea to rely on that as it makes the chip run hot if greater than 20ma. The current the LED will draw depends on its forward voltage drop (differs by color and type) and other factors such as temperature. It is bad practice to run any LED without a series resistor. 330R is about correct, min value should be 150R, for a high brightness LED upto 4k7 will be ok.
@@kyleolson8977 60R at 3.2v=53ma, way off. 150R = 20ma is about the smallest safe value with 330R = 10ma being more sensible for most indicator LEDs, personally I would use 1k = 3.2ma for high brightness LED types.
Yeah, I'd like to see you do more Pi programming stuff. I'd like to see projects that have a physical result, like a weather station or remote camera stuff. Also it would be cool to see some audio related stuff like maybe an amplifier or something.
3:34 - Dave you should know this by now, but TH-cam AUDIENCE IS NEVER EXPERT SUPERVISION. You can't claim us bunch of jokers and trolls as being "experts" at anything other than being jokers and trolls.
I actually use my Raspberry Pi inside the guts of an old BBC Micro. I removed all of the original electronics, connected the original BBC Micro keyboard to dedicated USB convertor (manufactured by Tynemouth Software), and then connected that USB directly to the Pi. After "hot wiring" one of the keyboard LEDs to the new (and cold running) TDK PSU, the machine even reproduces the BBC's start-up beeps. Other mods included modifying the rear ports to HDMI, USB and Serial, and blanking off the unused connectors with matt-black plastic plugs. What's amazed me about this is just how nicely a single box computer (with an HP monitor sat on top) actually works! In fact, when I'm not working - it's pretty much my main computer.
@@MechanicaMenace Sorry - they're all carefully packaged in anti-static bags and stored in the loft. Another bit of bad news is that Tyneside no longer sell the fantastic little BBC Micro to USB convertor they used to make. A real shame that, as I would have loved to have made another BBC-PI Micro for my little nephew!
I've been going through Paul McQuarter's course on Python on Pi but I would also like to program in C on the Pi. For Paul's course I have the Pi sunfounder kit which besides devices and sensors, comes with a breadboard and breakout cable
Dude! I wish this had a few more search key words as you covered exactly what I was looking for. For the life of me I could not figure out where to put that -lwiringPi ! I also hadn't thought about running as admin/sudo. Thanks!!!!
Thanks! As for topics: More on Visual Studio using "C", "C++", and Rust. Modular programming. Risc-V coding. They say less is more but in programming More is More. Plus, I plagiarize -- as do all programmers and musicians.
3.3V for a green led may be fine, but red leds will generally have lower forward voltage... they will scream if no serie resistor is used!! (but I personally always use resistors :D )
I've burned out a board with static from my hand connecting with a signal wire that had no resistor. Also got a lot of line on the noise. You'll save yourself a lot of headaches with a good resistor placement.
Hi Dave. This opens up a whole world of useful stuff for the PI. I'd like to see software allowing the creation of a web server that serves input/output status and analogue I/O values from the PI. It would be useful for remote monitoring of the home environment etc.
I've considered actually building myself a bunch of NAS machines using PI's just because you can trivially get external I/O in and out of them. Then things like measuring temperature, turning fans on/off, etc, is literally trivial. Or, maybe even just make an LED chaser for the front panel who's speed tells you some important parameter. :)
Yes you need a resistor on the LED, otherwise you're relying on the current limit of the output pin >:-0 . Ideally you'd be switching a transistor that would drive the LED.
@@jonshouse1 A quick google suggests it can only supply 50mA to all GPIO so for up to three LEDs you'll probably get away without a transistor. I'm an electronic engineer, I'd always use one :-)
@@nialstewart8263 I wont sweat total power dissipation for one LED on a board. would not use one unless needed as it is another thing to source, more PCB space and another component for some Chinese factory to inappropriately substitute and cause subtle issues the moment I stop looking ;-) just saying ....
"Ah maaan, there's JSON and build environment, I don't wanna know about all of that." Forth programmer: "I don't wanna know about all of that either and, look, the LED's already blinking!" 👍
Got a like just for "So you don't have to try it both ways!". Made me think about a video *I* am planning to share my "forever" lamp and my intention is to make it simple enough so anyone can do it and one of the things I'm going to be mentioning is "If it doesn't work, stick it in the other way!". Also, in case anyone's interested, it's a project for a night lamp. I have a love for things that last a long time and my original intention was to make something like that using a whole gaggle of tritium lights. But instead I made an "emergency" light that has a "glow" mode with a trimmer pot to adjust the glow mode level and then a momentary pushbutton with like a 100 ohm ballast (much MUCH brighter than the 10K-100K trimmer ballast. I gave an order of magnitude there because I'm old and can't recall and I'm not tearing it apart for a comment only to hot melt glue it back together). Honestly, if I hadn't had it sit on my night stand for 2.5 years glowing away every single night, I wouldn't have believed it. I knew the runtime was going to be stupid, I mean, I did the math before I built it for a couple of different drive currents, but turns out I was able to turn that trimmer pot to it's highest resistance and it was still bright enough to read a written page up close so long as you have night adapted eyes. I was expecting to have to drive it WAY harder to be that bright. We're talking close to the light of a glow stick in cooler temperatures, but it runs for literally years on a single set of 3 AA cells. As far as electronics projects go, it's literally as simple as you can get and honestly, I've made much more technically impressive toys as gifts (I made "blinkie" for my ex boss/friend I used to jockey code for. It was a pic 12c508A microcontroller that blinked an LED at random using a linear feedback shift register. It ran for about 4 to 6 months on a set of cells with the low clock rate I ran it at. It even came with ASM source on printed paper.! :P It was because he always joked "Micro's aren't good for anything but blinking lights". Lol! And yes, he loved it.), but seeing something that runs for literally years like that, entirely on its own, it *feels* like alien technology. So, I'll do the next one under the camera. :P
Thanks Dave, just finished installing and compiling. This was great. Could I interest you in explaining how to get control of the tty/uart in a pi-C program. It would be a great help and open many doors. Keep up the great work. BTW, enjoyed your book, explained a bit about me to me. I'm sure I'm not the only one.
It is good to see an actual software engineer posting content on how to program stuff for a pi. There is other content, but the real tragedy is the scattered quality of it all. I do see your content as a fair comparison to Jeff Gerling's videos. If not for any other reason than to give newbies some more guidance since us older dev's can totally just make things work using some pretty janky setups while mumbling "I will just use vim and a command line."
I'm a hardware guy learning Pi coding, Dave is software guy learning hardware. From the comments lots of hardware guys screaming about the lack of a resistor.
@@alwayscensored6871 Totally. I am a software guy, too. But I did land a job in hardware from having arduino and pi builds as a hobby. I will say this, the chances of breaking a pi is MUCH greater than the chances of breaking an arduino. And I have seen the basics you learn with these systems ignored and people accidentally fry $4000 equipment. So do follow the wisdom dropped by the electrical engineers.
@@mattwestover8014 Pi's don't survive much if you stick 12v into the 5V, whoops. Mind you I still have a model A running after 10 years, B+s running 24/7 for 8? Nothing beats them for the price. Still learning Pico's, just got my first PicoWs.
@@alwayscensored6871 Picos are great. So are the Arduino Nano Connect rp2040 if you need a little more functionality (i.e. they come with a built-in ESP32 module for wifi, and more on board sensors than the usual basic microcontrollers on the market. Dave has a lot of useful content for ESP32 boards, too. He managed to inspire me to buy a few. Maybe one day he will mess with a nano connect since it is more comparable to the hardware his LED driver was designed to use.
Great video, keep them coming. I saw a video on “The Coding Train” channel where we programmed graphics using fractal cos and sin functions, with an old 8 bit unit. Worth a look. But I do wonder how far graphically we could push the simple Pi unit. A video on creating a simple high res image, without an image file, would be great. I’m r coding your face onto the screen only using asci symbols. Fun 🤩
As others has already pointed out, wiringPi is deprecated. There is only a 32bit version available, so it wont install on a 64bit version of raspberry OS, debian etc.
As an old "bare metal" embedded system engineer, I dislike any "high level" abstraction between the programmer and the hardware. That, and no programmable interrupt handling !
Very nice video. Nice to see everything "up front", nothing happening behind the curtain. I'm surprised a current limiting resistor isn't needed, but hey if it works it works. The VS looks very nice (lots nicer than the old vs6). BTW I have an autistic son with some significant intellectual limitations but he's making his way in the world ok (with some help from the state).
FYI -- in Raspberry OS Bullseye no longer supports WiringPi. It has been deprecated because the original author (Gordon) has decided to stop supporting it because of various reasons PiGPIO is the alleged replacement. If you're programming in Python, you can use the python3-gpiozero package (installed by default). Also, I believe you meant "Remote Development" in the video description. "Remove Development" seems a bit counterproductive...lol
Don't use hardware-specific crap like WiringPi, just use libgpiod, the generic Linux GPIO library that works on any hardware. That way when someone wants to run this code on a different board because there are no Raspberry Pis to be had anywhere they don't have to rewrite the entire thing for no good reason. Plus, the sysfs interface that WiringPi still appears to use has been marked deprecated in the kernel for a while. Even the dead link to the main git repo says "look for an alternative - as in use another GPIO library"
Here's an idea way outside the box but would be useful to some, Build a Pi that could be "tap" into modbus RTU (serial) communication and output it. Would be a great debugging tool for an older protocol still used a lot in industrial applications, but no one is building tools for it anymore.
I found a course on udemy where we use the datasheets and program directly to the registers. A lot of lines of code to blink a light, but baremetal programming like that is fun.
I've been developing for 30 years, and I hate to say because I've done it commercially, I'm really comfortable with GUI development in Windows, but unfortunately not in Linux, so I'd love to see something about that.
Dave - Love your videos.. I'm definitely interested in more videos like this. I have been into computers since the late 70s, and had a TRS80 COCO first.. Did some assembly on the COCO and then the PC in the DOS days, but assembly got very complicated for an uneducated hacker like me when protected mode was introduced, so I moved on to Turbo Pascal. I ended up on the administration and networking side of the house though, so while I was off doing Active Directory, Exchange, and Cisco networking, my programming skills froze in time. I did a fair amount of VB6 though, and have been doing the microcontroller/IOT thing since the original "Basic Stamp" in the early 90s. The fascinating thing to me here was the integration of VS with the PI.. I've got maybe a dozen PIs around the house doing various things, but had NO IDEA I could use VS to do the development, especially remotely! I would love some more basics on the development environments and some of the modern tools. Thanks a lot for taking the time to make these videos - They are very interesting!!
For people advising the resistor. I don't know about the Pi, but Arduino has a resistor embedded in its circuits for uses like this, so it's ok to plug the led directly in some cases.
AVRs (the microcontroller on the Arduinos) don't have embedded resistors, and Arduinos don't have external ones. The output pins have short-circuit protection, which isn't the same thing. LEDs need resistors to limit current (or be driven with a constant-current source).
@@medicallyunexplainedsymptoms Hi, I responded but YT deleted my comment. I'm a noob with just a couple of projects put together with help of tutorials. I don't have much knowledge of electronics, but I was referring to the pull up resistors and I read somewhere it's ok to use then.
@@ShuAbLe The pullups do not current limit the GPIO. The gate still needs a series resistor. On most processors the internal pullups are referred to as "weak pullups" as they tend to be around 100k ohms, they are not current limiting the transistors sinking or sourcing current from the GPIO line... It is a little confusing, but makes more sense if you see it drawn in individual transistor/resistors.
Hey Dave! Love the videos you do here! I'm super interested in low level stuff on the Pi without an operating system (and actually saw someone do something similar to this video, but in Rust without an operating system). Do you think you could do something like that in the future?
@Dave's Garage - As a REAL green Pi/Arduino/ESP32 user who's fallen head over heals in the IoT & home automation - home assistant end of the aforementioned three. I'm about to embark on a lighting quest (RGB+CCT) that may or may not involve hyper HDR(SK6812's @5v for the 65" LG OLED). I would be really interested in watching you create some interesting effects, say... for [my] shelving that has 12 separate strips (60LEDs/m - 24LEDs/strip) of WS2812b's illuminating each cubicle of shelf. And then somehow tie that in with something like Home Assistant...? (GOD I Hope I got the nomenclature right with my vernacular! Lol!) Been subbed over a year and dropping likes to all I've watched, and just LOVE you content! Even the short series in which you were tinkering with the most high-powered computer available in my birth year 1977 🙃😉 Never stop brother! I just love learning, and have been a full blown nerd for so long, it WASN'T cool when I was first called one 😁😅
I would like to see a video on restoring an SD card back to full size. Using diskpart and SD Formatter is the only way that has worked for me, perhaps there is a program that will restore an SD cards capacity without using didkpart but I haven't found it.
9:58 No need to ssh into the pi again here. VS Code has an integrated terminal (bring it up with ctrl+`). This terminal is the pi's terminal, not your host.
2:35 - I suppose you're getting a kickback for these, and, if so, I understand. Yet also, since you're "mostly in this for the subs and likes", I thought I'd point out that Adafruit is a great source for stuff like this, too... And as far as I can tell, a much more ethical option to link to. :)
3:14 "Convince me otherwise!" Try that in a job interview. is longevity important in your code? why take the shortcuts with physics? it will ultimately degrade.
I like the idea of Dave doing this work in GCC on Linux; fun hacking using bits that would have been a big no no during some of the time he was at Microsoft.
This video is definitely getting put in browser tool bar. I use my PI4 several times a week to surf the web and practice my CLI, but now I will get into more play time with it. Wish you did the code in VIM on the pi. Now I have to learn VS Code. lol.
It's just a text editor. Shell in and edit in vi or whatever editor you like. build/link with gcc from the command line and learn gdb while you're there. It's not hard. No GUI or mouse needed.
Do you teach your kids programming? If so, do you have any tips as to where to start? I’m not a coder myself but I would like them to learn for their future.
another great video BUT sudo apt install wiringpi returns : Package wiringpi:armhf is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package 'wiringpi:armhf' has no installation candidate seems a lot on the web about wiringpi but no good sources so cannot build it. Are you using 32 or 64 bit raspian -- above on 64 How can one get wiringpi or a suitable alternative??? Same problem with previous vid on Visual Studio (not code) Please help 😓
My VS screen doesn't look like yours, and I can't quite get to where you edit the ssh config. Obviously, I haven't been able to try anything beyond that point.
You probably get away with not using a resistor for the LED because the LED voltage drop is close to the Pi's 3.3v but not using one is not a good idea for the LED or Pi as you may still be exceeding safe current for both.
When I downloaded the app and it opened, it looked noting like yours and nor could I make look similar, thus I returned to my usual VNC to link them together.
I think I have several PIs and mini pcs laying around waiting for me to spend some time with it..... any idea where I can find time? I really enjoyed this video it motivates me to change a few priorities and start tinkering. Big thanks.
This is a great starting point for anyone wanting to tinker with the RPi and electronics. I once developed a commercial product that was basically 75% this. A bit more software and a relay instead of an LED (well, in addition to the LED (...actually 3)) and a Raspberry Pi Zero. Point is: tinker, tinker, tinker.
This is a poor starting point for anyone wanting to tinker with an RPI. It breeds an unneeded dependency on proprietary tools to do what is a simple job that can be done without Windows, VS or a PC.
@@jonshouse1 There are usually multiple ways of doing things. This is one way. VS Code is open source and works on Microsoft, Mac and Linux. VSCodium is also an option if you don't want any of the telemetry stuff in the MS binaries.
@@jonshouse1 why is it unneeded.
The world depends on proprietary and non.
Learning both is better than one.
@@HAGSLAB VS is not open source in any meaningful way, otherwise it would be in Debian free and would install on my Linux/Sparc machine... I've met modern programmers who simply are unable to cope without their pet IDE of preference. The entire VS/Xcode/Android studio ecosystem breeds people who are unable to cope with real programming and have poor differentiation between features of the operating system, IDE and compiler. I think it is very poor way to learn anything to use any IDE, but I find Microsoft's efforts to push their environment on students distasteful and probably in the long term harmful to open source.
@@jonshouse1 Haha, I find you pushing your environment more distasteful than Microsoft giving away free and open source software my dude.
I like that you did an example in C, as opposed to every other tutorial that uses Python
python is w virus
2:12 It is a good habit to use a resistor to limit the current passing thru the LED. :) You can calculate using Ohms law. R = (Vsup - Vf) / Imax. Ex (3.3 - 1.7) / 20mA = 80 Ohms (100)
Vsup = Suplpy voltage
Vf = forward voltage of the LED
Imax = maximum current thru the LED
To be safe, we have to take in account also the maximum current draw of the RPI's GPIO pin = 16mA (3.3 - 1.7) / 16mA = 100 Ohm
And modern LEDs are bright enough with only 1 - 2 mA. For a green LED (3.3 - 2)/0.002 = 650R would be about right. I'd use 620R.
The longer reason is that LEDs are non-linear devices. Once the voltage across it is enough to turn the LED on, its differential resistance is very low - that means a small change in LED voltage leads to a large change in current. Essentially it's like putting a short-circuit on the Pi's output, as it's trying to supply amps (not mA) to make up the voltage difference between its output and the LED's voltage. The Pi will have some limit, but it's never good to rely on that. Similarly, LEDs shouldn't be paralleled with only a single resistor - one resistor per LED is needed.
this comment and replies rock
@@medicallyunexplainedsymptoms You also need to provide for component failure. LED's will typically fail open but on rare occasion they will fail short and with nowhere to shed that load your 3.3v rail goes to ground and stays there until, well, it doesn't. No resistor is like rubbing that lamp eventually that blue smoke genie is going to grant your wish for a new Pi, but not in the way you expected.
Without any calculations, a 220 or 330 ohm resistor would provide some current limiting and also light up a red or green led.
If you connect the LED in wired and logic (activating the internal pull-up resistor or the pin has an external pullup) you can omit the external resistor, but is dangerous to rely on the internal pullup resistor. The output in this case will be inverted.
I gave this a shot with my son today. We were curious about the vscode setup. It took us a few hours and eventually we had a successful blinking light. Thanks Dave. Very useful. Would be good if you had some more pi content. Always good to learn new things.
As what other have commented about in this video. If you are gonna hook an LED directly to the pins of the Pi. I would recommend that you use a BLUE LED for this, why? Because a blue LED had a forward drop of about 3 volts, were as red and green LED's have a forward drop of about 1.7 volts. Having that extra forward drop help reduce load stress on the IO pin as well as the LED.
Yo mamma has a forward drop.
Yep, blue, white, or modern emerald green. White LEDs are blue LEDs with yellow phosphor, and emerald green ones also have Vf around 3V.
Either that or 2 LEDs in series
Hey Dave. Just wanted to say that I am finding myself a little more in your videos. Thanks for stepping out of the comfort zone and doing this.
Great to hear!
Pretty cool using VS for the UI on the PC and running the actual compiler/linker/debugger on the PI itself. Am looking forward to using it in the near future! Thanks Dave.
Dave, Thanks for an excellent presentation of C in VSCode for RaspberryPi.
You rekindle joy!
Glad it was helpful!
The reason you don't need a resistor with LED is because the output of the PI is aready current limited. The forward voltage will stop at the point its current limited. However the GPIO will go dead at some point. I know this because we have some card access reading systems set up like this and after a couple of months the GPIO fails on every one and also affects some of the other non used gpio. So I recommend using a resistor to ensure longevity.
This is a problem is that software "engineering" is not like every other type of engineering. This is the hardware equivalent of checking that an object is not null before using it. For a noob it'll probably work fine without the check 99.999% of the time and the rest of the time, someone just turns it off and on again. But if its possible for it to be null then you need to deal with it. Unfortunately, in hardware land, once the GPIO output transistor is buggered a reset doesn't fix it - Its permanently buggered. So rather than relying on a current limit that is there probably for static protections rather than direct abuse - far easier to just make sure you're only ever drawing a couple of mA from the pins. And, just like software guys, hardware guys all ignore their own standards and occasionally make something do something because they can. So I2C with 3.3V and 5V parts is an example, each pin has a clamp diode to prevent external pulling the pin above 3.3V but with I2C some idiot will have pullups going to 5V, we rely on the fact that as they are 10k the idiot diodes will clamp at 3.3 and only a fraction of a mA will flow because its 10k but thats well within the 10mA limit. So there you go, don't do it but if you do know the limits.
Great callout for Jeff Geerling! I love both of the channels. Jeff (because he's local to me and has great content) and Dave (because he has great content). Keep up the awesome work, Dave!
Dave, this was great timing. My grandson and I are just starting out learning how to program the raspberry pi’s to notify me when the mail has been delivered to my mail box at the street. We thought your intro training was excellent as we both understood the programming and wrote our first working c code program on our new RPI’s. We each have PI 4 Mod B 8 gigs. Hope you build on the training you have started with the PI C programming. Tyler & Poppy Cobb
What a wholesome comment and project for you and your grandson. I wish you both good luck!
For all those questioning a resistor... a PI3 can only output 16 mA max on each pin. The default setting is 8 mA. I haven't used wiring pi myself so I don't know if you can change the output level through that or not. I do know if you get into the low level memory functions it can be changed that way and I think it is possible with a few other GPIO libraries.
The LED did look like it was being overdriven! 😉 I would definitely calculate a reasonable resistor to limit it. It'll prolong the life of the LED 🙂
Yes. Thar setup put the LED at risk, but more significantly, it also put the RasPi itself at risk. One really needs resistors (roughly minimum of 1k) to make the GPIO safe on the RasPi...
@@BGBTech doesn't need to be that high! 100-300 would do nicely
@@danman32 For an LED those would probably work OK (since the LED adds its own voltage drop). For things like switches or signal loads, I usually prefer 1k to be safe. This limit each pin to around 3.3mA; though granted, the rated limit is 16mA, safer to stay short of the limits.
So awesome! Thanks for the complete introduction. Now I can use VSC, C, and the debugger!
that breakout cable is AWESOME
I saw you try to run "cls" in the BASH terminal, and here I thought I was the only one to make that mistake! Apparently CMD and BASH syntax is similar enough to confuse our brains.
You have per GPIO pin and total GPIO pin current limits on the Pi. Depending on how much your LED draws you can put some strain on both the Pi and the LED.
Very cool, I learned about remote development using VSCode. I'm one of those old grey bearded UNIX guys who wouldn't generally use VSCode for this type of stuff, but I do have it for development on Windows so I will have to experiment here.
This reminds me of one of the most useful features of an old '70s minicomputer, the wait LED. You could tell a lot about how your system was performing by how this LED blinked, or didn't. Now we need someone to implement a wait LED in the Raspberry Pi Linux kernel, probably in cpu_idle just before (turn off LED) and after (turn on LED) it calls cpu_relax.
Old, grey bearded wizard! Thanks Dave. From another old grey bearded wizard, 1000's miles from home. I have a Pi with me but had to use it for something else. Great tutorial, looking forward for more.
RE: No resistor for an LED running on 3.3 volts. If memory serves me correctly, diodes do weird things to either current and/or voltage, so the resistor was to act as a load to control the current/voltage to keep the LED from burning itself out. But, since you're not running that LED for more than a few seconds, I think you're safe. Then again, there's an answer to this, but it would mean dusting off and cracking open books from Radio Shack that I haven't opened since the late 80's. (Yes, I was THAT NERD/DORK/DWEEB from high school that was reading books on electronics back in high school. Why yes, I also wore mismatched clothing with high wasted pants straight from Revenge of the Nerds, too. Why do you keep asking these questions?) Short answer is I'm not gonna, because that's work and I have coding in C# to learn.
It's going to depend on the LED. For anything more than test purposes I would recommend doing the math, and you need to know the specs of the specific LED. Even among the same size, brand, and design the specs will change based on color. I haven't burned out many LEDs at 3.3v that I remember, I usually default to a something like 60R on 3.3v if I'm not going to figure it out first. But on 5V an average LED will go out immediately (not a few seconds).
It should have a resistor even though the logic voltage is similar to the LED forward voltage. The logic output will current limit but it is not a good idea to rely on that as it makes the chip run hot if greater than 20ma. The current the LED will draw depends on its forward voltage drop (differs by color and type) and other factors such as temperature. It is bad practice to run any LED without a series resistor. 330R is about correct, min value should be 150R, for a high brightness LED upto 4k7 will be ok.
@@kyleolson8977 60R at 3.2v=53ma, way off. 150R = 20ma is about the smallest safe value with 330R = 10ma being more sensible for most indicator LEDs, personally I would use 1k = 3.2ma for high brightness LED types.
Yeah, I'd like to see you do more Pi programming stuff. I'd like to see projects that have a physical result, like a weather station or remote camera stuff. Also it would be cool to see some audio related stuff like maybe an amplifier or something.
Seeing the Apple II in the background was awesome. That was my first computer back in the day.
3:34 - Dave you should know this by now, but TH-cam AUDIENCE IS NEVER EXPERT SUPERVISION. You can't claim us bunch of jokers and trolls as being "experts" at anything other than being jokers and trolls.
@♜ᴛᴇʟᴇɢʀᴀᴍ+𝟏 𝟐 𝟔 𝟐 𝟗 𝟓 𝟓 𝟖 𝟗 𝟒 𝟎 Fuck off you bot! You will not be scamming me or anyone else here!
Super cool video today Dave. Now I gotta go find my old pi and start playing since you've done all the legwork of setting it up!
Definitely would love to see more on working with the Pi in Code! More on microcontrollers in Code as well would be great :)
I actually use my Raspberry Pi inside the guts of an old BBC Micro. I removed all of the original electronics, connected the original BBC Micro keyboard to dedicated USB convertor (manufactured by Tynemouth Software), and then connected that USB directly to the Pi. After "hot wiring" one of the keyboard LEDs to the new (and cold running) TDK PSU, the machine even reproduces the BBC's start-up beeps. Other mods included modifying the rear ports to HDMI, USB and Serial, and blanking off the unused connectors with matt-black plastic plugs. What's amazed me about this is just how nicely a single box computer (with an HP monitor sat on top) actually works! In fact, when I'm not working - it's pretty much my main computer.
Erm... by any chance selling any of the removed electronics?
@@MechanicaMenace Sorry - they're all carefully packaged in anti-static bags and stored in the loft. Another bit of bad news is that Tyneside no longer sell the fantastic little BBC Micro to USB convertor they used to make. A real shame that, as I would have loved to have made another BBC-PI Micro for my little nephew!
i thought he had open sourced that converter?
@@lindafader9618 Ta for the heads up!
I've been going through Paul McQuarter's course on Python on Pi but I would also like to program in C on the Pi.
For Paul's course I have the Pi sunfounder kit which besides devices and sensors, comes with a breadboard and breakout cable
Dude! I wish this had a few more search key words as you covered exactly what I was looking for. For the life of me I could not figure out where to put that -lwiringPi ! I also hadn't thought about running as admin/sudo. Thanks!!!!
Thanks!
As for topics: More on Visual Studio using "C", "C++", and Rust. Modular programming. Risc-V coding.
They say less is more but in programming More is More.
Plus, I plagiarize -- as do all programmers and musicians.
Would love to see more like this, been interested in learning the coding side of electronics but never got around to it.
C is such a beautiful language! I just started learning it for fun. :D Yes, more programming!
Er, C is ugly, been using it for 40 years, I prefer almost any other language on Pi's.
@@alwayscensored6871 lol agree to disagree, I personally think go, and python are ugly lol
I hope you cover more complex embedded topics in the future. I do really enjoy your content.
3.3V for a green led may be fine, but red leds will generally have lower forward voltage... they will scream if no serie resistor is used!! (but I personally always use resistors :D )
I've burned out a board with static from my hand connecting with a signal wire that had no resistor. Also got a lot of line on the noise.
You'll save yourself a lot of headaches with a good resistor placement.
Resistor please, proper respect for I/O pin current limits.
Hi Dave. This opens up a whole world of useful stuff for the PI. I'd like to see software allowing the creation of a web server that serves input/output status and analogue I/O values from the PI. It would be useful for remote monitoring of the home environment etc.
I've considered actually building myself a bunch of NAS machines using PI's just because you can trivially get external I/O in and out of them. Then things like measuring temperature, turning fans on/off, etc, is literally trivial. Or, maybe even just make an LED chaser for the front panel who's speed tells you some important parameter. :)
Yes you need a resistor on the LED, otherwise you're relying on the current limit of the output pin >:-0 . Ideally you'd be switching a transistor that would drive the LED.
Pi can source and sink around 18ma, unless the LED is from the 1960s I don't think it needs the transistor! Yes, it should have a series resistor.
@@jonshouse1 A quick google suggests it can only supply 50mA to all GPIO so for up to three LEDs you'll probably get away without a transistor. I'm an electronic engineer, I'd always use one :-)
@@nialstewart8263 I wont sweat total power dissipation for one LED on a board. would not use one unless needed as it is another thing to source, more PCB space and another component for some Chinese factory to inappropriately substitute and cause subtle issues the moment I stop looking ;-) just saying ....
@@jonshouse1 Yes fair enough. Too much for software people to get their heads around too. 🤣
@jonhouse1 id never buy anythi g you designed
"Ah maaan, there's JSON and build environment, I don't wanna know about all of that." Forth programmer: "I don't wanna know about all of that either and, look, the LED's already blinking!" 👍
Got a like just for "So you don't have to try it both ways!". Made me think about a video *I* am planning to share my "forever" lamp and my intention is to make it simple enough so anyone can do it and one of the things I'm going to be mentioning is "If it doesn't work, stick it in the other way!". Also, in case anyone's interested, it's a project for a night lamp. I have a love for things that last a long time and my original intention was to make something like that using a whole gaggle of tritium lights. But instead I made an "emergency" light that has a "glow" mode with a trimmer pot to adjust the glow mode level and then a momentary pushbutton with like a 100 ohm ballast (much MUCH brighter than the 10K-100K trimmer ballast. I gave an order of magnitude there because I'm old and can't recall and I'm not tearing it apart for a comment only to hot melt glue it back together). Honestly, if I hadn't had it sit on my night stand for 2.5 years glowing away every single night, I wouldn't have believed it. I knew the runtime was going to be stupid, I mean, I did the math before I built it for a couple of different drive currents, but turns out I was able to turn that trimmer pot to it's highest resistance and it was still bright enough to read a written page up close so long as you have night adapted eyes. I was expecting to have to drive it WAY harder to be that bright. We're talking close to the light of a glow stick in cooler temperatures, but it runs for literally years on a single set of 3 AA cells. As far as electronics projects go, it's literally as simple as you can get and honestly, I've made much more technically impressive toys as gifts (I made "blinkie" for my ex boss/friend I used to jockey code for. It was a pic 12c508A microcontroller that blinked an LED at random using a linear feedback shift register. It ran for about 4 to 6 months on a set of cells with the low clock rate I ran it at. It even came with ASM source on printed paper.! :P It was because he always joked "Micro's aren't good for anything but blinking lights". Lol! And yes, he loved it.), but seeing something that runs for literally years like that, entirely on its own, it *feels* like alien technology. So, I'll do the next one under the camera. :P
Oh thank goodness. I half expected you to put Windows on it, to blink the LED. ;)
Excellent video Dave! This kind of thing is great! more, more!
I can't resist leaving a comment about that poor LED getting blasted with whatever the current limit is on the GPIO pin
id be more worried about trashing my 50$ pi board
Thanks Dave, just finished installing and compiling. This was great. Could I interest you in explaining how to get control of the tty/uart in a pi-C program. It would be a great help and open many doors. Keep up the great work. BTW, enjoyed your book, explained a bit about me to me. I'm sure I'm not the only one.
Nope, not the only one. Trying to prototype some serial code. It seems to be easier in baremetal than Linux. Even Python struggles.
I'm sure someone will say in the comments, " why are you using a Pi for flashing that LED?!" "just use an LM555 timer!" :P
why even use a 555, two transistors is fine..anyway, using a pi to blink an led is not doing electronics
Has DAVE gt an Apple Watch??? What a world we live in 🤣🤣🤣🤣 Oh and sudo apt update && sudo apt upgrade
Nice tutorial! Now its time to wire up my Pi to a car horn and make myself a homemade alarm clock suitable for a heavy sleeper.
It is good to see an actual software engineer posting content on how to program stuff for a pi. There is other content, but the real tragedy is the scattered quality of it all. I do see your content as a fair comparison to Jeff Gerling's videos. If not for any other reason than to give newbies some more guidance since us older dev's can totally just make things work using some pretty janky setups while mumbling "I will just use vim and a command line."
I'm a hardware guy learning Pi coding, Dave is software guy learning hardware. From the comments lots of hardware guys screaming about the lack of a resistor.
@@alwayscensored6871 Totally. I am a software guy, too. But I did land a job in hardware from having arduino and pi builds as a hobby. I will say this, the chances of breaking a pi is MUCH greater than the chances of breaking an arduino. And I have seen the basics you learn with these systems ignored and people accidentally fry $4000 equipment. So do follow the wisdom dropped by the electrical engineers.
@@mattwestover8014 Pi's don't survive much if you stick 12v into the 5V, whoops. Mind you I still have a model A running after 10 years, B+s running 24/7 for 8? Nothing beats them for the price. Still learning Pico's, just got my first PicoWs.
@@alwayscensored6871 Picos are great. So are the Arduino Nano Connect rp2040 if you need a little more functionality (i.e. they come with a built-in ESP32 module for wifi, and more on board sensors than the usual basic microcontrollers on the market. Dave has a lot of useful content for ESP32 boards, too. He managed to inspire me to buy a few. Maybe one day he will mess with a nano connect since it is more comparable to the hardware his LED driver was designed to use.
5:38 "I read of course and accept the agreement" 😂
I must admit to jealousy when you pulled out that wera screwdriver set! sweeeet.
Great video, keep them coming. I saw a video on “The Coding Train” channel where we programmed graphics using fractal cos and sin functions, with an old 8 bit unit. Worth a look. But I do wonder how far graphically we could push the simple Pi unit. A video on creating a simple high res image, without an image file, would be great. I’m r coding your face onto the screen only using asci symbols. Fun 🤩
As others has already pointed out, wiringPi is deprecated. There is only a 32bit version available, so it wont install on a 64bit version of raspberry OS, debian etc.
As an old "bare metal" embedded system engineer, I dislike any "high level" abstraction between the programmer and the hardware. That, and no programmable interrupt handling !
Thanks Dave, as always excellent stuff. Stuart from Melbourne AU
This is definitely going to be great for my students at work with robotics. Have to give it a whirl on a pi Zero W
Very nice video. Nice to see everything "up front", nothing happening behind the curtain. I'm surprised a current limiting resistor isn't needed, but hey if it works it works. The VS looks very nice (lots nicer than the old vs6). BTW I have an autistic son with some significant intellectual limitations but he's making his way in the world ok (with some help from the state).
Dave, Love the AMG Wheel-Table, Dale
Thanks, did not need this, did it years ago BUT, if I was starting today Thanks This is Perfect. 😄
FYI -- in Raspberry OS Bullseye no longer supports WiringPi. It has been deprecated because the original author (Gordon) has decided to stop supporting it because of various reasons PiGPIO is the alleged replacement. If you're programming in Python, you can use the python3-gpiozero package (installed by default). Also, I believe you meant "Remote Development" in the video description. "Remove Development" seems a bit counterproductive...lol
Don't use hardware-specific crap like WiringPi, just use libgpiod, the generic Linux GPIO library that works on any hardware. That way when someone wants to run this code on a different board because there are no Raspberry Pis to be had anywhere they don't have to rewrite the entire thing for no good reason. Plus, the sysfs interface that WiringPi still appears to use has been marked deprecated in the kernel for a while.
Even the dead link to the main git repo says "look for an alternative - as in use another GPIO library"
there is now a fork
Here's an idea way outside the box but would be useful to some, Build a Pi that could be "tap" into modbus RTU (serial) communication and output it. Would be a great debugging tool for an older protocol still used a lot in industrial applications, but no one is building tools for it anymore.
I mean this as sincerely as I do platonically... I love you, man!
I found a course on udemy where we use the datasheets and program directly to the registers. A lot of lines of code to blink a light, but baremetal programming like that is fun.
this is not bare metal
I've been developing for 30 years, and I hate to say because I've done it commercially, I'm really comfortable with GUI development in Windows, but unfortunately not in Linux, so I'd love to see something about that.
Lazarus and Free Pascal, RAD IDE even on Pi, including a baremetal version Ultibo.
Excellent and useful. Would love to see more on PI.
Dave - Love your videos.. I'm definitely interested in more videos like this. I have been into computers since the late 70s, and had a TRS80 COCO first.. Did some assembly on the COCO and then the PC in the DOS days, but assembly got very complicated for an uneducated hacker like me when protected mode was introduced, so I moved on to Turbo Pascal. I ended up on the administration and networking side of the house though, so while I was off doing Active Directory, Exchange, and Cisco networking, my programming skills froze in time. I did a fair amount of VB6 though, and have been doing the microcontroller/IOT thing since the original "Basic Stamp" in the early 90s. The fascinating thing to me here was the integration of VS with the PI.. I've got maybe a dozen PIs around the house doing various things, but had NO IDEA I could use VS to do the development, especially remotely! I would love some more basics on the development environments and some of the modern tools. Thanks a lot for taking the time to make these videos - They are very interesting!!
For people advising the resistor. I don't know about the Pi, but Arduino has a resistor embedded in its circuits for uses like this, so it's ok to plug the led directly in some cases.
AVRs (the microcontroller on the Arduinos) don't have embedded resistors, and Arduinos don't have external ones. The output pins have short-circuit protection, which isn't the same thing. LEDs need resistors to limit current (or be driven with a constant-current source).
@@medicallyunexplainedsymptoms Hi, I responded but YT deleted my comment. I'm a noob with just a couple of projects put together with help of tutorials. I don't have much knowledge of electronics, but I was referring to the pull up resistors and I read somewhere it's ok to use then.
@@ShuAbLe The pullups do not current limit the GPIO. The gate still needs a series resistor. On most processors the internal pullups are referred to as "weak pullups" as they tend to be around 100k ohms, they are not current limiting the transistors sinking or sourcing current from the GPIO line... It is a little confusing, but makes more sense if you see it drawn in individual transistor/resistors.
Pi's have current limits on GPIO pins but it is still good practice to use external resistor.
my dusty 3B+ will have a new purpose ! thanks a lot for the motivation
I love a great Apple Pi...erm, Raspberry I mean. Great vid Dave. Made me chortle but as ever, what you said actually works...Love it.
A similar project using UPsquared bored will be even more fun!
Brilliant vid Dave! Thankyou!
Hey Dave! Love the videos you do here! I'm super interested in low level stuff on the Pi without an operating system (and actually saw someone do something similar to this video, but in Rust without an operating system). Do you think you could do something like that in the future?
Great video Dave! I assume the gpio pins have an internal current limiting resistor since you didn’t add one and it didn’t burn up the LED?
I am sure I had to use one as it was different value to arduino`s.
@Dave's Garage - As a REAL green Pi/Arduino/ESP32 user who's fallen head over heals in the IoT & home automation - home assistant end of the aforementioned three.
I'm about to embark on a lighting quest (RGB+CCT) that may or may not involve hyper HDR(SK6812's @5v for the 65" LG OLED).
I would be really interested in watching you create some interesting effects, say... for [my] shelving that has 12 separate strips (60LEDs/m - 24LEDs/strip) of WS2812b's illuminating each cubicle of shelf.
And then somehow tie that in with something like Home Assistant...?
(GOD I Hope I got the nomenclature right with my vernacular! Lol!)
Been subbed over a year and dropping likes to all I've watched, and just LOVE you content!
Even the short series in which you were tinkering with the most high-powered computer available in my birth year 1977 🙃😉
Never stop brother!
I just love learning, and have been a full blown nerd for so long, it WASN'T cool when I was first called one 😁😅
13:41 Why you gotta call me out like that 😆
I would like to see a video on restoring an SD card back to full size. Using diskpart and SD Formatter is the only way that has worked for me, perhaps there is a program that will restore an SD cards capacity without using didkpart but I haven't found it.
Dave=mvp
10:23, Dave typed the windows version in terminal. :p
I felt personally attacked by that intro 😂
9:58 No need to ssh into the pi again here. VS Code has an integrated terminal (bring it up with ctrl+`). This terminal is the pi's terminal, not your host.
2:35 - I suppose you're getting a kickback for these, and, if so, I understand. Yet also, since you're "mostly in this for the subs and likes", I thought I'd point out that Adafruit is a great source for stuff like this, too... And as far as I can tell, a much more ethical option to link to. :)
It is an Adafruit he links to.
Dave, have you tried this with the latest (9/6/2022) 32 bit bullseye version? sudo apt install wiringpi fails with a package not found error.
3:14 "Convince me otherwise!"
Try that in a job interview.
is longevity important in your code? why take the shortcuts with physics? it will ultimately degrade.
Dave, I don't seem to have the build json file you show. Was that one you created or was it installed as part of the process you went through?
I don't currently have a pi but was curious. Looking at the code, did you need to include ? I didn't notice any standard input/output.
I like the idea of Dave doing this work in GCC on Linux; fun hacking using bits that would have been a big no no during some of the time he was at Microsoft.
The thing that takes this from merely good to great is that you wrote it in C.
This video is definitely getting put in browser tool bar. I use my PI4 several times a week to surf the web and practice my CLI, but now I will get into more play time with it. Wish you did the code in VIM on the pi. Now I have to learn VS Code. lol.
It's just a text editor. Shell in and edit in vi or whatever editor you like. build/link with gcc from the command line and learn gdb while you're there. It's not hard. No GUI or mouse needed.
@@TEDodd Thanx
I know I would like to see more videos on programming the pi.
Jokes on you. I use my raspberry pi more than I do my desktop computer.
Ditto, even have Pi400 with two screens at work as well as home.
Useful video thanks Dave !
Do you teach your kids programming? If so, do you have any tips as to where to start? I’m not a coder myself but I would like them to learn for their future.
I prefer visual basic blinking led :))
another great video BUT sudo apt install wiringpi returns :
Package wiringpi:armhf is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'wiringpi:armhf' has no installation candidate
seems a lot on the web about wiringpi but no good sources so cannot build it.
Are you using 32 or 64 bit raspian -- above on 64
How can one get wiringpi or a suitable alternative???
Same problem with previous vid on Visual Studio (not code)
Please help
😓
wiringpi is taken over by GC2 in github i have a video how to setup wiringPi in english and dutch using vscode if you are interested?
Got a bunch of pi's in the drawer, what I would like to see is maybe more hardware setup,examples of boxes vs implementations.
Fun project, wondering if:
Writing minimal bootable image to boot
rpi with sole purpose of blinking led in c. Is coming or not
Really nice👍
My VS screen doesn't look like yours, and I can't quite get to where you edit the ssh config. Obviously, I haven't been able to try anything beyond that point.
of course im gonna comment on an unlisted video
FIRST
I C what you did there.
You probably get away with not using a resistor for the LED because the LED voltage drop is close to the Pi's 3.3v but not using one is not a good idea for the LED or Pi as you may still be exceeding safe current for both.
When I downloaded the app and it opened, it looked noting like yours and nor could I make look similar, thus I returned to my usual VNC to link them together.
I think I have several PIs and mini pcs laying around waiting for me to spend some time with it..... any idea where I can find time? I really enjoyed this video it motivates me to change a few priorities and start tinkering. Big thanks.
But how do you make it run the program automatically when you boot the raspberry pi WITHOUT the connection from the remote pc running visual studio?