LESSON 30: Advanced Software Interrupt Techniques for Reading Serial Data on Arduino

แชร์
ฝัง
  • เผยแพร่เมื่อ 19 มี.ค. 2018
  • You guys can help me out over at Patreon, and that will keep this high quality content coming:
    / paulmcwhorter
    This lesson shows how to use software interrupts to read serial data on the Arduino. This is demonstrated using the adafruit ultimate gps. You can follow this lesson on our WEB site at:
    www.toptechboy.com/arduino/les...
    The interrupt library used in this video can be found here:
    github.com/PaulStoffregen/Tim...
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 139

  • @riyadzahdour1302
    @riyadzahdour1302 4 ปีที่แล้ว +13

    "there is some good Pauls out there working on arduino" Paul Mcwhorter 2020

  • @101stAirsoftDivision
    @101stAirsoftDivision 6 ปีที่แล้ว +5

    Thank you so much for these lessons. These are all helping me in college while trying to code an autopilot from scratch. YOU DA MAN PAUL!!!

  • @jeffmahoney1271
    @jeffmahoney1271 ปีที่แล้ว +2

    Thank you so much Paul. You are the BEST teacher on TH-cam in my opinion!

  • @haozhe3237
    @haozhe3237 4 ปีที่แล้ว +7

    You are BRILLIANT Sir! Thanks SOOOO much for those very helpful tutorials!

  • @paulmeistrell1726
    @paulmeistrell1726 3 ปีที่แล้ว

    Really good lesson Paul. Being as I have a NEO-6M gps breakout I did not find a way to just have GPS send just 1 sentence. Had a lot of fun looking at the datasheets and software to finally decide this. The good news is even a huge block of data could still transfer without destroying the timing. There maybe a way but I was not sorting it out of the data sheets to software.

  • @springbok4015
    @springbok4015 6 ปีที่แล้ว +17

    ‘I’m out there banging that interrupt’ - Paul McWhorter 2018

  • @uyenminhvotran
    @uyenminhvotran 5 ปีที่แล้ว +4

    Hello. Just a quick tip for saving time in debugging for the issue talked at 27:16. Instead oif writing if (flag == 1), write if (1 == flag). If you forgot 1 equal sign, it will be spot out during the compilation.

    • @apratube
      @apratube 3 ปีที่แล้ว

      nice tip... but since we write the value first to avoid the mistake, we would know to check the sign.. :)

  • @osazeimhontu3239
    @osazeimhontu3239 6 ปีที่แล้ว +1

    Thank you sir for your wonderful tutorial, I love the way you make complex programs easy to understand.

  • @mjrokzz
    @mjrokzz 4 ปีที่แล้ว +1

    It's good to listen to your tutorial. For me most of the part in the tutorial is useful, Nothing to skipped!..
    And I have a request, if possible upload a video on hardware interrupt.

  • @Steve-GM0HUU
    @Steve-GM0HUU 2 ปีที่แล้ว +1

    👍very useful thank you.
    In case it helps anyone, I was using IDE 1.8.15 and I had to include:
    void readGPS();
    in variables section before void setup. Without this, code would not compile.

  • @sameerk12982
    @sameerk12982 4 ปีที่แล้ว

    Hello from India....Thank you very much Sir for this great tutorial...really helpful...appreciated.

  • @asarebaahdaniel5236
    @asarebaahdaniel5236 4 ปีที่แล้ว

    I watch your videos everyday and practicing alongside with you... Thanks you so much and God bless..pls can you give us more lesson on sensors

  • @marekczarnecki6714
    @marekczarnecki6714 5 ปีที่แล้ว

    You are awasome! You saved my project! Thank You!

  • @gauravbanwari1981
    @gauravbanwari1981 6 ปีที่แล้ว

    Dear sir I’ve been waiting for your esp32 or nodemcu series or any other iot based series. I would love you start it. I really understand the way you teach.Thanks☺️

  • @niceday2015
    @niceday2015 ปีที่แล้ว

    Amazing, I enjoy the course very much, thank you very much!

  • @neilorme316
    @neilorme316 4 ปีที่แล้ว +1

    Great video as usual - Is the new header file more capable than the one in Lesson 28? Should I keep the older one ?

  • @DRACOBUCIO
    @DRACOBUCIO 4 ปีที่แล้ว

    that was just awsome !!! i didn't know that's what i just need for solve my project. im now a suscriber.

  • @MicheleHjorleifsson
    @MicheleHjorleifsson 6 ปีที่แล้ว +1

    This was great information thank you

  • @nipunaupeksha
    @nipunaupeksha 4 ปีที่แล้ว

    Thank you sir. Really helped me.

  • @TechnoAutomation
    @TechnoAutomation 6 ปีที่แล้ว

    It's ozm. It's Beauty of programming.
    Thanks sir for teaching this technique.

  • @ismzaxxon
    @ismzaxxon 6 ปีที่แล้ว

    There is a way to read serial interrupt rather than using a timer (UCSR0A & _BV(RXC0)) . This only works on hardware serial ports though. In this case you are using the hardware serial port for the bootboader. Eg if (UCSR0A & _BV(RXC0)) { do something}
    Thumbs up. Love watching your vids and projects.

  • @doubleHLabs
    @doubleHLabs 6 ปีที่แล้ว

    great stuff, love the advance stuff

  • @barunbasnet
    @barunbasnet 3 ปีที่แล้ว

    Thankyou for your excellent information.

  • @juliorrsantos
    @juliorrsantos 4 ปีที่แล้ว

    Great video! Thank you very much!

  • @bluehornet6752
    @bluehornet6752 5 ปีที่แล้ว

    Instructive video Paul--thanks for making it. I love the fact that you teach your students to do incremental builds to catch errors early (like after you #include a header), but you don't have to flash the code to your Arduino to check it though. Just have them use the "verify" checkmark next to the download button. That way you're not re-flashing memory just to verify that you can access a library. The AVR chips do have a finite number of flash writes available, and you can exceed the number. So I just build ("verify") as needed, but only flash when I want to try running the new code. Just a thought.
    Also, and this is me being a bit obsessive-compulsive, I'll admit...but I wish you'd use more whitespace. It's hard to read your code sometimes because all the characters are often run together. In fact it's a bit ironic that you are frustrated with your students for mixing up "=" and "==" but then did it yourself--and (I think) it's less likely to happen if you use whitespace on either side of the == operator. As I recall, it's either the MISRA, JPL or JSF coding standards (I forget which now) that actually recommend the use of whitespace between tokens.

    • @bluehornet6752
      @bluehornet6752 5 ปีที่แล้ว

      Almost forgot... At the 24:40 mark, shouldn't you be checking for the '
      ' instead of '
      ' before setting your flag to 1? Otherwise it seems as though you're just leaving that newline character in the buffer--and it's not getting appended the NMEA string you've built. The Arduino documentation page for the serialEvent callback (called from the Arduino core) checks for '
      ' instead of '
      ' as you've done in this video.

  • @electronicsexplained287
    @electronicsexplained287 6 ปีที่แล้ว +1

    You are amazing .. I wish I was a student of urs

  • @michael3881
    @michael3881 3 ปีที่แล้ว

    I am watching your tutorials about software interrupts and they are pretty instructive and easy to follow althought, they are very complex, thanks a lot. I am working on a project and I need to read analog voltage using ADC pin, but with a software interrupt. I saw you used "Timer.initialize" but in my case I dont have a specific time but a code like a number or flag to activate the interrupt. Do you have any suggestion or tips to do that, please. I also notice that the interrupt function is a void, so if I need to save a value or set of values I need to create a global variable/array, right?

  • @mohananchan
    @mohananchan 2 ปีที่แล้ว +1

    Thank you so much Sir.You are fantastic.Can you help me if we want to do two timer interrupts ?

  • @sudiptamandal935
    @sudiptamandal935 3 ปีที่แล้ว

    Thank you sir , you make my day 🤗

  • @danmyself5341
    @danmyself5341 2 ปีที่แล้ว

    This is the third time I listened to this lesson and I'm starting to understand the whole concept I think I need to listen to it a fourth time thank you very much

  • @kavindugilshan
    @kavindugilshan 6 ปีที่แล้ว

    I love how you explain every code , line by line ..
    wonderful tutorial !!

  • @arishy
    @arishy 4 ปีที่แล้ว

    Finally I do understand Arduino Interrupt; thanks to your style .....
    You mentioned in #28 there are different "types" of it. And you "started" with the software type. Then in #31 you started a new topic......Are you planning to return to this fascinating topic with "other" types of interrupt ???

  • @more_u-listen_more_u_love9543
    @more_u-listen_more_u_love9543 5 ปีที่แล้ว

    Hello Paul,
    I need some help for interfacing two devices one is Bluetooth and another one is voice recognition module v3 with Arduino pin Hardware (0rx,tx1) and tx2 and re3 pin respectively, what communication(software serial,all serial or neo serial)
    should I use to get simultaneous data serially?

  • @alejandroperez5368
    @alejandroperez5368 6 ปีที่แล้ว +2

    This is polling. I was expecting to see a hardware-based interrupt type of tutorial on this occasion

  • @nischalsehrawat2130
    @nischalsehrawat2130 6 ปีที่แล้ว +1

    Hi Paul
    I have the following 2 questions about using sensors
    1. Once a sensor is initialised or started, does it keep on throwing data continuously (which gets stored in buffer) or does it
    only respond once we ask it to using let's say
    my_sensor = S1.readline()
    In other words, when we start reading data from any sensor after turning it on (or lets say initialising it) and lets say we put 10
    sec delay, how is the data read by the computer? I mean, will it read the data every 10 sec (and not care what happens in b/w
    those 9 sec) or will the data get stored even during those 10 Sec in the buffer and we get the latest value?
    2. Suppose I have 3 sensors namely S1, S2 and S3 that send data at different rates lets say 50 Hz, 200 Hz and 500 Hz
    respectively. So how to synchronize the data in time? In other words, in 1 sec, S1 would send 50 readings, but S3 will send
    500 readings, so how can this difference in data sending rates be accounted for while doing calculations in Arduino / Rpi
    projects?
    Thanks

  • @shredderegypt3394
    @shredderegypt3394 3 ปีที่แล้ว

    That is really useful. Thank you.

    • @shredderegypt3394
      @shredderegypt3394 3 ปีที่แล้ว

      Could you please take a look at Martin Jetpack and let me know how is it stabilize itself. I would appreciate your opinion.
      th-cam.com/video/NZ9Nw9T85wA/w-d-xo.html

  • @hendrikventer3611
    @hendrikventer3611 ปีที่แล้ว

    Good day Sir, I am in need of some advice. I have been working on a clock that works with led's. My programming to run this clock is working. My problem comes in when I want to set the correct time. I considered using interrupts, As I want to use one button for setting hours and another for setting minutes. I have also looked at the "switch case " commands. From the interrupts, I learned that when the interrupts have been dealt with it jumps back to where it was interrupted. I am also not sure whether the program will proceed with the next part of the program after it finished the case. I thoroughly enjoy your tutorials, it helps a lot.
    Thank you
    Hendrik.

  • @vishalmehta3636
    @vishalmehta3636 6 ปีที่แล้ว

    Hi, won't the arduino miss data packages from GPS when you stop the interrupt timer in the loop function?

  • @carmoldu
    @carmoldu 4 ปีที่แล้ว +1

    What if the update rate of the GPS is higher than the loop function rate? Won't that accumulate two consecutive NMEA sentences in the NMEA string variable?

  • @MuhammadHassaanBinTanveer
    @MuhammadHassaanBinTanveer 5 ปีที่แล้ว

    Hey, Your library is good except how can i add multiple interrupts? Thanks in advance.

  • @ahmedmaher-ez9xt
    @ahmedmaher-ez9xt 2 ปีที่แล้ว

    thanks for this amazing info

  • @ReckItRob
    @ReckItRob 5 ปีที่แล้ว

    Thank you for this

  • @sefenaymn308
    @sefenaymn308 3 ปีที่แล้ว

    Hello, your lesson is great, but can I use more than one interrupt.

  • @Venky5211
    @Venky5211 2 ปีที่แล้ว

    Sir, is it possible to initialize the Timer1 to a different value say 500 before restarting?

  • @RomanSumyua
    @RomanSumyua 6 ปีที่แล้ว

    love this lesson!

    • @jedi492
      @jedi492 6 ปีที่แล้ว

      Роман Перекрёстов
      Deuteronomio 18:10
      Que no haya en medio de ti nadie que haga pasar a su hijo o a su hija por el fuego; que nadie practique encantamientos o consulte a los astros; que no haya brujos ni hechiceros;
      11 que no se halle a nadie que se dedique a supersticiones o consulte los espíritus; que no se halle ningún adivino o quien pregunte a los muertos.
      12 Porque Yavé aborrece a los que se dedican a todo esto, y los expulsa delante de ti a causa de estas abominaciones.
      Deuteronomy 18:10
      Let there be no one in the midst of you to cause your son or daughter to pass through the fire; let no one practice enchantments or consult the stars; that there be no sorcerers or sorcerers;
      11 that no one is found who engages in superstitions or consult the spirits; that no fortune-teller or anyone who asks the dead be found.
      12 For the Lord hates those who engage in all this, and drives them out before you because of these abominations.

  • @GreenTechValidation
    @GreenTechValidation 5 ปีที่แล้ว

    Hi,I get a problem ,that when you GPSserial.read,how many exacly characters do you read,just one or what?

  • @btomas225
    @btomas225 4 ปีที่แล้ว

    So just to clarify, whilst executing the interrupt and going off to read the GPS, the timer in the Void Loop is still counting down? Correct? It isn't suspended, correct?

  • @michaelpadovani9566
    @michaelpadovani9566 6 ปีที่แล้ว

    Thumbs up, thanks so much for this tutorial. Is there a library or technique to parse or make useful sense of the NMEA sentence/string? Maybe a future video? Thanks again!

    • @paulmcwhorter
      @paulmcwhorter  6 ปีที่แล้ว

      I find it very difficult to parse NEMA sentences in arduino. It is not easy to work with strings. I usually pass the data to a PC or a Rpi, and then parse the sentence in Python, which makes it very easy to work with strings.

    • @michaelpadovani9566
      @michaelpadovani9566 6 ปีที่แล้ว +1

      Paul McWhorter Yes I agree about the parse strings difficulty in Arduino, I'll fwd that work to my RPi! Thanks for the reply, cheers from Maryland.

  • @grantanderson5804
    @grantanderson5804 6 ปีที่แล้ว

    Sir, thank you.
    If you are ever in Maryland, coffee is on me.

  • @codingspace1143
    @codingspace1143 4 ปีที่แล้ว

    Nice video and informative!..my question can I use timer interrupt for two different void function? or just one!

    • @carmoldu
      @carmoldu 4 ปีที่แล้ว

      I don't know thw exact response to your question, but if you can only call one, you could call a function with the interrupt that calls the two functions. In pseudo code:
      Void setup(){
      Interrupt(A)
      }
      void A(){
      B();
      C();
      }
      void B(){
      Your code
      }
      void C(){
      Your other code
      }

  • @silascheeseman4371
    @silascheeseman4371 11 หลายเดือนก่อน

    Excellent tutorial as always. Question... I understand why you interrupt every 1mS, but how did you determine that 1mS was adequate? Can I assume that more than just trial and error is involved?

  • @sanfinity_
    @sanfinity_ 4 ปีที่แล้ว

    Sir can u explain how to use interrupt to control two servo simultaneously

  • @tegarherdantyo113
    @tegarherdantyo113 4 ปีที่แล้ว

    Hello sir i have a question, can we read digital data with HART protocol using arduino? im trying to hooking up a industrial sensor using arduino.

  • @dhruvadityamittal
    @dhruvadityamittal 5 ปีที่แล้ว

    Respected Sir
    I am using interrupts to calculate the rpm of the wheel using hall sensor. I am also taking some input/data in the arduino through another arduino by serial communication through rx/tx pins. The data through rx/tx pins in being displayed but the rpm readings are not shown. The program for rpm runs fine individually without getting rx/tx data.
    Please help me with my problem.
    Thanks

  • @jameshardy2039
    @jameshardy2039 2 ปีที่แล้ว

    I saw the title of this video and thought that this could provide some insight on how to handle this exact problem myself, I am going to multiplex NEMA data. However a couple of things to point out.
    1) Why are you using software serial? Uno supports UART with hardware serial.
    2) You are polling once every second not using interrupts at all. Using an interupt would be the serial port signals it has data, come and get it, you are just checking for data once every second.
    3) 10 seconds is an eternity in the hardware world. At this update rate you could just grab all the data and process it in one iteration, and still be idle 99% of the time.
    4) Not positive about software serial library but Im pretty sure your if( serial.available > 0 ) should be a while( serial.available() > 0 ) otherwise you are just reading one character at a time.
    5) you should use a pointer into string buffer vs copying into a char and then concat . You are burning endless cycles with a needlessly complex data transfer.
    Maybe you could inprove this lesson a bit. I'd love to see how to use actual interrupt code and the use of a ring buffer or ( ? ) to properly handle and parse data. Thanks!

    • @outgoingbot
      @outgoingbot 2 ปีที่แล้ว

      The uno only has 1 uart. Hes using that for the terminal link. This video is not how to solve this. He should use software serial to ftdi to pc terminal. Then hardware serial to GPS. Use hardware interrupts and copy the received byte to a buffer. Also add some logic to the ISR (readGPS) to check for the '
      ' to set a bool flag. The main loop should be fast enough to parse the string when flag is true.
      I believe the serial.available() checks the queue created in the software serial constructor. (It checks if the head and tail are not equal). I assume software serial is using external gpio interrupt to perform a similar function to a uart interrupt. But this has to be more complicated/slower that a RXcomplete register. Regarding While available vs If available, he is only copying one char at a time from the queue to his string using IF. While will will copy the whole queue. This solution is not well developed.
      The reason I'm watching is to know the best practice WHEN/WHERE to parse the string. State machine in the ISR? Main loop check a flag? Something else?

  • @michelmilaneh8963
    @michelmilaneh8963 ปีที่แล้ว

    hello paul i don't see the 2 lines of code that we need to copy from your website , the code on your website only shows the void loop and void readCPS

  • @shehryarabid6736
    @shehryarabid6736 3 ปีที่แล้ว

    Hi,
    Do you have any code for receiving messages and call alerts through phone?

  • @MrX-so4wc
    @MrX-so4wc 6 ปีที่แล้ว

    Hi Paul McWhorter, could you do tutorials on Bluetooth Low Energy (BLE) , such as the nRF8001 Bluetooth LE with the Arduino UNO. I love your tutorials on how to operate the Arduino and hope you do tutorials on BLE because I have been searching videos on BLE and it doesn't have such detailed information unlike your Arduino Tutorials. Hope you could help. Much appreciation. FYI I'm doing a project on BLE with Arduino UNO :)

  • @GMSD-tv6ft
    @GMSD-tv6ft 4 ปีที่แล้ว

    hello dear
    did the normal serial port interrupt the code ?

  • @MrSirPain
    @MrSirPain 2 ปีที่แล้ว

    Can there be more than 1 timer1 interrupt? I need 2 possible 3 timed interupts

  • @andrei2652
    @andrei2652 ปีที่แล้ว

    i have a project to complete for IoT and your videos are the most helpful by far.
    Also i like your channel about God.

  • @FergusonRW55
    @FergusonRW55 2 ปีที่แล้ว

    I'm curious why you did not include the if (c=='
    ') test within the first one in readGPS. The readGPS will always test (c=='
    ') even when (GPSSerial.available()>0) is false and take longer to finish. Did I miss something?

  • @arshadarif2830
    @arshadarif2830 5 ปีที่แล้ว

    Sir why didn't we import the adafruit library for this code?

  • @philchadwick9470
    @philchadwick9470 4 ปีที่แล้ว

    Notice that you 'download' (it's actually the 'upload' button) when you could just 'verify', any particular reason?

  • @amirbahador.developer
    @amirbahador.developer 4 หลายเดือนก่อน

    thank you ❤

  • @nagpranav7813
    @nagpranav7813 6 ปีที่แล้ว +1

    Can you make arduino lessons on vluetoothb controller an wireless modules

  • @Marva123
    @Marva123 5 ปีที่แล้ว

    Could you do a series on ESP32 and BLE?

  • @supreethly3652
    @supreethly3652 5 ปีที่แล้ว

    String GPRMC_ONLY is not getting recognized? any solutions ?

  • @tamerghaly4592
    @tamerghaly4592 ปีที่แล้ว

    I lost tracking you in this lesson, so many new commands, do I have to memorize all these commands ??

  • @ilyashick3178
    @ilyashick3178 4 ปีที่แล้ว

    Paul, Boom !

  • @Syphex7
    @Syphex7 5 ปีที่แล้ว +1

    If the GPS is only sending data every 10 seconds, wouldn't it make sense to attach an interrupt to the RX pin used and then when triggered, read the data every ms until the buffer is cleared and then STOP checking if there's new data until another interrupt is generated by the RX pin?

  • @michaelcostello6991
    @michaelcostello6991 4 ปีที่แล้ว

    Really great lecture and i watched it a second time for better understanding. Would have been nice for some extra info such as
    1)size of arduino serial buffer and size of each sentence, so we have an idea of how many sentences it can hold before overflowing.(perhaps a sketch to aid visualizing this concept)
    2)When we restart Interupt could we start capturing a sentence mid way ?
    3)and my question below of how c='
    ' Is this not two characters and c is only supposed to hold one character at a time ? Bit confusing.

    • @paulmcwhorter
      @paulmcwhorter  4 ปีที่แล้ว +1

      '
      \ acts as one character. It is an invisible end of line character.

  • @andrei2652
    @andrei2652 ปีที่แล้ว

    Thanks!

  • @nirajasanghai9707
    @nirajasanghai9707 3 ปีที่แล้ว

    Hello Sir, Thank you so much for these tutorials and lessons. Those are very helpful. I have learned Arduino from your tutorials and lessons.
    But your website "toptechboy.com" is not getting open. It shows - This site can't be reached. How to go to your website?? Please reply.

    • @paulmcwhorter
      @paulmcwhorter  3 ปีที่แล้ว

      Try again, it is working from here.

  • @Marva123
    @Marva123 5 ปีที่แล้ว +1

    "You gotta be hittin it hard every 10 secs" - Paul McWhorter 2018

  • @TheStevojl3
    @TheStevojl3 2 ปีที่แล้ว

    Hey Paul,
    I'm building an automated hydroponics system in which I want to treat the water every 5 minutes using pH, base, and nutrients if necessary. Could I achieve this using the interrupt, or is that kind of task too time consuming for an interrupt to be used?

    • @paulmcwhorter
      @paulmcwhorter  2 ปีที่แล้ว +1

      Hydroponics is indeed an interesting high tech food production method. I had a really nice hydroponic greenhouse in Texas and grew all our vegetables year round in it. The biggest challenge I see in what you want to do is to get reliable pH readings. I had countless of those little pH digital meters with the little pH reading sensor. Really had trouble getting reliable readings. The sensor needed to be calibrated often, cleaned often, and then would become spoiled fairly frequently. As far as the arduino part goes, I think interupts might be a good way of doing it, otherwise, you are going to lock up the arduino with long delay commands. Good luck.

    • @TheStevojl3
      @TheStevojl3 2 ปีที่แล้ว

      @@paulmcwhorter do you think it’ll be an issue since the interrupt will consist of turning several pumps on and off with delays until the pH and EC are in range?

  • @cristovaonunes4952
    @cristovaonunes4952 5 ปีที่แล้ว

    hello your code is missing some parts at the website

  • @toastrecon
    @toastrecon 3 ปีที่แล้ว

    So, dumb question: let's say that you know that your GPS is transmitting at 9600 baud. 960 bytes per second. The Arduino serial buffer size is 64 bytes. 960/64 = 15, so that thing is going to overflow 15x a second. So, maybe you could put a while loop into your interrupt service routine (ISR) so that every, let's say 1/10th of a second or 100,000 microseconds, you could go down, read that buffer in, and then go back out?. I'm just thinking of a more complicated situation where you were, say, reading an accelerometer to keep a robot balanced or running a telemetry stream as well. You might be able to squeeze a little more performance out of it.

  • @philchadwick9470
    @philchadwick9470 4 ปีที่แล้ว

    Paul Stoffregen! No mention that he's the brains behind the Teensy products?

  • @abdulbasitjavaid
    @abdulbasitjavaid 6 ปีที่แล้ว

    sir make series of lesson on Esp8266/32, LoRa, and orange pi modules

  • @surenbono6063
    @surenbono6063 3 ปีที่แล้ว

    The NMEA did not come with weekday of UTC...found weekday calculator and add to sketch ..finally..awesome..

  • @eddiemccourt4411
    @eddiemccourt4411 2 ปีที่แล้ว

    Thanks

    • @paulmcwhorter
      @paulmcwhorter  2 ปีที่แล้ว

      Wow, thanks, really appreciate that!

  • @liyaqtak
    @liyaqtak 5 ปีที่แล้ว

    how can i make it work every 1 minute? it seems to have a maximum of 10 secs.
    thanks

  • @azmrblack
    @azmrblack 3 ปีที่แล้ว

    I've been told String is a no no in Arduino - it corrupts the heap?

  • @mostafagaberahmed6657
    @mostafagaberahmed6657 9 หลายเดือนก่อน

    thank you for this tips, but butting delay in the loop function not recommended !

  • @edmondedwards6729
    @edmondedwards6729 4 ปีที่แล้ว

    hello, I am learning arduino technology with the intent of driving a piezoelectric stack to investigate the woodward effect (propellantless propulsion) and have a basic question I have yet to see addressed in the many tutorials I have seen on utube....what is the minimum time a PWM pin can be turned on and off ? I need to have microsecond control of the sweep rate between all 6 PWM pins, and so far it looks like a one millisecond sweep rate is the fastest one available with a standard arduino UNO. If a standard arduino is incapable of microsecond outputs, perhaps someone knows of an arduino variation or some other hardware that could do what I want....Any help in this area is most appreciated, thanks

  • @dmhplays
    @dmhplays 4 ปีที่แล้ว

    Your GPS tutorials are great, but my fix light has not come on even once. I hooked up the Uno to a 9V, went outside (my neighborhood is pretty open, it had a 120° FOV at the minimum, and it’s hooked up to 5V, and nothing else. Still haven’t seen a fix light yet. Help?!

    • @paulmcwhorter
      @paulmcwhorter  4 ปีที่แล้ว

      Did you wait 5 minutes? Are you using the Adafruit ultimate gps?

    • @dmhplays
      @dmhplays 4 ปีที่แล้ว

      Paul McWhorter I am using an ultimate GPS v3. I also had a CR1220 button cell lying around, so I put that in there too. What do you mean be waiting 5 minutes?

    • @dmhplays
      @dmhplays 4 ปีที่แล้ว

      I figured it out. I had different baudrates in the Serial monitor and the Arduino. I am getting empty NMEA sentences, I haven’t tried it outside yet. I think it’s good though

  • @JLaurel
    @JLaurel 3 ปีที่แล้ว

    where can i get more info, example, over TimetOne? Things like, Can I use 2 timers (one for gsm and one for gps)? Can I attach more Interrupts?
    Can you point me out to some of your videos where you use TimerOne, to understand better how it works, before i go to watch this series form the beginning?
    For now I wand to use one GPRS Shild and one GPS, later I intend to use one SD card module, I don't have it now.
    What I want to achieve it's an gps tracker, kind of.
    I know how to play with the GPRS Shild. I can read and send SMS, GET and POST HTTPDATA from/to server with AT commands, now i am looking to interfere the two.
    I have no idea where should i start, I do actually have to many ideas...
    ... something like this would work?
    setting up GPRS settings and GPS settings and send necessary AT commands in setup()?
    use 2 SoftwareSerial (gps and gsm) and switch between them with listen()?
    ...
    maybe you can share with us some good starting point in this direction. If it's using TimerOne is better.
    I am beginner in Controllers/Arduino, I have a PHP background and I understand easy.
    Thank you for sharing with us such knowledge.

  • @Kurtacuss
    @Kurtacuss 3 ปีที่แล้ว

    I think I missed somthing here I mean what happen to the kit we got with all those OTHER components we haven't used yet OH !!

  • @fiifinenyi2156
    @fiifinenyi2156 4 ปีที่แล้ว

    what is the function of the flag

  • @Alan-dg6io
    @Alan-dg6io 10 หลายเดือนก่อน

    Why don't you config the Interrupt control register in the Arduino, the Rx buffer received data and send out the RxReady, then MCU will get data from Rx buffer when the RxReady is needed.

  • @sanderromer6490
    @sanderromer6490 4 ปีที่แล้ว

    Why is this NMEA sentence built character for character?

  • @jonamonteroso9600
    @jonamonteroso9600 3 ปีที่แล้ว

    What if i want to display only the latitude and longitude.

  • @michaelcostello6991
    @michaelcostello6991 4 ปีที่แล้ว

    How can c = "
    " Is that not 2 characters. I thought c can only hold one character !! Can you please explain this.

    • @apratube
      @apratube 3 ปีที่แล้ว

      sorry if you know this already..
      is one character.. the \ is an escape character..
      is a carriage return character

  • @JLaurel
    @JLaurel 3 ปีที่แล้ว

    I've got my double coffee. Now, let's see...
    EDIT
    WOW. I did it. I also learned that you can program the GPS module with the Arduino serial.

  • @MPElectronique
    @MPElectronique 5 ปีที่แล้ว

    i LIKE the coffee thingy :)

  • @michaelcostello6991
    @michaelcostello6991 4 ปีที่แล้ว

    9600 baud is 9600 bits/sec or 1sec/9600=.0001 results in 1 bit of serial data every 0.0001 sec. That would be 10 bits of serial data every milli sec. If we are only checking every milli second do we miss the other 9 bits of data ? Please explain as im trying to get my head around this. Thanks very much.

    • @michaelcostello6991
      @michaelcostello6991 4 ปีที่แล้ว

      Or does it grab all 10 bits at the same time every milli second to make up one character ??

    • @michaelcostello6991
      @michaelcostello6991 4 ปีที่แล้ว

      An ISO-8895-1 character in ISO-8859-1 encoding is 8 bits (1 byte) ( Got this on internet just now as im just a hobbyist)

    • @paulmcwhorter
      @paulmcwhorter  4 ปีที่แล้ว +1

      There is a buffer. The data piles up in the buffer, and then we read it all out. When we read the buffer it becomes empty. I do not remember how many bits the buffer holds, but if data is coming in and you do not periodically go over and read it out, it will overfill and data will be lost. But, that is usually not a problem

    • @outgoingbot
      @outgoingbot 3 ปีที่แล้ว

      @@paulmcwhorter I tell you how many bits the recieve buffer holds. 8!
      Yes the UDR0 (usart 0 data register) hold 1 byte! Yet your program was able to print the response strings from the GPS setup commands. This should clearly indicate to you the arduino Serial (hardwareserial class) is doing the ring buffering. That ring buffer is 64bytes. Sorry but this is a poor approach to solving the problem stated. You are basically using a timer to copy stuff from one place in memory (ring buffer) to another place in memory (a string in main)

  • @zhuk462
    @zhuk462 6 ปีที่แล้ว

    it looks like coffee is sugar free ))

    • @paulmcwhorter
      @paulmcwhorter  6 ปีที่แล้ว +2

      Do I look like the kind of man who would put sugar in his coffee . . . I think NOT!

  • @andymouse
    @andymouse 6 ปีที่แล้ว

    I download the zip file to my desktop and then use the "include library" in the Arduino IDE, it then say's include zip and of ya go all done for you...………….Damm fine tutorial's old chap

  • @jmw5233
    @jmw5233 6 ปีที่แล้ว

    "Be patient, be kind", Amen to that.