1. Do not share user accounts! Any account that is shared by another person will be blocked and closed. This means: we will close not only the account that is shared, but also the main account of the user who uses another person's account. We have the ability to detect account sharing, so please do not try to cheat the system. This action will take place on 04/18/2023. Read all forum rules.
    Dismiss Notice
  2. For downloading SimTools plugins you need a Download Package. Get it with virtual coins that you receive for forum activity or Buy Download Package - We have a zero Spam tolerance so read our forum rules first.

    Buy Now a Download Plan!
  3. Do not try to cheat our system and do not post an unnecessary amount of useless posts only to earn credits here. We have a zero spam tolerance policy and this will cause a ban of your user account. Otherwise we wish you a pleasant stay here! Read the forum rules
  4. We have a few rules which you need to read and accept before posting anything here! Following these rules will keep the forum clean and your stay pleasant. Do not follow these rules can lead to permanent exclusion from this website: Read the forum rules.
    Are you a company? Read our company rules

News OpenAI - makes coding on the fly

Discussion in 'Miscellaneous' started by ART FLY, Sep 7, 2021.

  1. ART FLY

    ART FLY Gettin' High on DIY :) Gold Contributor

    Joined:
    Jan 18, 2020
    Messages:
    118
    Occupation:
    Bavarian State Theater, Decoration Stock Manager
    Location:
    BAVARiA
    Balance:
    421Coins
    Ratings:
    +69 / 0 / -0
    My Motion Simulator:
    3DOF, DC motor, Arduino
    Hi guys,

    I am not capable of coding at all
    BUT
    as I understand OpenAI might be a one in a lifetime experience for you people who know how to code and want their working process to be made much more convenient.

    I found this on YouTube.


    Have a great day,
    later,
    ART FLY []-)
    • Like Like x 1
    • Informative Informative x 1
  2. GWiz

    GWiz Active Member

    Joined:
    May 12, 2019
    Messages:
    179
    Occupation:
    Dentist
    Location:
    Aberdeenshire, Scotland
    Balance:
    1,453Coins
    Ratings:
    +116 / 0 / -0
    My Motion Simulator:
    DC motor, Arduino, 6DOF
    With Chat-GPT (Made by Open-AI) gaining popularity, I thought I would try it out. It is really a staggeringly impressive piece of technology. I have taught myself some very rudimentary programming to run motion simulators, wind sims and button boxes over the last few years. AI based tools are going to become increasingly powerful but I suspect also quite deskilling; If I want some basic coding performed now, I can literally just ask AI to design it, but then I am less likely to have the knowledge myself to write a program from scratch.

    As an example I've attached some code written by Chat-GPT with a little prompting that you can use to configure another program that it will create to recognise different Arduinos using the Serial.Print command and letting you know the correct COM port. This may be useful for the DIY motion enthusiast, I have several arduinos running motion, wind, gearbox, pedals etc. It's handy having a program that will accurately identify an arduino and not run the risk of flashing the wrong one or configuring the motion software to look for the wrong COM port.

    To use the program, you need to first install Python and then run the script. It will open a window allowing you to configure a few parameters. The 'Handshake Message' is what the program looks for the arduino sending. (Add the same phrase as a Serial.println("Handshake"); line in the arduino code). You can also set the BAUD rate and what messages are displayed for success or failure. It will then create an exe file that will use the parameters that you have set.

    As an amateur, if I were to try to write this code from scratch, it would have taken me hours, if not days. Instead, I created it in minutes using Chat-GPT. You can literally type in plain language "Write me a program for an arduino that will control 6 servo motors with specified ranges." and then you can add "Please change the code so that the servos can respond to data sent over serial in order to move those servos and also add error checking for the data being sent." You can keep asking questions and asking it to modify the code. It even neatly comments all the code making it easy to change and understand. I've also tried copying and pasting existing code I have written and asked it to improve upon it and it can. It's truly mind blowing stuff how far language learning AI programs have come.

    If you are an inexperienced programmer like me or simply want some basic code to modify, I highly recommend trying it out.

    Config.png

    *Edited for error in configuration of code

    Attached Files:

    • Like Like x 1
    • Useful Useful x 1
    Last edited: May 7, 2023