ChatGPT with Arduin...
 
Notifications
Clear all

ChatGPT with Arduino and ESP32 | C++ and MicroPython coding

37 Posts
7 Users
4 Likes
2,561 Views
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6964
 

I have been using ChatGPT to convert a C++ sketch to python but it never finishes. The two attempts resulted in two different parts of the code being partially converted. I have not checked, but maybe the free version has a limit on size. Interesting concept, but still not anything I would bet the farm on. Even more interesting is the marriage between ChatGPT and Wolfram Alpha. Wolfram Alpha has been around for over 40 years.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6964
 

I see they now have a PLUS version for $20 per month. That is a lot of money for me when at least so far it is of limited use. 

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
(@dronebot-workshop)
Workshop Guru Admin
Joined: 5 years ago
Posts: 1079
Topic starter  

@zander Actually I disagree, I think 20 bucks a month is a pretty sweet deal - I was ready to pay the 42 USD they were originally rumored to charge. If they offered it to Canadians, I would grab it tomorrow, but right now it's just for Americans.

😎

Bill

"Never trust a computer you can’t throw out a window." — Steve Wozniak


   
ReplyQuote
(@davee)
Member
Joined: 3 years ago
Posts: 1680
 

Hi Ron @zander,

   Well done for making progress. I confess to briefy looking at Python classes (in the past), but not really putting enough effort into it ... at first glance it looked messier in syntax than C++, but that is probably more my laziness than a true reflection.

If you felt in the mood, you might consider starting a new thread and show how far you have got, as I suspect there are few 'watchers' that would be interested to see what is going on, to try to figure out how much is real and how much is hype, even if they are not actively involved.

I am not thinking of spending $20/month on it at the moment either.

Take care my friend, Dave


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6964
 

@dronebot-workshop I meant in my financial position it's not affordable.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
(@davee)
Member
Joined: 3 years ago
Posts: 1680
 

Hi Bill @dronebot-workshop,

 Regarding $20/month, it is obviously trivial for a business, but for many people with limited income, (as many retirees are), and in some countries, possibly aggrevated with financial uncertainity caused by recent global-scale political upheavals, I think it would be a barrier.

In addition, I am not clear that it is the only cost. I saw some pages describing the 'job' costing based on the number of tokens that had to be analysed. Initially, it seemed someone signing up got a free $18 credit, to cover their first experiments. In addition, some jobs were not being charged at this stage, as they are still at a 'beta' level. How someone actually pays after the credits run out was unclear. Does the $20/month offset this costing?

Your video was up to your customary exemplary standard ... and I am sure you only maintain that standard by a lot of background work before switching your camera on ... so I apologise for attempting to reply having only 'glanced' at the site, but I did get an uncomfortable feeling that it could get expensive when fully up and running. Have I misunderstood the situation? Do you think my fear is justified?

In the meantime, I thank you for making a very impressive video.

Best wishes, Dave


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2527
 

@dronebot-workshop 

I agree, $20/month is a bargain basement can't-be-beat no-brainer Best Buy for something that will write all your homework assignments and essays all the way from grade school right up to grad school.

*ducks to avoid inevitable wall of flame*

Anything seems possible when you don't know what you're talking about.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6964
 

@will Imagine the people who will be dealing with all these cheaters about 20 to 30 years from now.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
robotBuilder
(@robotbuilder)
Member
Joined: 5 years ago
Posts: 2042
 

@will 

We have to adapt to change. Whether ChatGPT does your assignments, or you pay a human to do them for you, the problem is the same. Probably there would be ways to detect a ChatGPT essay over a human essay.  An in house test where the computer was not under control of the student would also reveal if they student really knew the subject matter.

The ability to use tools like ChatGPT is probably itself a skill that will serve you well in the future like the slide rule and then the calculator did for computing answers to math problems.

 

 


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6964
 

@robotbuilder universities have used software to detect plagiarism for many years. When ChatGPT writes them though many do not get detected. As I feared a lot of folks are not understanding the danger of AI. Just imagine what we have been going through the last few years with the media under attack and real fake news influencing significant portions of society. With the emerging AI this will increase sharply and many more folks will be influenced to believe nonsense like the earth is flat, or climate change is caused by the Chinese. That is much more dangerous to all of us than students cheating.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
robotBuilder
(@robotbuilder)
Member
Joined: 5 years ago
Posts: 2042
 

@zander 

Fake news is more about psychology than simply being untrue. People believing something because they want to believe it. Deep down they may know it isn't true but it suits them to say it is for it gets them what they want.

I don't see these tools as being examples of intelligence in the human sense. We will learn what they can and can't do. There is not much you can do if someone decides to trust these programs as an absolute source of truth despite the evidence to the contrary. In the case of generating code the code will either work or fail in some way regardless what someone might believe the generator's abilities are.

Bill is simply exploring its use as a tool.

 


   
ReplyQuote
(@dronebot-workshop)
Workshop Guru Admin
Joined: 5 years ago
Posts: 1079
Topic starter  

ChatGPT Plus is now available in Canada, and I've just become their latest subscriber!

😎

Bill

"Never trust a computer you can’t throw out a window." — Steve Wozniak


   
ReplyQuote
jjs357
(@jjs357)
Member
Joined: 1 year ago
Posts: 30
 

Has anyone got the MicroPython example to work using Thonny?

ChatGPT generates code that is quite different from that shown in the video and the code produced does not work when deployed with Thonny.

I just tried this today, March 7 2023.

The Arduino parts seemed to work more or less like shown in the video.


   
ReplyQuote
jjs357
(@jjs357)
Member
Joined: 1 year ago
Posts: 30
 

I did get the MicroPython web server example from here:

https://randomnerdtutorials.com/esp32-esp8266-micropython-web-server/

to work but this approach uses 2 files: boot.py and main.py and in boot.py you need to provide access credentials to a local router.

I don't see how ChatGPT could generate that approach and the single file main.py that is generated for me by ChatGPT does not work.


   
ReplyQuote
byron
(@byron)
No Title
Joined: 5 years ago
Posts: 1122
 

@jjs357

When micropython starts up it will auto run a file called boot.py followed by a file called main.py. The main.py often imports other modules or xxx.py files to incorporate them into a complete package to run. This is jolly useful when you are running the code on your board when its in stand alone mode (not connected to an IDE).

The boot.py is used to set up the board necessary for the programs to run, such as connecting to wifi etc and it shares the same global space as the main.py.

But its not necssessay to use boot.py or main.py if you are running a program from an IDE such as Thonny. Though sensible, its not necessary to use a boot.py and main.py to auto run your program, you could put everything in main.py if you wish.

So your chatGPT program was not obliged to create two separte files to run its micropython code. So you are just left with the code the chatGPT served up for you which you can put into a file named as you want (but it must end in a .py)

If the generated code does not run then I cant say I'm surprised, I'm just surprised when chatGPT code runs at all.


   
ReplyQuote
Page 2 / 3