Man, you're right. Sorry about that. I must have fixed it after recording that. Folks. Slide that green wire up to the next row. Thanks for pointing that out, Gokul.
Dude, this channel is a goldmine. Im a pretty heavy book learner and haven't really spent much time watching videos related to programming, but I'm glad you ended up in my feed. You're a wonderful teacher, thank you for continuing to make videos.
Yep, ADC is very easy to implement, even if you're doing it from scratch on a microcontroller. It works as a great voltage sensor for your analog pins and, more importantly, its incredibly important to have when you want to interface it with certain sensors such as the DHT11 sensor
Can you make a video on how to use inline assemble in C code, either inside functions and other places with their practical applications? That would be really great :-)
I don't do embedded, but it's always informative to see a new video! most of the video I was confused, because I had no idea what the sensor is, and then it appeared in the last minute, maybe in future videos you could have it show up in a small box whenever the program is running?
Hey Jacob, I have a question. How can we register test functions at compile time in C++ , like with constexpr/consteval? for example: you're writing a unit testing framework and you want it to automatically register the tests at compile time.
Try some different ones using whatever microcontroller dev kit you can find! If you want confidence, go try some things! Get SPI communication working! Flash an LED with a bunch of interrupts! The possibilities abound
Dear Jacob Sorber, How to perform a unit test for ADC? How to automatically justify that MCU ADC measures really existing voltage without offset? Regards, AB
I'd love to see esp32 c/c++ tutorial using its official sdk, esp-idf. Personally I find esp32 is the cheapest and very accessible micro with tons of useful on board peripherals such as WiFi, dual core, and multiple hardware UARTs. The sdk and documentations quality are commercial tier too.
With a timer, you can put your MCU in sleep mode-so just the ADC and/or timer are working-and then have it wake you up when it's time to do something (by firing an interrupt).
@@JacobSorber That didn't cross my mind. But replacing the _delay_cycles() with a sleep function inside the infinite loop achieve the same power efficiency as timers?
@@ayu12641 You would have to check how _delay_cycles() is implemented, but usually, it's just a busy loop. If it doesn't change the CPU state into a low power mode, then it won't get the same efficiency.
▪️How'll processor differentiate between two static locals whose name is same? ▪️And what're map files, dep files? Human readable files? Generated by GCC? or by Make?
Does anybody have a source that does this with Embedded/Bare-metal C? Im stuck on an assignment, and everyone just wants to do arduino. The explanation + Delivery was fantastic though
A fun fact. PC lint software would throw a warning if you use while(1) for an infinite loop. One way to get past it is to use for(;;) loop which is less error prone as it has no values.
Using an ADC isn't that hard actually, you just need to learn to last-hit and attack-move properly, then all you have to do is play safe before you get your core items and then stay behind your frontline in teamfights and deal as much damage as you can!
3:31 - resistor and green wire wrong connect in breadboard
Man, you're right. Sorry about that. I must have fixed it after recording that. Folks. Slide that green wire up to the next row. Thanks for pointing that out, Gokul.
@@JacobSorber lol, first physical bug on your channel?
Dude, this channel is a goldmine. Im a pretty heavy book learner and haven't really spent much time watching videos related to programming, but I'm glad you ended up in my feed. You're a wonderful teacher, thank you for continuing to make videos.
You're welcome. Glad you're enjoying them. Let me know if there are topics you would like to see on here.
Yep, ADC is very easy to implement, even if you're doing it from scratch on a microcontroller. It works as a great voltage sensor for your analog pins and, more importantly, its incredibly important to have when you want to interface it with certain sensors such as the DHT11 sensor
Can you make a video on how to use inline assemble in C code, either inside functions and other places with their practical applications? That would be really great :-)
I'll add it to the list and see what I can do.
Simple, easy, well explained! I just love that, great job!
Thanks, Jakub.
You are the best teacher, thank you a lot! :)
Thank you from Vietnam.
I don't do embedded, but it's always informative to see a new video!
most of the video I was confused, because I had no idea what the sensor is, and then it appeared in the last minute, maybe in future videos you could have it show up in a small box whenever the program is running?
Hey Jacob, I have a question.
How can we register test functions at compile time in C++ , like with constexpr/consteval?
for example: you're writing a unit testing framework and you want it to automatically register the tests at compile time.
You should add switch hysteresis to your code, otherwise the light will keep switching on and off all the time during borderline light conditions.
Nice video. Note: Max binary value = 2^n - 1
True. 0...4095. 😀
Hi Jacob, what projects can I do to really feel confident in C?
Try some different ones using whatever microcontroller dev kit you can find! If you want confidence, go try some things! Get SPI communication working! Flash an LED with a bunch of interrupts! The possibilities abound
How do I use ADC to feedback the inverter in atmega And what happens when you do that?
Dear Jacob Sorber,
How to perform a unit test for ADC?
How to automatically justify that MCU ADC measures really existing voltage without offset?
Regards,
AB
I'd love to see esp32 c/c++ tutorial using its official sdk, esp-idf. Personally I find esp32 is the cheapest and very accessible micro with tons of useful on board peripherals such as WiFi, dual core, and multiple hardware UARTs. The sdk and documentations quality are commercial tier too.
Would love to see a video on Huffman coding!
Could you explain why using timers are more energy efficient? The time spent in the delay loop would still be spent in the empty infinite loop right?
With a timer, you can put your MCU in sleep mode-so just the ADC and/or timer are working-and then have it wake you up when it's time to do something (by firing an interrupt).
@@JacobSorber That didn't cross my mind. But replacing the _delay_cycles() with a sleep function inside the infinite loop achieve the same power efficiency as timers?
@@ayu12641 You would have to check how _delay_cycles() is implemented, but usually, it's just a busy loop. If it doesn't change the CPU state into a low power mode, then it won't get the same efficiency.
The first code you showed was only the main function. Where are the rest of the functions like the getvoltage and initialization?
PLEASE DO STM32F407VG DISCOVERY BOARD
▪️How'll processor differentiate between two static locals whose name is same?
▪️And what're map files, dep files? Human readable files? Generated by GCC? or by Make?
Does anybody have a source that does this with Embedded/Bare-metal C? Im stuck on an assignment, and everyone just wants to do arduino. The explanation + Delivery was fantastic though
Thank you so much 🥰, love you from Egypt!!!
Are there high speed adc 's ? Say 50 msps ?
Yes, there are, but as with any measurement equipment, things get expensive as your speed requirements go up.
Is there a difference between for(;;) and while(1)?
No. They're functionally equivalent.
@@JacobSorberfor(;;;) would be compiler error
@@duanedsilva yes, but not the for(;;)
Why you didn't use while true for looping infinitely
Good question. Guess I was just feeling in a for-loop mood. A while(true) would have worked, as well.
A fun fact. PC lint software would throw a warning if you use while(1) for an infinite loop. One way to get past it is to use for(;;) loop which is less error prone as it has no values.
Basically
Using an ADC isn't that hard actually, you just need to learn to last-hit and attack-move properly, then all you have to do is play safe before you get your core items and then stay behind your frontline in teamfights and deal as much damage as you can!
lmao league of legends reference
I want this shirt.
Thanks. I know where you can get one.