ChatGPT Creates Arduino Code

  Рет қаралды 3,331

daveintheshop

daveintheshop

Күн бұрын

In this video, Dave uses ChapGPT 4o to create code to program an Arduino for a Digital Thermometer project. Join Dave as he walks you through this project.
Dave also used the DALL-E AI to create the robot programming an Arduino graphic.
Here is the prompt I used for the graphic:
Create a photo of chatgpt writing code to program an Arduino Uno
Here is the prompt I used to create the Arduni code:
Please create an arduino program for an arduino uno that measures temperature and displays that temperature in degrees F on a 2 line LCD display that has a serial interface using a backpack board. The temperature probe is a dallas semiconductor probe. also, please show a wiring diagram for the project and an explanation of how it works.

Пікірлер: 18
@jbraMoVal
@jbraMoVal 4 ай бұрын
Awesome...I tested it on version 3.5 with a simple servo motor and controlled with a potentiometer. Worked first try. You're right about the importance on writing the prompt. I'm excitedto try 4.0
@john-kneebee2143
@john-kneebee2143 2 ай бұрын
Super cool !! Nice Video !! Makes better sense to me now Thank you kind Sir
@HamWithCam
@HamWithCam 4 ай бұрын
Impressive video! Just right for those wanting to get started programming an Arduino. Even though I have done Arduino programming I learned something. Well done!
4 ай бұрын
I've asked 3.0 to generate code for a side project I had in mind but was too lazy to read up and figure out. The pivotal method's body was only a comment saying something like; "this is left up to the reader as an exercise" I asked it then to populate that specific method, knowing the inputs and outputs required. It regenerated the whole piece of code and hid that method deeper in the code, but still same comment. I find it too eager to please and will make up stuff. I'm glad it worked for you.
@daveintheshop
@daveintheshop 4 ай бұрын
I used the latest ChatGPT 4o on this experiment. That is "o" as in Oscar-which is supposedly much better. I have used ChatGPT 3 and found it to hallucinate frequently.
@scottstevens7569
@scottstevens7569 4 ай бұрын
Nice information and example. Well laid out and agreeable conclusion presented. I liked the power tool anolagy.
@daveintheshop
@daveintheshop 3 ай бұрын
Glad you liked it!
@lidimanandteam6431
@lidimanandteam6431 4 ай бұрын
you deserved a lot off subscribers bro
@Badg0r
@Badg0r 4 ай бұрын
Great video! Keep up the good work with the Arduino
@RixtronixLAB
@RixtronixLAB 4 ай бұрын
Creative video,thanks :)
@daveintheshop
@daveintheshop 3 ай бұрын
Thank you! Cheers!
@initiald975
@initiald975 3 ай бұрын
Yes it can. But if it’s really super complicated, no. Like when your RTC trumps the GPS system you’re using in your project.
@Foozow
@Foozow 4 ай бұрын
I noticed that you started the video with an Arduino R4 but the finished test was using an R3, were there issues with the R4 as I was planning on getting one?
@daveintheshop
@daveintheshop 4 ай бұрын
Good eye! The LCD panel actually had a problem. In switching out parts to find the issue, I substituted an R3 as part of the diagnosis steps. I tested the R4, and it works fine. Thanks for the question.
@Foozow
@Foozow 3 ай бұрын
@@daveintheshop Thanks for that. I'm very new to Arduino stuff so a lot of stuff I'm trying doesn't work at the moment haha. I'll get better though. Thanks for clarifying. 🙂
@daveintheshop
@daveintheshop 4 ай бұрын
Here is the code response from ChatGPT Here is the code that was generated by ChatGPT: #include #include #include #include // Data wire is connected to pin 2 #define ONE_WIRE_BUS 2 // Setup a oneWire instance to communicate with any OneWire device OneWire oneWire(ONE_WIRE_BUS); // Pass oneWire reference to Dallas Temperature. DallasTemperature sensors(&oneWire); // Set the LCD address to 0x27 for a 16 chars and 2 line display LiquidCrystal_I2C lcd(0x27, 16, 2); void setup() { // Start the serial communication Serial.begin(9600); // Start up the library sensors.begin(); // Initialize the LCD lcd.begin(); lcd.backlight(); // Print a message to the LCD lcd.setCursor(0, 0); lcd.print("Temperature:"); } void loop() { // Request temperature from the sensor sensors.requestTemperatures(); // Fetch the temperature in Celsius float tempC = sensors.getTempCByIndex(0); // Convert Celsius to Fahrenheit float tempF = tempC * 9.0 / 5.0 + 32.0; // Print the temperature in Fahrenheit on the LCD lcd.setCursor(0, 1); lcd.print(tempF); lcd.print(" F"); // Wait 1 second before repeating delay(1000); }
@jackevans2386
@jackevans2386 2 ай бұрын
The major problem with this method is that you've learnt nothing. You might as well have bought a working temperature readout device. You will have learnt nothing there too.
From Ideas to Code: Enhancing Arduino Programming with chatGPT!
13:47
ChatGPT with Arduino and ESP32 | C++ and MicroPython coding
40:49
DroneBot Workshop
Рет қаралды 322 М.
Cute
00:16
Oyuncak Avı
Рет қаралды 12 МЛН
БЕЛКА СЬЕЛА КОТЕНКА?#cat
00:13
Лайки Like
Рет қаралды 1,4 МЛН
Worst flight ever
00:55
Adam W
Рет қаралды 24 МЛН
HAH Chaos in the Bathroom 🚽✨ Smart Tools for the Throne 😜
00:49
123 GO! Kevin
Рет қаралды 14 МЛН
12 NEW Arduino Projects!!! (2024 Edition)
9:20
ToP Projects Compilation
Рет қаралды 242 М.
Te doare MINTEA: NOUL ChatGPT-4o! Și un PC mic și al dracu'!
27:21
Arduino Project Box Build
17:05
daveintheshop
Рет қаралды 304
Build Anything With ChatGPT, Here’s How
1:24:05
David Ondrej
Рет қаралды 1 МЛН
How to Use Arduino Interrupts The Easy Way
33:28
Rachel De Barros
Рет қаралды 85 М.
Can ChatGPT Write An Arduino Sketch From A Simple Description
14:21
learnelectronics
Рет қаралды 6 М.
Cute
00:16
Oyuncak Avı
Рет қаралды 12 МЛН