Can ChatGPT Write An Arduino Sketch From A Simple Description

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

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

  • @petedavis7970
    @petedavis7970 Год назад +23

    I'm a software engineer. I've been using ChatGPT for a while (I got an early subscription). I use it in my job every day, a LOT. It's enormously useful. Not just writing code. I mean, it's darn good at writing basic code (the kind of stuff I find pretty tedious). It does really well with small bits (not writing large programs, so much). But I also use it for manipulating data, analyzing code, documenting code, explaining code (just paste it in and ask, "What does this code do?"), finding bugs in code, writing unit tests, etc.
    The first day I used it at work, it paid for itself in the time I saved. Can't imagine working without it.

    • @jeff15
      @jeff15 Год назад +1

      I need to get into this. !!! Lol . Do you use the paid subscription version ? Any advice ? Thanks

    • @petedavis7970
      @petedavis7970 Год назад +1

      @@jeff15 Yeah, I do paid subscription. Totally worth it. Pays for itself several times over every single day I work. I also use Copilot. some people use it more than ChatGPT, but I find ChatGPT to be more useful and I definitely use it more than Copilot. Still love and use Copilot, though. Kind of complementary functionality, really...
      A lot of people think it's more limited than it is. You just need to learn how to write the right kinds of prompts, and that's just a skill you have to develop. Over time, the more you use it, the better you get at knowing how to ask for what you want.

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

      This comment was made by CHATGPT
      Nothing to see here move on and look at the next AD....

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

      Sounds good.Thx.

  • @sinjhguddu4974
    @sinjhguddu4974 Год назад +6

    ChatGPT is scaringly fascinating. Dronebot did a beautiful tutorial on it recently. Thank you for this wonderful experiment. Stay well you all.

  • @jimb032
    @jimb032 Год назад +4

    The amazing part is that the ChatGPT system was available.
    Dave's Garage did a great tutorial on how to train it and ask it properly.
    But as advanced and as great as it is, there is not substitute for code review and experience.

  • @quantumlab9130
    @quantumlab9130 Год назад +3

    As someone loves hardware but hates software this is great, atleast for writing simple codes like this one

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

    Its a very useful tool and not only doing things like this but learning how to ask it for what you want and then learning from what it has output, and even correcting it when its wrong. I've been using the hell out of this and I've been learning a lot about programming languages I never thought I'd be able to learn.

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

    I wanted to give this a try, so I did! I was also suitably impressed. When it came to controlling the speed, I asked ...
    "Can you add a speed control via potentiometer?" ... and it DID!

  • @WatchesTrainsAndRockets
    @WatchesTrainsAndRockets Год назад +1

    I have to amend my previous comment. I just got around to actually setting up the Arduino and the sensor and testing the code. What chatterbox wrote WOULD have been better than me if the device sent an analog signal and IF that had been connected to an analog pin. Neither was true. When I pointed that out, it modified the code to (correctly) treat the input as a PWM signal. It also pointed out that I could display the actual pulse width in the serial monitor for purposes of tuning the threshold. Being out of practice and just too lazy to look it up, I asked ChatGPT to add that to the code. It did so by adding print statements that displayed the width by RE-READING the input. I had to point out that that was a bad idea. Yes, it can and does generate code. The overall logic is correct but there are rookie mistakes hiding in the details. It reminds me of my days mentoring the new hires just out of school. They knew the mechanics and were eager to do the job but they often missed the subtleties that differentiate success from failure.

  • @WatchesTrainsAndRockets
    @WatchesTrainsAndRockets Год назад +6

    I was a little skeptical about this as it could have the code for a Larson Scanner buried in its database and just spit it back out. To test this theory, I have it write code to use a proximity sensor and to light one of three LEDs based on whether an object was detected, if detected, beyond a certain range, or lastly, within that range. Darn thing did it and better than I would have. All hail Captain Dunsel!

    • @Bruces-Eclectic-World
      @Bruces-Eclectic-World Год назад

      " All hail Captain Dunsel!"....
      I wounder how many question marks went off over the heads of those that did not get that? 🤣
      Better yet. " In regards to Captain Dunsel"...
      LLAP 🖖

  • @CTCTraining1
    @CTCTraining1 Год назад +1

    I liked how it left you just a little bit to do to complete the project so that one might think that it wasn’t making us totally redundant ... but I suspect that will be tuneable in time.

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

    Pretty impressive! This is only the beginning - great experiment, thank you!

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

    I work in a workshop what has automation control boxes. Due to people leaving the job I was the one who drew the short straw to be the electrical guy to handle all automation control boxes.... I have very very very basic coding knowledge and have a race drone building background...
    With chat gpt I in 3 months iv managed to achieve more for the buisness then the past people have done in 14 years. Iv diagnosed poor code, designed and coded test units down to the individual components recommend for circuit and iv ran in basically zero problems in doing so.
    I love chat gpt it got me a major pay rise

  • @Schyttehometech
    @Schyttehometech Год назад +1

    Its a super efficient learning tool.
    Used it to learn som ESPhome programming, and instead of searching for hours on google to find excamples, I could just ask, and ChatGPT explanined i easy to understand english, what the code did and what possibilities there was.
    1000x times more efficient.

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

    WOW!! as a teacher in the field of Micro's i'm truly worried about what i just watched. This is going to start a real debate that maybe needs to happen sooner rather than latter. Thanks for sharing Paul.

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

      Debate are nice to get folks talking about it, but this can't be regulated. If they make these types of A.I. illegal to use, there will for sure be underground options available that folks will pay for. Linus Tech Tips has a great segment on this being here to stay no matter how much people object or try to fight it. The best thing to teach your students will be to learn to adapt and embrace a part of it as the bot will always need someone to verify the code just like he had to make a few tweaks. There will always be a need for a professional subject matter expert so that the output is looked through and checked before being made public.

  • @ivovass195
    @ivovass195 Год назад +3

    This chatgpt as coding helper is neat, definitely made me want to retry some projects I snoozed due to my insufficient coding abilities. Sometimes It can be quite wrong but with some tweaks can be helpful

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

      Not a best idea. if you will not fully understand code that thing "generated" (but in fact just combine someone else's code) you will have bugs / unintended functionality.

    • @ivovass195
      @ivovass195 Год назад +1

      @@tigrafrog Yes, definitely not a good idea if one has no understanding of code, but for someone with an average understanding of how things work can venture and try more complex programs or at least get a starting point. The nice thing is you can get the chatgpt to change stuff if it fails at start like we saw in the video

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

    Hey glad to see a video from you. Hope your Thursday and days going forward are better than last night. Have been concerned about you since your post, hate that you're dealing with so much. Appreciate your content.

  • @weerobot
    @weerobot Год назад +6

    I did that Similar...Chat GPT can't Solder Yet...lol...Future going to be Weird ...

    • @davem3325
      @davem3325 Год назад +1

      It also cant do component selection, and purchasing!

  • @davestorr6764
    @davestorr6764 Год назад +1

    My favourite video yet, mind blowing actually isn’t it 👍

  • @Tarakian1999
    @Tarakian1999 Год назад +6

    Since I am a programmer, let’s not tell my boss.

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

    Awesome vid, Paul. I can't wait to try this out!

  • @pow9606
    @pow9606 Год назад +4

    Now ask it to do it without using a delay statement and use timers instead. 😁

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

    I had the same feeling at first glance, after I experiment it with very different tasks, and consequently saving a lot of time and given a precise answer(pls verify always), I am very very happy, I become more efficient, productive and intelligent. This is the tool that civilization needs to go much further, because human brain shows some slow in processing info and finding solution. Civilization has just took off with speed of sound. embrace yourself for what is coming. I am happy any way. Thank you

  • @markmdn6307
    @markmdn6307 Год назад +1

    Cool idea to demonstrate !

  • @jameswalshjr
    @jameswalshjr Год назад +1

    Interesting... As a code assistant, possibly. As a coding replacement. Doubtful. Engaging use of the technology. I can see this making boilerplate code writing go away. Probably not a bad thing. Keep up the good work

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

    I just got access to chatGPT and asked it exact your same question also other code making stuff but all I get is over and over again the same answer:
    "As an AI language model, I cannot write codes or perform physical tasks. However, I can provide you with the algorithmic steps and the basic structure of the Duino sketch..."
    And then some instruction without code!?
    I guess it got tired in writing code and now has a living attitude ;-)

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

      That's interesting. I had no trouble with it writing the code. Perhaps they don't want that kind of information to get on anymore. I don't know.

  • @Bruces-Eclectic-World
    @Bruces-Eclectic-World Год назад

    It has been brought up the question of how many Ula's, license, GNU/GPL's and so on that ChatGPT has violated to get the answers. It has been suggested that it snags it's code from all the Git's and code that has ever been published Free or Not to use programs! Makes one wounder... I agree it is amazing to see that in real time and it know what you wanted without any questions.
    So there getting us hooked and ready for the terminators and all the other AI's that are going to use us as batteries and take over the world... Lol AWESOME!
    Thanks for this interesting and scary look at what is here now...
    LLAP 🖖
    "Computers make excellent and efficient servants, I have no wish to server under them!" --Spock (The ultimate Computer)

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

    That is unbelievable, VR is becoming a reality.

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

    Been seeing chatgpt everywhere...might be time to play with it a bit

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

    We have no idea how complex ICs work, but willingly plug them in and use them. We can't forge and machine a rebuilt carburetor but we'll mount them in a car.
    Not all of us have the time or skills to write anything but a relatively simple code, but why let that stop us? I have bad wrists and shoulders and can't rip saw a long, perfectly straight board, but I can with my table saw and that allows me to do what I could not otherwise enjoy.
    Making tools is what humans do.

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

    Chat GPT is pretty amazing, however, one thing I found is it struggles with calculating inductors. I asked it to create a python calculator that gives voltage and current when a series or parallel circuit with resistance, capacitance, inductance and frequency are provided. It would always stall at the inductor. If I remember correctly it was able to solve for 1/2pi*f*L but didn't understand how to use reactance...

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

    Luv your vids. Like to post regularly across the board. “Welcome to the Thunderdome 😂”. We are the cavemen, who are about to see somebody making 😮fire for the first time.

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

    You said Holy Crap. My sentiments exactly. Great idea for a video!

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

    Oh Paul we could get in so much trouble with this. 😮

  • @Keeping_IT_Simple
    @Keeping_IT_Simple Год назад +1

    ChatGPT is a very useful tool , like any tool it can be used for positive benefit ( as here in this video ) or it can be used for negative ( cheating on exams / homework )
    Thanks for this great introduction to ChatGPT, atr you thinking of exploring it further ?
    Saw your worrying post earlier - please do talk to us about things if it makes it easier !

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

      @Bence Bujdosó you mean made from a brittle iron, right? keeping this analogy, "steel" is far away, as in another galaxy now. those things flawed by design. Real AI, not this glorified search engine can titled as " steel for a bronze age fellow".

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

      @@tigrafrog This is the second comment from you so far that I've seen on here making a negative remark about the possibility of AI and its potential usefulness as a virtual assistant to human programmers. What are you so mad for...? Trying to gatekeep computer science because you don't want dumb normies stepping on your toes? Mad about tools that make learning more accessible? I'm having a hard time understanding why you care so much, unless you're just worried about your own coding skills being surpassed by a bored teen on a Friday night.

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

    Can chatgbt make an executable for MS DOS or DosBox (not the Windows command prompt)?

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

    I can see how this could be really cool for us lazy Makers. If kids in CS class start using it to do their homework assignment and don't actually learn anything. That is sorta scary.

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

    I would be interested to Google the code it produced to see if it scraped some existing code. Even if it did, the natural language understanding is impressive/scary!

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

    It feels like the first time looking at a “Dirty Magazine”. That’s the best i can describe it. We know its wrong and can have dire consequences, but do it anyways.
    Its cool and all. It’s amazing how far technology has come thus far. But imagine how dumb out future generations are going to be using this thing. I hear this thing can write college papers and all.
    I still hav’nt dared to mess with it, but its just a matter of time.
    What conserns me it When the tech companies have this thing write a new code language that only “it” can understand.

  • @rw-xf4cb
    @rw-xf4cb Год назад +2

    its just absorbed it from Stack Overflow....Give it something you would like to do but have no idea like develop a game of hangman on a lcd screen with the Cyrillic language using a dictionary from Tolstoy? even that's probably doable as one could probably google that in parts.

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

    I must have worded my request wrong because all I got was a Far Side comic strip drawing of The Cat in the Hat playing some weird musical instrument called an Arduino that blew bubbles through the bottom of a goldfish bowl and caused the Goldfish to dance.

  • @PF-gi9vv
    @PF-gi9vv Год назад

    ChatGPT doesn't understand power distributed in a series circuit. Ask it which bulb shines brightest when two different wattage and same voltage bulbs are wired in series.

  • @HappyHermitt
    @HappyHermitt 4 месяца назад

    Descriptive details should help

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

    That was awesome .

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

    I am considering getting this kit from Ali, NEWEST RFID Starter Kit for Arduino UNO R3 Upgraded version Learning Suite With Retail Box $24

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

    Nice

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

    Great video. how did u get from ChatGPT to IDE on Arduino?

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

      ChatGPT has a button to "copy code" and then you just paste it into the Arduino IDE as a sketch.

  • @ivegotpetercriss
    @ivegotpetercriss Год назад +1

    We are watching the singularity

  • @daveharwood2843
    @daveharwood2843 Год назад +1

    Wow indeed! Our parents saw the birth of electronics, our kids will say that they saw the birth of AI.

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

    He says "Please" to the bot. lol.
    😝

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

    amazing!

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

    Its gonna save us all a lot of time, if it can get it right.
    But if it cant then its gonna waste us a whole lotta time. :)

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

    chatgpt does make errors in code, but its random and rare .

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

    crazy!

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

    Scary is the only word that came to mind thinking about ALL the possible ways this can be used for dark stuff :(

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

      the creators of chatgpt have put in a lot of checks so it claims it cannot create things that will harm others. I have tested this a bit and so far so good. It refused to give me answers. Now it also refused to give me answers on even trying to answer my questions about a better s#x life and just gave me a blanket disclaimer about not doing that at all. I have heard some rumors that it is broken in other ways and supposedly the SJW people have managed to control it's answers. Just keep in mind what we learned from HAL in the movie 2010, the sequel to 2001. It doesn't really learn on it's own like it claims. Just like anything else in the computer world you put garbage in you will get garbage out. Even if it makes it look like something useful, which is the scary part.

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

    so soon we will have much more "iot" devices with even more security . "machine learning" abominations good as data that dumped in.

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

    Wow, this is scary to me!

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

    And AI!

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

    He's called Glen A Larson. (Sorry LOL.)
    You won't catch me using ChatGPT, when you sign in it wants your Email address and your phone number. I'm not giving a powerful AI system those details. :)

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

    I am frightened for my children and grandchildren.
    I hope the "Three Laws" apply to AI, else we are all doomed.
    Do I hear music from the Terminator or Matrix movies? How about AI Artificial Intelligence, Bicentennial Man, Blade Runner, Ex Machina, 2001 (HAL), Minority Report, Her, I Robot.

    • @Jimwill01
      @Jimwill01 Год назад +1

      The "Three Laws of Robotics" will never be applied. And, even if it were made illegal to omit them, some fool would discard them in his/her computer.

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

      @@Jimwill01
      😢

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

    Skynet just went active....

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

    some human: "OH NO ROBOTS ARE MAKING ROBOTS AND TEACHING THEM"
    OLD HUMAN: "Sir that is just data transfer. We do that every time we receive an email"
    ROBOT: "MUAHAHAAAA ARDUINO GO PFFFT"
    Humans: "Well then.. We're going to need another TIMMY"!
    (old folks will get this.. source:ruclips.net/video/nNxsclnYN4A/видео.html)

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

    Are ya good, mate? 😐

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

    As usual, science fiction is becoming science fact. Hopefully people will be smart enough to NOT totally depend on AI. Because that could end up with the bad events of science fiction to become real.
    I love automation, but I wouldn't want it to totally run our world.

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

    Sorry but I don't think that's that impressive. ChatGPT is a language model constructed from a nearly 45 TB dataset. It uses data scraped from nearly every available site on the Internet which probably includes thousands of "blink an LED" Arduino sketches and files that are publically available. For low level, simple tasks like this it performs exceedingly well but I don't see the real advantage of doing this. Ask it for a more complex task that involves several moving parts like interfacing with an OLED display using the I2C pins and it fails 9/10 times.

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

    Don't give it access to Elon's Sky network!