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

Поделиться
HTML-код
  • Опубликовано: 26 окт 2024

Комментарии • 141

  • @jeffmahoney1271
    @jeffmahoney1271 Год назад +2

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

  • @GarretsonIndustries
    @GarretsonIndustries 3 месяца назад

    You have a video for literally everything I want to do with arduino. You're a godsend!

  • @riyadzahdour1302
    @riyadzahdour1302 4 года назад +15

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

  • @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.. :)

  • @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!!!

  • @haozhe3237
    @haozhe3237 5 лет назад +7

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

  • @springbok4015
    @springbok4015 6 лет назад +18

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

  • @jameshardy2039
    @jameshardy2039 2 года назад +1

    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?

    • @rupeshkadam7600
      @rupeshkadam7600 Месяц назад

      Hey man, @jameshardy2039 Hope you have completed the task above mentioned by now. Can you please share your code/solution here? It would help us to understand how to tackle such problems efficiently.

  • @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 3 года назад +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.

  • @danmyself5341
    @danmyself5341 3 года назад

    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

  • @osazeimhontu3239
    @osazeimhontu3239 6 лет назад +1

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

  • @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.

  • @sameerk12982
    @sameerk12982 4 года назад

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

  • @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 ???

  • @niceday2015
    @niceday2015 2 года назад

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

  • @alejandroperez5368
    @alejandroperez5368 6 лет назад +2

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

  • @andrei2652
    @andrei2652 2 года назад

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

  • @asarebaahdaniel5236
    @asarebaahdaniel5236 5 лет назад

    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

  • @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.

  • @TechnoAutomation
    @TechnoAutomation 6 лет назад

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

  • @marekczarnecki6714
    @marekczarnecki6714 5 лет назад

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

  • @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.

  • @kavindugilshan
    @kavindugilshan 6 лет назад

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

  • @barunbasnet
    @barunbasnet 4 года назад

    Thankyou for your excellent information.

  • @mohananchan
    @mohananchan 2 года назад +1

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

  • @DRACOBUCIO
    @DRACOBUCIO 5 лет назад

    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

  • @doubleHLabs
    @doubleHLabs 6 лет назад

    great stuff, love the advance stuff

  • @juliorrsantos
    @juliorrsantos 5 лет назад

    Great video! Thank you very much!

  • @sudiptamandal935
    @sudiptamandal935 4 года назад

    Thank you sir , you make my day 🤗

  • @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☺️

  • @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.

  • @nipunaupeksha
    @nipunaupeksha 5 лет назад

    Thank you sir. Really helped me.

  • @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.
      ruclips.net/video/NZ9Nw9T85wA/видео.html

  • @electronicsexplained287
    @electronicsexplained287 6 лет назад +1

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

  • @ahmedmaher-ez9xt
    @ahmedmaher-ez9xt 3 года назад

    thanks for this amazing info

  • @Marva123
    @Marva123 6 лет назад +1

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

  • @silascheeseman4371
    @silascheeseman4371 Год назад

    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?

  • @grantanderson5804
    @grantanderson5804 6 лет назад

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

  • @neilorme316
    @neilorme316 5 лет назад +1

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

  • @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?

  • @carmoldu
    @carmoldu 5 лет назад +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?

  • @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

  • @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.

  • @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.

  • @sefenaymn308
    @sefenaymn308 3 года назад

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

  • @michelmilaneh8963
    @michelmilaneh8963 2 года назад

    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

  • @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?

  • @philchadwick9470
    @philchadwick9470 4 года назад

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

  • @ReckItRob
    @ReckItRob 6 лет назад

    Thank you for this

  • @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.

  • @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.

  • @tamerghaly4592
    @tamerghaly4592 Год назад

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

  • @michael3881
    @michael3881 4 года назад

    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?

  • @Alan-dg6io
    @Alan-dg6io Год назад

    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.

  • @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?

  • @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 :)

  • @mostafagaberahmed6657
    @mostafagaberahmed6657 Год назад

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

  • @MuhammadHassaanBinTanveer
    @MuhammadHassaanBinTanveer 5 лет назад

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

  • @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

  • @codingspace1143
    @codingspace1143 5 лет назад

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

    • @carmoldu
      @carmoldu 5 лет назад

      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
      }

  • @amirbahador.developer
    @amirbahador.developer 9 месяцев назад

    thank you ❤

  • @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.

  • @sanfinity_
    @sanfinity_ 4 года назад

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

  • @Venky5211
    @Venky5211 2 года назад

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

  • @TheStevojl3
    @TheStevojl3 3 года назад

    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  3 года назад +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 3 года назад

      @@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?

  • @shehryarabid6736
    @shehryarabid6736 3 года назад

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

  • @more_u-listen_more_u_love9543
    @more_u-listen_more_u_love9543 6 лет назад

    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?

  • @GreenTechValidation
    @GreenTechValidation 5 лет назад

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

  • @vishalmehta3636
    @vishalmehta3636 6 лет назад

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

  • @azmrblack
    @azmrblack 3 года назад

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

  • @philchadwick9470
    @philchadwick9470 4 года назад

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

  • @surenbono6063
    @surenbono6063 4 года назад

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

  • @MrSirPain
    @MrSirPain 2 года назад

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

  • @tegarherdantyo113
    @tegarherdantyo113 5 лет назад

    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.

  • @abdulbasitjavaid
    @abdulbasitjavaid 6 лет назад

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

  • @andrei2652
    @andrei2652 2 года назад

    Thanks!

  • @ilyashick3178
    @ilyashick3178 5 лет назад

    Paul, Boom !

  • @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

  • @arshadarif2830
    @arshadarif2830 6 лет назад

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

  • @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.

  • @eddiemccourt4411
    @eddiemccourt4411 2 года назад

    Thanks

    • @paulmcwhorter
      @paulmcwhorter  2 года назад

      Wow, thanks, really appreciate that!

  • @GMSD-tv6ft
    @GMSD-tv6ft 4 года назад

    hello dear
    did the normal serial port interrupt the code ?

  • @nagpranav7813
    @nagpranav7813 6 лет назад +1

    Can you make arduino lessons on vluetoothb controller an wireless modules

  • @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.

  • @Marva123
    @Marva123 6 лет назад

    Could you do a series on ESP32 and BLE?

  • @Kurtacuss
    @Kurtacuss 4 года назад

    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 !!

  • @deterugweg9994
    @deterugweg9994 6 лет назад +2

    This solution will not always work. The interupt has nothing to do with the solution you use. You slow down the number of transmits to once every 10 second, and you simplfy the content. This is not always posible. It depents on the addon that is used. It is chance the GPS has that option. It is not a standard requirement to serial communication protocols. And there is a much more easy way to get the same result that actually will work with every good addon. just slowdown the serial speed to lets say 300bps or less. If you do that you make it the problem of the addon to handle the buffering. If it is any good it will do that. So keep all original code the same and just throttle the communication to a very low speed. one line will do it. But that will, like the solution in this video, be a very buggy solution. It is based on timing and not on solid code. If you extend the code later on you can get timing problems you don't understand. Try to read something about UDP and package loss and code that just makes sure it has a complete message and than proces that message while at the same time ignore the new data and accept during this time package loss. Your design pattern is something between polling, throttling and hoping for the best.

  • @supreethly3652
    @supreethly3652 5 лет назад

    String GPRMC_ONLY is not getting recognized? any solutions ?

  • @cristovaonunes4952
    @cristovaonunes4952 5 лет назад

    hello your code is missing some parts at the website

  • @erikburman530
    @erikburman530 2 года назад

    I've got all the hardware you used, but the code just fails to provide GPS data. I can't for the life of me understand why it's not working. I wish you had gone back and updated your toptechboy webpage to show the entire code. I think I've got it right so maybe something has changed in the Arduino IDE over the last 4.5 years? I know my Adafruit GPS module is working because their code is running perfectly. I'm a bit disappointed.

  • @liyaqtak
    @liyaqtak 6 лет назад

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

  • @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

  • @jmw5233
    @jmw5233 6 лет назад

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

  • @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

  • @sanderromer6490
    @sanderromer6490 5 лет назад

    Why is this NMEA sentence built character for character?

  • @erikburman530
    @erikburman530 2 года назад

    I figured out the problem. In void readGPS() for some reason if(c=='"
    ") double quote doesn't work but if(c=='
    ') single quote does. Go figure.

    • @paulmcwhorter
      @paulmcwhorter  2 года назад +2

      " in arduino is for a String, or string of characters. It sees "
      " as two character. The ' in arduino is for single characters. It sees '
      ' as the single character, Carriage Return.

  • @ronjones4069
    @ronjones4069 4 года назад

    I thought delay() would not work if you enable interrupts [attachInterrupt()]

  • @jonamonteroso9600
    @jonamonteroso9600 3 года назад

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