• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

Programming ESP32 with ChatGPT from OpenAI?

Q&A Forum › Programming ESP32 with ChatGPT from OpenAI?
0 Vote Up Vote Down
William Lucid asked 2 months ago

Can ChatGPT program an ESP32?  This was the inspiration to Try ChatGPT
ChatGPT requires an account on OpenAI; programing is done using your web browser.  I typed in: “Create Async web  server using Tyler Glenn’s BME280 and EvironmentalCalculation libraries with sensor readings every 15 minutes using NTP..”

1st ChatGPT Web Server
//Written entirely on OpenAI using ChatGPT
//See 1st_ChatGPT_Webserver.ino –after debugging and refinement
//by William Lucid 1/21/2023

1st_ChatGPT_Webserver.ino
//After debugging; 1st ChatGPT Webserver and refinements:
//by William Lucid

Webpage, monitor view:
ESP32 1st ChatGPT Webserver
Regards,
William

Question Tags: ChatGPT, ESP32
7 Answers
0 Vote Up Vote Down
William Lucid answered 2 months ago

Good Morning,

I already have BME280 webserver uploading data to a Google Sheet; wanted to see what ChatGPT could come up with for uploading data for a year by the month and adding a new sheet for the same month if append row fails.

Results of 2nd ChatGPT session

Debugged and combined working Google Sheet Script using #5 input from “Results of 2nd ChatGPT session.”

Resulting GS Script and Arduino function that sends data

Work in progress…

BME280 ChatGPT6 –live data feed

Regards,
William

0 Vote Up Vote Down
Sara Santos Staff answered 2 months ago

Does it work well creating the complete examples?

0 Vote Up Vote Down
William Lucid answered 2 months ago

Hi Sara,

Here is 1st text I entered in ChatGPT:  “program esp32 async web server with bme280 reporting every 15 minutes using ntp”  –no quotes.  ChatGPT return on the text you enter; as to how well it does.  It also explains the resulting code.
2nd text input:  “change Adafruit_BME280 library to tyle glenn bme280 library”
3d text input:  “add tyler glenn evironmental bme280”
4th text input:  “add tyler glenn EnvironmentCalculations
5th text input:   “use tyler glenn bme280 and EnvironmentCalculations libraries”
6th text input:  “create async web server tyler glenn bme280 and EnvironmentalCalculations envCalc libraries with sensor readings every 15 minutes using ntp”

Each text input produced new code. The more complete the text the better the results… Still required some debugging and changing variables due to switch libraries I think… still awesome; taking text and writing Arduino C++ code.

This was my first experience using ChatGPT.

Regards,
William

0 Vote Up Vote Down
Sara Santos Staff answered 2 months ago

That’s great.
But it seems people won’t need our work anymore :'(

0 Vote Up Vote Down
William Lucid answered 2 months ago

I believe there will always be a need for a strong foundation like found here and in your courses in programing.  How else could you debug code, when the AI “tool” fails to generate 100% correct code or code that does not compile?

Yes, RNTLab is needed; keep up the good work!

Regards,
William

0 Vote Up Vote Down
Sara Santos Staff answered 2 months ago

Yes. I guess you’re right.
Thanks for sharing your findings.
Regards,
Sara

0 Vote Up Vote Down
William Lucid answered 2 months ago

Good Morning,
 
Article on using ChatGPT with Arduino:
I tried ChatGPT for Arduino – It’s Surprising
 
William

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [eBook Updated] SMART HOME with RPi, ESP32, and ESP8266 (version 1.2) March 8, 2023
  • [eBook Updated] ESP32-CAM Projects (version 1.3) January 7, 2023

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2023 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.