One minor point of critique: Explanations on absolute programming basics (like: What is a variable, what are datatypes, basics about functions etc.) are best explained in a seperate, dedicated video. Otherwise, it makes the video feel a bit tedious despite the well structured nature of this video. Particularly unpleasant for people with some level of programming experience. Other than that, this video was quite helpful.
1:40 Correction. Most Arduinos use a ceramic resonator. This is not as accurate as a crystal. Generally, a crystal is needed for things like serial communication in order to control the baud rate. The crystal pictured in the time stamp is used for this purpose. It is the crystal for the USB to serial converter. In this case the converter is another AVR microcontroller, an ATmega16U2. The crystal resonator used for the ATmega328 is pictured just below "ITAL" in the Made in Italy text. -Jake
Hey! who are you man. Believe me you have some very special, good gifted skills in terms of explaining things. The way you elaborate is simply magnificent. This is a great learning experience and please continue this. Thanks
This tutorial was incredibly useful! Thanks! I am trying to build a toggle button, like a push button that has the functionality of a switch, and was having trouble figuring out the code and set up. Any help would be appreciated. Thanks!
and my problem is "I'm making a digital clock [7-segment] using AT89s52 (NO RTC) but the time drifts about 5.6 seconds in every hour!! and this At89s52 microcontroller doesn't have any function like millis() inside AT89s52's IDE(Microvision Keil software), and a book suggests to play with the ppm and fix the error.But, yet the problem is At89s52 is not like Arduino " BTW I'm using a 16MHz crystal with this microcontroller and using timer_0 to generate a 25ms delay and using interrupt_1 to count that 40times so that there will be 1 second completed, but that's not the problem I guess.. I just need help.. .😎😎
I am a dumb engineer, but since you have quantified the deviations, why not make your seconds 5.6/3600 x frequency shorter? It is quick and dirty, but I think given the hardware, there is not much else you can really do. There are too many sources of error at play.
@@juliusfucik4011 Will try this for sure, ❤️ and u r not a dumb at all, even we can learn a lot from u brother 😊❤️❤️. Thank you, love for u from India ❤️
I could have Subscribed even before completing watching ; but content was great, so I subscribed after watching. Keep up the good work. Greetings from Tanzania 🇹🇿
Nice video, but there are some inaccuracies: 1. The timer/counter does not start counting “as soon as power is applied”: it starts counting when initialized by the Arduino core (see the setting of the TCCR0B register in init(), in wiring.c). Admittedly, this happens very shortly after power is applied. 2. The timer/counter does not overflow after 49 days: it overflows every 1024 µs. The 49.7 day rollover is for the millis() count, which is a different thing. 3. millis() does not give the running tally stored in the timer/counter: it returns a count of the timer/counter overflows, plus some correction to account for the fact that the overflow happens every 1024 µs instead of every millisecond. The micros() function, unlike millis(), does make use of the running tally kept by the timer/counter.
Thank you for explanation, Sir. I want to know, weather millis function can be used for RCWL sensor or not. I tried but nit succeeded. Can U plz guide me. Code as below and I want sensorVal=1 for 5 min int =rcwlPin=2; int=sensorVal; cosnt unsigned long Interval=1000*60%5; unsigned long PreviousTime=0; void setup(){ pinMode(rcwlPin,INPUT); Serial.begin(9600); void setup(){ sensorVal=digitalWrite(rcwlPin); millis()=unsigned long CurrentTime; if(sensorVal==1){ if (CurrentTime-PreviousTime>=Interval){ sensorval==1 PreviousTime=CurrentTime; } } else { (sensorVal==0) } Serial.println(sensorVal); ) I upload this sketch, but not getting desired result. Kindly resolve it. Thank you
I suffered watching all that rubbish about electronics so I could see the bit about elastic bands. There was nothing there. I think this was click bait for lovers of elastic bands. Keep up the good work on the presentation of technical stuff in a language I can follow.
I mentioned the rubber band before the re-upload and thought he must have re-uploaded to add the rubber band part. Nope, still nothing about rubber bands. I think it must be a joke.
Thank you. This video is the first step in my next project: Calculating the RPM of my stepper motor. The Arduino code that runs my stepper motor driver, turns a Pin connected to the PUL pin of the Driver to HIGH, has a delay of 500, then turns the pin to LOW. This code loops to run the motor at a constant RPM. This video will help. But if you have any suggestions/video recommendations to calculate the RPM, let me know. Thanks!
1:20 I find it amusing to suddenly see a photo that i made over 14 years ago and put on Wikipedia pop up in this video. The circuit wasn't even fully wired up correctly. Now look at me, still trying to learn how to make electronics work properly!
@@programmingelectronics, right , the UL or ul converting a number value to unsigned long , but what type is a value when convert a value using u , as example: 3000u what type unsigned is 3000u? integer or long ?
Hello , can i use two functions at same time ? , first function is for running DS18B20 use millis() , seconde fonction while (for running stepper motors and many security sensors , thanks
I thought you are going to explain hardware side of Timer/Counter setup in registers. But then you changed your mind and focused on Unsigned datatypes. These lesson looks unfinished lesson. Please make another video about full of this hardware setup...