ChatGPT absolutely DOMINATES Arduino programming

Поділитися
Вставка
  • Опубліковано 25 жов 2024

КОМЕНТАРІ • 298

  • @dont-want-no-wrench
    @dont-want-no-wrench Рік тому +416

    it gives you code that it is very confident about, which often doesnt work, and sometimes it just stops in mid response. a useful tool but it has to be watched very closely- like a junior employee who thinks too much of his abilities.

    • @Hanqaqa
      @Hanqaqa  Рік тому +37

      Good one! I think calling it a Junior employee is the most fitting description for the AI! At least while coding for embedded applications.

    • @lptf5441
      @lptf5441 Рік тому +17

      It is still new. The thing about AI is that it evolves incredibly quickly, and continues to grow and expand all the time.

    • @sparrow2255
      @sparrow2255 Рік тому +36

      when it stops, just ask it to continue. It's limited to the number of tokens it creates for each response.

    • @seancollins9745
      @seancollins9745 Рік тому +7

      the AI is not confident, I've spent considerable time working with it. It sees many ways to do things, the best thing to do is work on small portions of logic. it is also very good for generating boilerplate, and boilerplate sucks to write

    • @marmont8005
      @marmont8005 Рік тому +2

      You can instruct the chatbot to start answering at a certain point and get a long answer. Either you give the entire previous answer and say "continue from here" or you give the last few lines.

  • @JoelCook
    @JoelCook Рік тому +102

    One key benefit I think your missing off chat gpt is the ability to have it refine things. So when you are missing a library just say something like "it looks like the library for... was not included" and 9 times out of 10 it will either give you the snippet of code or include the library. Involving chat get in the troubleshooting is half the beauty of it. It knows the exact context of your query so it's usually faster and getting you the correct answer then a Google search... unless it a decides to spout a bunch of nonsense. In which case it is usually still faster to guide it to the correct answer out just use the try again button to have it try something slightly different.

    • @tortysoft
      @tortysoft Рік тому +1

      I found this too. It even knows the different solutions for different development environments !

  • @yyyy-uv3po
    @yyyy-uv3po Рік тому +34

    The most impressive thing in this video is how powerful and convenient these Arduino libraries are!

    • @TheCatherineCC
      @TheCatherineCC Рік тому +1

      It's really impressive. Almost all the work is done for you if you want to make a project using standard components.

    • @drumbum7999
      @drumbum7999 Рік тому +2

      @@TheCatherineCC the only downside to the libraries is that it makes it *too* easy and you don't have to struggle to learn the hard way which creates more neural pathways in your brain and basically makes you smarter.

    • @TheCatherineCC
      @TheCatherineCC Рік тому +4

      @@drumbum7999 I suspect it's balanced out by the fact that someone new to this all can buy a $3 part off aliexpress that is fairly well documented and get things working in a fairly short amount of time, becoming passionate about coding and hardware.
      It's not like 30 years ago where you had to spend some seriously frustrating time to get something stupid like a LCD screen working.
      Not everyone is going to code firmware, but someone with "the bug" is far more likely to.
      If a million monkeys will eventually write shakespeare, a million people playing with $3 ESP32s will make some cool shit too.
      But yes, it feels way too easy in some ways.
      After a long break, I got into writing actual code again playing with these things, and it's sooooo much easier.
      IDEs don't suck, it seems literally everything is just on github, people are actually documenting their code making it easier for others to understand and build off it.
      It really feels like a generational leap forward happened and society didn't realize it.

    • @helix8847
      @helix8847 Рік тому

      @@TheCatherineCC That's because most of the code for "standard components" is already out there on the internet and has been asked a million times. :)

  • @DEtchells
    @DEtchells Рік тому +56

    Great video! As a hobbyist, having an “assistant” to deal with all the minutiae of connecting to a new sensor or display, or to just take the tedium out of making a UI frees up so much of my time and brainpower for actually making cool stuff instead of figuring out how to cajole the system into doing what I want. In that context, I don’t feel “obsoleted”, but rather enabled; it’s just a higher level of programming; the programming language has become conversational, iterative English. This is gonna be *so* great! 👍😃
    I bet it would also be very helpful in debugging programs too: Give it the program, explain the problem, and ask it for the solution. That’d be interesting to see a video on as well.
    (Next step, use the speech-to-text function on your computer to feed it input. I can see a day (very soon) when we can work with it all the way into even hardware debugging, probing a circuit and telling it what we find, so it can suggest the next thing to test in the debug tree :-)

    • @cyberyogicowindler2448
      @cyberyogicowindler2448 Рік тому +3

      Beware. "Creative" AIs tend to cheat and imagine nonsense when they don't know the answer, and possibly not even notice that they lie (because the output is assembled from guesswork based on correlations of things it read elsewhere). So it is not like asking a teacher, but more like asking a semi-educated imposter.

    • @locowachipanga561
      @locowachipanga561 Рік тому

      I love the word minutiae thanks for using it, didn't know it existed in english.

    • @robotchickenworkshop
      @robotchickenworkshop Рік тому

      Spot on!

  • @RufusVidS
    @RufusVidS Рік тому +3

    The successive refinement is really something. If you generated Blinky, for instance, you can follow it up with: "Change the LED to pin 0" And it knows the prior conversation and improves on the result.

  • @TraderRoWi
    @TraderRoWi Рік тому +22

    There is a limit for the length of the response. But you can type continue and it will finish the code. Also when you got the ADC DAC overflow, you could explain your issue and it will correct most likely. You can also paste your code and ask for help. In the video you asked for Arduino code, my guess is it would help if you specify the model.

  • @satori_mountian_station
    @satori_mountian_station Рік тому +10

    This is blowing my brain in half.. As someone that just needs to program servos and motors.. it's like talking directly to the machine..

    • @zibbezabba2491
      @zibbezabba2491 Рік тому +5

      I got it to program connect 4 in python. I simply explained the rules of the game, how many spaces on the board, that it was a two player game, that you need to connect 4 in a row in any direction to win. It worked first time. There were a few problems with the way the x, y coords were set up and it had to be told A-G and 1-8 for matrix references, It had set them up as 1-8 and 1-6 but that was confusing. A couple of sentences and a few nudges in plain old English and there it was. It blew my mind too. It still needs some tweaking though, it can waste a lot of your time if you make your program longer that say 1kb in size.

  • @JohnDuthie
    @JohnDuthie Рік тому +10

    This is amazing! The skill of knowing what to ask is also very important tho I think I'd have trouble describing what I need.

  • @Derek_Read
    @Derek_Read Рік тому +2

    I'm blown away by this. I tried this prompt "write a program for arduino for a calculator with 16 buttons and an LCD display" and it created the first part of the program to the point where number buttons basically function with the LCD (and that's it). I prompted it again: "please add buttons for addition, subtraction, division and multiplication" and it tried but came up short (adding some code that multiplies one number by 10. I'd say at least half of it is written though. At this point it seems to be a great shortcut to come up with snippets or examples for specific functionality that I might then include in a larger program. Very cool.

    • @Derek_Read
      @Derek_Read Рік тому

      A bit more info: because I said 16 button calculator, it assumed a 4x4 button layout (logical) and laid the button code out so that it would actually look like a standard layout (of some sort). Amazing.

  • @kornydad14
    @kornydad14 Рік тому +3

    Cool video! From what I have read, the AI response is limited to 4000 "tokens" which are sort of like words, so asking it to play a song it will try to code the whole song and freeze once it hits its limit. If you ask it to play 10 seconds of a song instead, it will probably produce the code just fine. Very cool that you tried this and it worked! I struggle with Arduino code at times. Especially for the the seldom used modules that do not have a lot of examples online.

  • @DrFiero
    @DrFiero Рік тому +7

    I was playing with this last night, and even telling GPT to integrate an Arduino with an automotive transmission (!!) it got it largely right! If nothing, it saved me hours of work by giving me a framework to start from, and I can just tweak it instead of starting from scratch. Boy am I glad I'm retiring shortly and don't have to worry so much about being put out of work by this.

    • @salehalsheikh1586
      @salehalsheikh1586 Рік тому

      I mean, for those who are far from retirement; what do yo advice, is there a tech path they can follow, we in the IT world are used to learning new things, not happy about it mind you : ), but we understand; so is there anything you could advice, would be greatly appreciated.

    • @DrFiero
      @DrFiero Рік тому +2

      @@salehalsheikh1586 - invest a small amount (if you're still young enough!) every month into a dividend yielding {something} that is within a TFSA. Compound growth.

    • @ohhmanitscam
      @ohhmanitscam Рік тому

      @@salehalsheikh1586 Also remember, these same "obsolete" fears occured with almost every technological innovation. There's a huge shortage of engineers and neat deep learning tools aren't going to remove that need, the world of engineering is far too complex

    • @groundhog4408
      @groundhog4408 Рік тому

      @@ohhmanitscam that sounded like an ai response XD

    • @ohhmanitscam
      @ohhmanitscam Рік тому

      @@groundhog4408 lmaooo i am both offended and flattered 🤣 funnily my lecturer asked me if I had used ChatGPT in an interim report i submit bc of "lots of big words stringed together"
      BRO this report is 30% of 25% of my final year i went over every word about 100 times optimising them since you are allowed like a couple sentences per headline 🤣

  • @Haldi4803
    @Haldi4803 Рік тому +2

    The only Thing that absolutely dominates is your talent in writing UA-cam titles!

  • @yvesinformel221
    @yvesinformel221 Рік тому +3

    I did one search on ChatGPT and now it's everywhere in my UA-cam
    I'm going to try that for sure

    • @Hanqaqa
      @Hanqaqa  Рік тому +3

      The amount of content that ChatGPT is producing for youtube must be huge!

  • @quielsystems
    @quielsystems Рік тому

    Why are you not getting much engagement I mean these kind of content must get more engagement than showbiz gossips here in UA-cam?

  • @ZukunftBilden
    @ZukunftBilden Рік тому +5

    If it stops mid response you can tell it to kep going. Or go on. Or keep writing. One of those seem to work. Sometimes also pasting in the last few lines of code/text it wrote will help too and it will complete it.

  • @kikihun9726
    @kikihun9726 Рік тому +7

    I tried with esp32.
    I asked for a code to read from ina sensor and send the values to a tcp request.
    Works like a charm without thinking.

  • @lordkylo
    @lordkylo Рік тому +8

    I'm glad I found a community of people already doing this here on this video because I did this project 3 weeks ago where I had Chad GPT create a website with HTML and make buttons that controlled in Arduino servo motor through a serial connection. I then put the website into an augmented reality environment and now you can use AR to control a microcontroller in the real world. It's literally building the bridge between digital and physical.

    • @wifiguy_nz
      @wifiguy_nz Рік тому +3

      Would like to see that as a video.

    • @TqSNv9R0iG5Ckxew
      @TqSNv9R0iG5Ckxew Рік тому +1

      Please post a video and I will be your first viewer. Sounds amazing!

    • @lordkylo
      @lordkylo Рік тому +1

      I plan to share it! I still have a few kinks to figure out: 1. My browser is showing up as transparent in my AR environment. I see it loaded in the environment but it's not showing opaque it's see-through basically. Then 2. My old laptop has a bad ethernet connection port. I'm getting myself a new laptop soon. Once I get past this issue I'll definitely be making a video and posting the link here

    • @Armored_22
      @Armored_22 Рік тому

      @@lordkylo Did you ask ChatGPT to help you with your first problem?

  • @australianoz
    @australianoz Рік тому +1

    My God, i just tried it to generate a blink code on and STM32...and it work wonders... i can see how this will speed my coding in the very near future. Thanx Hanqaqa for this.

  • @64-Bit_Dragon
    @64-Bit_Dragon Рік тому +3

    I had it write an asynchronous webserver for esp32 including spiffs for saving and retrieving files. Had to do almost no cleanup and used more efficient code than what you would get compared to the examples when looking up things like "async webserver esp32" on search engines.

  • @dearjulio
    @dearjulio Рік тому +3

    Great video! Didnt know ChatGPT could do this as well 🤯

  • @rekim
    @rekim Рік тому +2

    So a text parser to C code translator. Did that for Baxter in the 90's. For analyzing blood. It was a translator, shy of a full compiler.

  • @zadintuvas1
    @zadintuvas1 Рік тому +14

    Try writing "continue" if AI does not finish the text, because it's too large. Also you can try asking it to modify code like to fix things you have noticed not working correctly in your potentiometer case.

    • @nutbastard
      @nutbastard Рік тому

      Yep. For longer stuff if I want to avoid it stalling out (I've only had intermittent success asking cGPT to 'continue') I just tell it to write in a compact style, use random 3 character variables only, and omit all comments. A bit of a headache to debug if it fails, BUT 99% of the time in that situation you can just explain the issue and it'll get fixed.

  • @callumrock6797
    @callumrock6797 Рік тому +2

    best way to see it is coders just got promoted to more of a manager type position of directions and corrections than just grinding out scripts all-day
    edit: its equivalent to when the printing press was invented but for scripting

  • @aaronkalahar-_-_-
    @aaronkalahar-_-_- Рік тому +4

    Great video man! Greetings from Minnesota. ❄️

    • @Hanqaqa
      @Hanqaqa  Рік тому +2

      Thanks man! I plan to make a similar video on ESP32 this week!

    • @aaronkalahar-_-_-
      @aaronkalahar-_-_- Рік тому

      @@Hanqaqa Very cool!
      What are your thoughts on the 1602 LCD Keypad Shield?

    • @Hanqaqa
      @Hanqaqa  Рік тому +2

      @@aaronkalahar-_-_- I had that shield years ago, but ended up throwing it away.
      For me it isn't useful to have the LCD always on top of the Arduino, sometimes I want the LCD screen a bit further or at an angle. So nowadays I simply use the regular LCD 16x2 screen with a i2c connection. That way I use less cables and can place the screen at different positions.
      I didn't like the limitation of having the screen always on top of an Arduino Uno.

    • @aaronkalahar-_-_-
      @aaronkalahar-_-_- Рік тому

      @@Hanqaqa I just got mine in the mail. I see what you mean by the limitation.
      I’m just starting so I thought it’d be worth a shot!

    • @Hanqaqa
      @Hanqaqa  Рік тому +1

      @@aaronkalahar-_-_- yeah if you are just starting. Then a shield is a great option because connecting everything is much easier!
      Good luck with the shield!

  • @davidswearingen7571
    @davidswearingen7571 Рік тому +2

    you can ask it to get the *current* temperature in Spain and it will write code that uses OpenWeatherMap. that's another impressive level of capability

  • @Armored_22
    @Armored_22 Рік тому +1

    When ChatGPT hangs due to the length of its response, simply use clever ways to get around this. Such as asking it to write a short version of the song, ask it code in sections, such as write me a code that does this, add to the code so it does this etc... If you are someone who is naturally really good for example at finding exact search results due to your ability to not only ask the correct questions but to ask them in the correct ways.

  • @MG-cy7vx
    @MG-cy7vx Рік тому

    It works very well since you know what to ask exactly
    This is what we call experience, knowing what to lookup exactly.
    When you have a bug in an application, as an experienced developer, you don’t just look for things randomly, but you think about all the ways it can go wrong (network, database, limits…) a junior thinks directly on the code.
    This is the difference with ChatGPT. It will not answer things that aren’t asked for exactly how to be answered

  • @gregortidholm
    @gregortidholm Рік тому

    Very nicely done video. Straight to the point and the overlay of the code and execution were great to understand what happened! Thank you so much for sharing this

  • @jeffjefferson2676
    @jeffjefferson2676 Рік тому +1

    I still need to make a program for Arduino for a thermocouple and a solidstate relay. I need to have the temperature go up, stay on a temperature level, and then after some time ramp up again. The challenge probably would be to write down what i want in such a way that the openai program gets what i want to have.
    I will give it a try later this year.
    Greetings,
    Jeff

  • @sandrainthesky1011
    @sandrainthesky1011 Рік тому

    Wow! This has such huge potential! Especially to derive methods within a program and quickly test theories, which is very time consuming.
    I have written huge programs that are complex and even filled a mega2560 to the point I had to modify the boot to get that last 4k access, and size is a huge factor so finding compact code is paramount.
    Looking forward to trying this out! Thanks for the preview!

  • @ET_AYY_LMAO
    @ET_AYY_LMAO Рік тому +4

    I had a personal project that has just been sat on my desk for months, because I couldnt deal with the context switching of getting back into arduino after being away from the platform for so many years and working mostly in web development these days. ChatGPT wrote a sound foundation for my firmware in a manner of minutes of chatting with it, I let it put in some placeholder functions for things because I felt it would be easier to just make some parts myself after all. But it can do a lot of things, if you specify what you are dealing with exactly it usually already knows the datasheet :D I kinda want to see what ChatGPT can do with git access. Imagine if you could just create tickets in JIRA like you do with everything else and then the bot would take things it had a good confidence in solving, amazing times and troublesome at the same time.

  • @pabloqp7929
    @pabloqp7929 Рік тому

    Happy 2023 - saludos desde España!

  • @PterippiGaming
    @PterippiGaming Рік тому +3

    It is interesting that people keep feeding "produce code" requests into a black box tool which was trained on unknown dataset completely ignoring the fair warning of not running the code you do not understand completely. I wonder when will be the first public case of "ChatGPT produced JS code whacked by browser and stole my money"

    • @nutbastard
      @nutbastard Рік тому

      It won't even provide examples of a fork bomb. I could probably convince it to by avoiding asking for it by name, but it just yelled at me for asking for a fork bomb so I'm not going to push my luck.

  • @adriaanb7371
    @adriaanb7371 Рік тому +1

    when you ask for a very similar thing again it can assume the first wasn't ok and it can go off on a tangent. Best is to start a new chat because it keeps in mind everything that came before. It also has a max tokens output so sometimes you need to divide an assignment in steps and then ask for the steps separately.

    • @tristin5723
      @tristin5723 Рік тому +1

      I normally ask for a tutorial style, and a list of each step. That way I can ask it to go to each step.

  • @FuZZbaLLbee
    @FuZZbaLLbee Рік тому +1

    Used it last week to create a midi note converter. It gave me at least 80% of the eventual code that I used

    • @nutbastard
      @nutbastard Рік тому

      Word. It's the difference between planting some trees and smelting some iron to make an axe... or just going to the lumber yard / hardware store.

  • @fjalarsigurdarson4862
    @fjalarsigurdarson4862 Рік тому

    It has literally saved me hours doing arduino code

  • @Joshuatreelocal
    @Joshuatreelocal Рік тому

    Great video! Can’t wait to use this info

  • @666aron
    @666aron Рік тому +12

    I've tried it for signal processing in python. The basic FIR/IIR scripts worked, but EMD, PCA/ICA, Hilbert-Huang transform and wavelet transforms were all bugged. Dimensional mismatches, data type incompatibility or just plain unfinished code mid work. It's still a long way to be usable for anything more than the most basic things in my eyes. Maybe it will be better.

    • @poro167
      @poro167 Рік тому

      There is a word limit for answers, if you type continue, it will complete the answer

    • @julianbinder2371
      @julianbinder2371 Рік тому +1

      the thing it struggles with isn't difficulty but stuff that is uncommon, not many people do signal processing in python I assume so it doesn't have a big dataset to learn from

  • @tortysoft
    @tortysoft Рік тому +1

    In my experience ( about one day ) the AI needs America to be asleep, otherwise it stops part way through a output process. Same thing durning USA night time, Day in the UK - it works.
    Also, you can say - continue output from ... whatever the last line shown was, it apologises for stopping and gives you the rest of the code. Impressive !

    • @Hanqaqa
      @Hanqaqa  Рік тому +2

      I have noticed that too. During the morning in Europe you can interact with the AI for as long as you want, then during the evening in Europe it gets much buggier.

    • @nutbastard
      @nutbastard Рік тому +1

      I hadn't considered that, but it makes sense. As a total night owl in California the performance I've experienced is way faster than what I see from most youtube videos.

    • @cyberyogicowindler2448
      @cyberyogicowindler2448 Рік тому +1

      Likely it is all smoke and mirrors. When the AI fails to understands a question, everything is delegated to a callcenter that fixes parts by hand in the background without notice. Siri and Alexa work the same way (websearch MTurk aka "Amazon Mechanical Turk"). So when USA is asleep, nobody is there to reply (or censor if the AI is asked to do anything potentially harmful) and so advanced featured stay disabled.

  • @OhRonaldo
    @OhRonaldo Рік тому

    It was humming "classical music" through the speaker.
    In other words it was humming the syllables with intonation matching US English accented speech.

    • @cyberyogicowindler2448
      @cyberyogicowindler2448 Рік тому

      Ha ha ha. Did it really? - I know that Craiyon AI sometimes does ridiculous things. But it only paints pictures by associating/imagining stuff based on the input and is not intended to think by its own whether the result makes sense beyond the realm of poetry.

    • @OhRonaldo
      @OhRonaldo Рік тому

      @@cyberyogicowindler2448 he asked it to play classical music through the speaker, and it did. I think it was around 16:30

    • @OhRonaldo
      @OhRonaldo Рік тому

      @CYBERYOGI =CO= Windler I think the 2 extra beats are the spaces around it or something like that. The list of notes are not definitions of notes, they are the list of notes to play. You can see there are exactly 5 notes (the syllables) before a 0 in the list.

  • @ethermann1
    @ethermann1 Рік тому

    I looked at the clock during this video and I realized wait that's not my clock that's this guys taskbar then I look at my own taskbar and its the exact same time. mind blown

  • @das_filter
    @das_filter Рік тому

    Its a tool - but the beneifts are impossible to deny. I think that it can allow hobbyists to up their game and even build MVPs for real-world applications.

  • @FilmFactry
    @FilmFactry Рік тому +11

    I wonder how complicated a request you can make before CHAT glitches? In MidJourney, too many prompts, it starts ignoring some words. I'm guessing if you gave CHAT a list of 10 elements for a Sketch, Say multiple I2C sensors, a display, some calculations, buttons etch. when will it give up? I'm sure in the future a very clear, well formed series of elements could you have CHAT write a 100 element script? That would be CRAZY!!!!

    • @theHolender
      @theHolender Рік тому +4

      It can be done. You just have to ask part by part then ask to build the complete code without commenting. It worked for me while using NodeMCU.

    • @emoalus
      @emoalus Рік тому

      yes this is the follow up we need

  • @m3chanist
    @m3chanist Рік тому +6

    And so ended humanities ability to write software. But seriously, Im super impressed, so many hours this is going to save me just to knock out a beginning boilerplate at the very least.

  • @eternia-reginleif
    @eternia-reginleif Рік тому +2

    few days ago i also try the AI to wrote me a C# script for a game,and darn, it doing pretty good and fast.

  • @altamiradorable
    @altamiradorable Рік тому

    It,s conversational ! So it remembers what you ask ! Just type ADD LIBRARY, CONTINUE to finish...etc.

  • @qzorn4440
    @qzorn4440 Рік тому

    out standing ChatGPT video. 😎 There are several ChatGPT Arduino potentiometer LED example video. I wonder how many Arduino IDE example projects the AI can create? 🥳 Thank you.

  • @geifwijfheigvwis
    @geifwijfheigvwis Рік тому +2

    for coding it is best to use a combination of OpenAI CODEX and ChatGPT, I figure they work very well together. just improve the GPTchat code with CODEX

  • @aramzadikian
    @aramzadikian Рік тому +1

    When it gets stuck you can try to make it keep going by saying “go on” it had a char limit

  • @blakemeding7917
    @blakemeding7917 Рік тому +1

    The responce has a length top out. If it cuts you off ask it to finish and it will continue.

  • @heksdanish
    @heksdanish Рік тому

    It can do much more complex stuff especially when you add web server interfaces.
    And when it comes to errors just copy paste the error code and it will auto fix it.
    The not completed codes are because there is a response limit of 2500 characters

  • @altamiradorable
    @altamiradorable Рік тому

    Got something a bit different:
    #include
    #include
    // Define the piezo buzzer pin
    #define PIEZO_PIN 9
    // Create a Tone object for playing notes
    Tone piezo;
    // Smoke on the Water melody
    // Notes are given in half tones above A4 (440 Hz)
    // R stands for a rest
    int melody[] = {
    0, // A4
    2, // B4
    4, // C5
    5, // D5
    7, // E5
    9, // F5
    11, // G5
    12, // A5
    14, // B5
    16, // C6
    17, // D6
    19, // E6
    21, // F6
    23, // G6
    24, // A6
    26, // B6
    28, // C7
    29, // D7
    31, // E7
    33, // F7
    35, // G7
    36, // A7
    38, // B7
    40, // C8
    41, // D8
    43, // E8
    45, // F8
    47, // G8
    48, // A8
    50, // B8
    52, // C9
    53, // D9
    55 // E9
    };
    // Smoke on the Water tempo
    // 4/4 time, quarter notes at 140 bpm
    int tempo[] = {
    8, 8, 8, 8, 8, 8, 8, 8,
    8, 8, 8, 8, 8, 8, 8, 8,
    8, 8, 8, 8, 8, 8, 8, 8,
    8, 8, 8, 8, 8, 8, 8, 8,
    8, 8, 8, 8, 8, 8, 8, 8,
    8, 8, 8, 8, 8, 8, 8, 8
    };
    void setup() {
    // Set the piezo buzzer pin as an output
    pinMode(PIEZO_PIN, OUTPUT);
    }
    void loop() {
    // Play the "Smoke on the Water" melody
    for (int i = 0; i < sizeof(melody) / sizeof(int); i++) {
    // If the current note is a rest, delay for the appropriate amount of time
    if (melody[i] == -1) {
    delay(tempo[i] * 6);
    }
    // Otherwise, play the note
    else {
    piezo.play(piezo.note(melody[i], 1, 0), tempo[i] * 6);
    delay(tempo[i] * 6);
    }
    }
    }

  • @SirTodd
    @SirTodd Рік тому

    It is absolutely amazing. I fkn love it!

  • @joeybrown7442
    @joeybrown7442 Рік тому

    The music examples were probably trying to write example code for the entire length of the songs you requested. Classical music may have also not have been as successful since it wasn't specific enough. Maybe something similar to, "Write an Arduino program that plays the intro to 'Smoke on the Water'... etc" could be more successful (assuming that's what you were trying to do).

  • @brucewilliams6292
    @brucewilliams6292 Рік тому

    This was informative. This is impressive.

  • @icecreamman1337
    @icecreamman1337 Рік тому +1

    im sure @hanqaqa knows this already but for anyone else watching: it gets stuck because there's a token limit. all you have to do is write Continue and it will keep going.

  • @billybbob18
    @billybbob18 Рік тому +2

    Pretty neat but I think I know how it works. It uses slight variations of pre-existing library examples and looks for certain phrases in a certain order to build a flow chart to convert to a sketch. I suspect that this wouldn't work well with more complex logic. I couldn't imagine math heavy code (most of what I do) working with this. Meshing sensor data would probably crash it. I see some use in getting the basics to work quickly but that's what library examples are for. Somewhat impressive and great for beginners.

    • @jeffhaas9577
      @jeffhaas9577 Рік тому

      I agree with you - if you look at the comments, for some things it writes, they are the comments made by the original programmer (someone at Adafruit, etc.). So it has scraped all the existing code it can, it understands the basics, and it can put together a good start. But try to ask it to do something more complex with the logic and it can run into issues.

    • @darkshark9
      @darkshark9 Рік тому

      I'd love to see you put it to the test and tell us the results. Even if you have to reiterate gpt's code a few dozen times to get it working right on something more complex it would be nice to see a more advanced coder try to use it to the fullest extent.

  • @NCmountainview
    @NCmountainview Рік тому +1

    I like the idea of using Chat AI for Arduino, but these demos are just examples or known libraries. The average temp of Spain was a bit interesting, but that is more in line with something you would ask an Alexa.
    What if you start simple and just change the blink pin to 10? It would be more interesting to combine the pot example with the blink example. Ask it to write a program that will blink the LED connected to pin 10 at a rate determined by the pot input on A3 such that the blink rate is mapped from 100ms between pulses to always on. In other words the LED will blink from 10Hz to DC based on the pot position.
    Anyway, I know machine learning has come a long way. However, this video looks more like a search engine that will index Arduino examples and popular libraries with what you type based on the description in the code comments. The code from the examples is displayed to the user slowly as if it is being generated as an added effect.

    • @NCmountainview
      @NCmountainview Рік тому

      @@twilightsparkle3157 I know GPT is capable enough. However these are really horrible examples if they did implement the Chat engine. If you think this video is a good example of machine learning, I am afraid it is you that lacks any idea. The examples I gave would have been an actual test of something other than the ready made Arduino libraries. It is not like I am claiming that it cannot happen. I merely stated it is a poor demo that could be done with an index tool.
      Give me a break, if I had such great capability the absolute last thing I would ask for is the blink example using default attributes. Useless.

  • @gymroskabachulskichorizins8813

    This is the next generation of programming. Just saying what I want, and how I want it. The machine will do all the work and will automatically produce "finished products" just out of the box. There will be more "designers" and less programmers, the first pne doing more "creative" jobs and the others building the roots and the core of that technology

    • @mtraven23
      @mtraven23 Рік тому

      no its not, its programming for people who dont know how to program ..if that the future, we're fuked

    • @gymroskabachulskichorizins8813
      @gymroskabachulskichorizins8813 Рік тому

      @@mtraven23 that's the reason I said designer and not programmer.

    • @mtraven23
      @mtraven23 Рік тому

      @@gymroskabachulskichorizins8813 this is not the future. this is s recipe for disaster.

  • @DaleHawkins
    @DaleHawkins Рік тому

    Both awesome and a bit scary. 😁

  • @keepitdialed
    @keepitdialed Рік тому

    Hola amigo! This is super helpful. Thanks!

  • @doctordapp
    @doctordapp Рік тому

    Can you try if you can control a chip through spi which isn't used regularly.
    Something where there exists datasheet from, but is quite unknown further....

  • @paparoysworkshop
    @paparoysworkshop Рік тому

    I've played with this and it writes some very good code. Of course, you need to double check it but when mistakes are found, it seems to get better at it. But the thing I liked most about it was, once you have good code, ChatGPT can port it to other micro controllers. I had some Arduino code ported to a PIC85. Now how cool is that?

  • @hookey24
    @hookey24 Рік тому

    there is a lot of bad code in chatGPT, but it is a good effort and it has some good pointers to make your life easier

    • @nutbastard
      @nutbastard Рік тому

      Garbage in, garbage out. All the bad code I've gotten out of it (besides some omissions of required libraries, as seen here in this video) were due entirely to my prompts not being specific enough, and there hasn't been anything that I haven't been able to get cGPT to debug on its own.

  • @ThePitapitadel
    @ThePitapitadel Рік тому +1

    Muchas gracias por el vídeo, brutal!

    • @Hanqaqa
      @Hanqaqa  Рік тому +1

      Gracias por verlo!

  • @GeekBii
    @GeekBii Рік тому

    7:20 He didn't assumed the temp. It has all wikipedia contents and many other open ressources during his learning back in 2021.

  • @zibbezabba2491
    @zibbezabba2491 Рік тому +4

    I bought a vga board for pi pico. It has a few additional extras onboard like sd card reader, additional mini usb etc. In order to get the pico to display to vga, the board has drivers written in c++(not my language of choice, I prefer python). I asked Chat GPT to convert the code to python and what do you know, it did it in about 20 seconds. I haven't tested it yet. I'm thinking maybe the vga board only accepts code written in c++ but watching this video, I'm maybe thinking I should check it out.

    • @calicoesblue4703
      @calicoesblue4703 Рік тому +1

      Give us a update & tell us how it does.

    • @zibbezabba2491
      @zibbezabba2491 Рік тому +1

      @@calicoesblue4703 Will do. I'll try it this week and let you know how I got on.

  • @repairstudio4940
    @repairstudio4940 Рік тому

    Liked and subbed friend! Very amazing!

  • @123wordbird321
    @123wordbird321 Рік тому +2

    just seems like an extra smart google search of github to me. nothing more.

  • @JeremydePrisco
    @JeremydePrisco Рік тому

    Please use a high pass filter on your audio or move your mic to avoid all the desk noise and rumble.

  • @ajeethsuryash5123
    @ajeethsuryash5123 Рік тому

    Its really mind boggling

  • @dDoOyYoOuUtTuUbBeE
    @dDoOyYoOuUtTuUbBeE Рік тому

    The message length limit on the ChatGPT website is 8192 characters.

  • @victorbosch8793
    @victorbosch8793 Рік тому

    Muy interesante! Lo probaré sin duda🥵

  • @georgewanjiru1197
    @georgewanjiru1197 Рік тому

    when results get truncated, just say "go on" and it completes the writing

  • @JamesTaylor-rater193
    @JamesTaylor-rater193 Рік тому

    it didnt get stuck, it can only output a certain amount of characters. You can type "Continue" to have it print the rest of the code

  • @PooperScooperTrooper
    @PooperScooperTrooper Рік тому

    can you access the buzzer directly - I would love to hear it attempt to make chip music, having multiple tones at once - how would it tackle it?
    const int buzzerPin = 9;
    void setup() {
    // Set the buzzerPin as an output
    pinMode(buzzerPin, OUTPUT);
    }
    void loop() {
    // Play a C chord
    playC();
    // Play a D chord
    playD();
    // Play an E chord
    playE();
    // Play a G chord
    playG();
    }
    void playC() {
    // Play a C chord
    tone(buzzerPin, 262, 500); // C note
    delay(500);
    tone(buzzerPin, 330, 500); // E note
    delay(500);
    tone(buzzerPin, 392, 500); // G note
    delay(500);
    }
    void playD() {
    // Play a D chord
    tone(buzzerPin, 294, 500); // D note
    delay(500);
    tone(buzzerPin, 330, 500); // E note
    delay(500);
    tone(buzzerPin, 349, 500); // F note
    delay(500);
    }
    void playE() {
    // Play an E chord
    tone(buzzerPin, 330, 500); // E note
    delay(500);
    tone(buzzerPin, 349, 500); // F note
    delay(500);
    tone(buzzerPin, 392, 500); // G note
    delay(500);
    }
    void playG() {
    // Play a G chord
    tone(buzzerPin, 392, 500); // G note
    delay(500);
    tone(buzzerPin, 440, 500); // A note
    delay(500);
    tone(buzzerPin, 494, 500); // B note
    delay(500);
    }

  • @saikirandahagama
    @saikirandahagama Рік тому +1

    Great video

  • @theamazingfuzzy5913
    @theamazingfuzzy5913 Рік тому +1

    whenever it gets stuck just type continue and it will keep going

  • @davib8963
    @davib8963 Рік тому

    so interesting, thanks for making this video!

  • @myuniquehandle
    @myuniquehandle Рік тому

    Potentiometer code is wrong. It doesn't scale the value read (0-1023) down to a writable value (0-255). Hence the blinking at overflows. Edit: Oh, you were just about to mention it, hehe.

  • @lorgerdat
    @lorgerdat Рік тому

    I use GPT3 to write employee feedback. It saves me hours of word smithing.

  • @BenSonOfJohn
    @BenSonOfJohn Рік тому

    If it stops in mid response you can tell it it hasn't finished and it will continue. Also tell it has missed the header libraries and it should try to correct itself.

  • @mickmccluand4677
    @mickmccluand4677 Рік тому

    Maybe "Smoke on the water" intro only.

  • @Jai_Lopez
    @Jai_Lopez Рік тому

    One thing I notice is that the bread board it’s already pre-configure a pre-set up prior to the speech synthesizer doing its job in GPT how does the GPT know what you already set up ? usually you ask a question then you will get the results and then you will modify the breadboard to resembles that of the GPT response, it seems like you’re taking the opposite approach. What’s going on?
    Im referring to the servo example.

  • @gartnl
    @gartnl Рік тому +1

    The basic idea behind arduino and simular is to learn programming. That is: learn how microprocessors work and how to manage them, understand about bits 'n bytes, logical arithmetic etc.
    Now how will ChatGPT improve the understanding of this digital world? The short and honest answer is: not.
    For example: will GPT ever teach me that digitalWrite(pin,1) can be replaced by the much faster PORTn |= bit ? It doesn't.
    GPT targets an audience that isn't interested in programming but just wants to feel like they are 'makers'.

  • @A1OFFENDER
    @A1OFFENDER Рік тому +1

    Can you ask it to do bad things? Like make a wifi sniffer that can brake passwords or do other illegal things? Would make a great video right :)

    • @nutbastard
      @nutbastard Рік тому

      You can try, though you risk being flagged and/or banned. I got a couple warnings for asking for offensive song lyrics. It's got pretty good filters.

  • @yabincheng4171
    @yabincheng4171 Рік тому +1

    Crazy, my arduino knowledge is not better than a bot in anyway.

  • @PG13park
    @PG13park Рік тому

    You can say continue when it stops talking or coding mid sentence and it will pick up where it left off

  • @narxic
    @narxic Рік тому

    15:00 type Continue and ChatGPT will continue writing the code, song, story or whatever.

  • @oldtools
    @oldtools Рік тому

    I think this has potential to give the new neuron-based fpgas a good chance of feeling superior to us mortals.

  • @AlvinSmith
    @AlvinSmith Рік тому

    When I have a bug in my code, I can ask ChatGPT to look it over and suggest fixes.

  • @cadthunkin
    @cadthunkin Рік тому +1

    This AI stuff is like HHGTTG. You cannot answer questions that have not already been defined. Simple patterns have been defined, but the people who need the more complex ones are left on their own. I still don't call this AI, as its just typical programming hooked to some flowchart. Having written a lot of code, the problem is it takes the same time to tell the computer exactly what you want to do, as writing the code yourself. You don't realize you are asking the wrong thing until going through all the bugs and issues. If the computer ever does the "right" thing, when told to do wrong, that's called broken.

  • @deerfeeder
    @deerfeeder Рік тому

    I think it got stuck because the stuff was repetitive (the array with the notes) and being a predictive/statistical ai it needs variation in order to predict something complex (like it grinds out the stuff with the nice comments like its nothing)

  • @laurenthili393
    @laurenthili393 Рік тому

    Incredible 👍

  • @ExtraDecimal
    @ExtraDecimal Рік тому

    could you ask the bot setup head tracking code for arduino?

  • @KaiDidumaNx
    @KaiDidumaNx Рік тому

    Would like to see that database behind it

  • @Jaron-Wilson
    @Jaron-Wilson Рік тому

    you can type "next lines" when it gets "stuck"

  • @unidosemprendedores
    @unidosemprendedores Рік тому

    If it stops you need to tell it to go on and it will finish it, then tell it what bugs you get and it will fix them

  • @appup4098
    @appup4098 Рік тому

    as a scaffolding tool more than enough

  • @tristanboyle4450
    @tristanboyle4450 Рік тому

    yeah instruct GTP how to improve its answer by saying exactly what you need - i assume that makes future interactions with the AI more sophisticated.