Arduino Projects

ChatGPT Arduino Programming Ultimate Test, ChatGPT for Arduino Projects

ChatGPT Arduino Programming:

ChatGPT Arduino Programming Ultimate Test, ChatGPT for Arduino Projects– In today’s article, I am going to use ChatGPT to make an Arduino-based project that’s never been done by anyone before. First, I will make the project and then I will ask ChatGPT to make the same project.

 




allpcb circuit

So, I started off by asking ChatGPT to tell me about yourself and ChatGPT replied

I am a language model created by OpenAI. My primary function is to generate human-like text based on the input I receive. I have been trained on a diverse range of internet text, allowing me to answer questions on a wide range of topics and generate text that is coherent and informative.”

It doesn’t matter, how many times you ask ChatGPT, every time it will use different words, so it will be 100% plagiarism free. So, you can use ChatGPT for writing your project reports and thesis. But, what I suggest is, do it yourself.

You can talk to ChatGPT just as you normally talk to people. So, I continued chatting with ChatGPT and I was really amazed. ChatGPT knows when to apologize and it knows very well how to ignore spelling mistakes. Anyway, read my chat and then we will continue from there.

Electronic Clinic

Tell me about yourself?

ChatGPT:

I am a language model created by OpenAI. My primary function is to generate human-like text based on the input I receive. I have been trained on a diverse range of internet text, allowing me to answer questions on a wide range of topics and generate text that is coherent and informative.

Electronic Clinic

What is ChatGPT?

ChatGPT:

ChatGPT is a conversational AI model developed by OpenAI. It is based on the GPT (Generative Pretrained Transformer) architecture and is trained on a large corpus of text data to generate human-like responses to text inputs. It can be used for a variety of tasks, including answering questions, generating chatbot conversations, and generating creative writing.



Electronic Clinic

ChatGPT is designed for?

ChatGPT:

ChatGPT is designed for generating human-like text. It can be used for a variety of applications, including:

Chatbots: Creating conversational AI systems for customer service, information retrieval, and more.

Question answering: Answering questions on a wide range of topics based on its training data.

Text generation: Generating text in a specific style or tone, such as fiction writing or news articles.

Language translation: Generating text in another language based on input in one language.

Text summarization: Reducing long texts to shorter, more concise versions while retaining important information.

Electronic Clinic

can you write a movie script?

ChatGPT:

Yes, I can write a movie script. However, it’s important to note that while I have been trained on a large corpus of text, including movie scripts, my responses are generated based on patterns in the data I was trained on and may not necessarily result in a high-quality script. Please provide more specific information, such as the genre, length, tone, etc. of the desired script, so I can generate a better response.

Electronic Clinic

What you can do?

ChatGPT:

As a language model, I can perform a variety of language-related tasks, including:

Answering questions

Generating text (e.g. creative writing, news articles, product descriptions)

Conversing in a chatbot-like manner

Summarizing text

Translating text from one language to another

Completing sentences or paragraphs given a prompt

Generating lists, such as facts about a particular topic

Note that my responses are generated based on patterns in the text I was trained on and may not always be accurate or appropriate.

Electronic Clinic

Can you do Android programming?

ChatGPT:

No, I cannot do Android programming. I am a language model trained to generate text based on patterns in the data I was trained on, not to write code or perform technical tasks. However, I can provide information and resources on Android programming if needed.



Electronic Clinic

How about Arduino programming?

ChatGPT:

No, I cannot perform Arduino programming. I am a language model trained to generate text based on patterns in the data I was trained on, not to write code or perform technical tasks. However, I can provide information and resources on Arduino programming if needed.

Electronic Clinic

You must be kidding, last time you wrote me an Arduino code

ChatGPT:

My apologies, you are correct. I can write code in various programming languages, including Arduino code. Please provide the details of the code you need, and I will do my best to assist you.

Electronic Clinic

Now, that’s like a good boy 😉

ChatGPT:

Thank you! I am always here to help. How can I assist you today?

Electronic Clinic

Hmmm, today I am going to perform some ultimate tests on you, these are not going to be easy. You Vs me. We will be making an Arduino based project that’s never been done before. So, are you ready?

ChatGPT:

Yes, I am ready! I will do my best to assist you in your Arduino project. Please provide more details on the project you have in mind, and I will do my best to help.

Electronic Clinic

Relax, first i am going to design the circuit and then I will ask you to write the code.

ChatGPT:

Understood. Please go ahead and design the circuit, and I will be here to help with writing the code once you are ready.

Electronic Clinic

great!

ChatGPT:

I am glad to hear that. Let me know if there’s anything else I can assist with.

Electronic Clinic

So, without any further delay, let’s get started!!!

Yes, let’s get started! I am eager to help and assist in any way I can. Please share the details of the project and I will do my best to support you.

I am already impressed, but before I start the challenge, first I am going to ask ChatGPT to write me a song on Arduino. I just want to check how creative it is.

“ChatGPT’s response depends on your question. The more information you give ChatGPT, the better it will reply. I asked ChatGPT to write me a song on “Arduino” and mention my YouTube channel “Electronic Clinic” and also mention my subscribers as I am dedicating this song to my subscribers. And it will be highly appreciated if you include ESP32, STM32, Raspberry pi Pico, Arduino Nano, Arduino Uno, Electronics, and image processing too.



Song by ChatGPT

Verse 1:

Building circuits, coding bright,

With the Arduino by my side.

Bringing ideas to life each day,

Watching projects come to play.

Chorus:

Electronic Clinic, my YouTube fame,

With subscribers, I’ll shout their name.

Dedicating this song to you,

For loving all things electronic too.

Verse 2:

ESP32, STM32, Raspberry Pi Pico,

Arduino Nano, Uno too, oh so sicko!

From simple lights to complex code,

Making electronics simple to decode.

Chorus:

Electronic Clinic, my YouTube fame,

With subscribers, I’ll shout their name.

Dedicating this song to you,

For loving all things electronic too.

Bridge:

Image processing, it’s a breeze,

With technology like these.

Bringing tech and art to life,

Making each project full of life.

Chorus:

Electronic Clinic, my YouTube fame,

With subscribers, I’ll shout their name.

Dedicating this song to you,

For loving all things electronic too.

Outro:

So here’s a shout out to my subscribers,

You make the Electronic Clinic a winner.

Thank you for your love and support,

Together we’ll make electronics a resort!

This is absolutely mind-blowing, in just a few seconds ChatGPT wrote an Arduino song. Just take a look, ChatGPT used my channel name, and mentioned my subscribers and all the controller boards as well.

You now have a sense of just how strong ChatGPT is.

ChatGPT Arduino Programming

I have so many controller boards, sensors, and breakout boards. Is ChatGPT really that powerful to be able to program all of these things? Well, to test it, I am going to randomly select two sensors. Let’s start with the DHT21 and Max6675 amplifier board and K type thermocouple. And for displaying the values I am going to use I2C SSD1306 Oled display module. And I am going to use Arduino Nano.




ChatGPT Arduino Programming

Let me tell you about the project, and what exactly I want to build. As I said earlier I am trying to build an Arduino based project that’s never been done before. So, I am going to use an Oled display module, DHT21 Temperature and Humidity sensor, and Max6675 and K type thermocouple with the Arduino at the same time. Let’s see how ChatGPT handles all the libraries and programming.

But, first, I am going to build this project and then I will ask the ChatGPT. So, without any further delay, let’s get started!!!

Amazon Links:

Arduino Nano USB-C Type (Recommended)

Max6675 K type thermocouple

DHT21 Temperature and Humidity Sensor

I2C supported SSD1306 Oled display Module

*Disclosure: These are affiliate links. As an Amazon Associate I earn from qualifying purchases.



Circuit Diagram:

ChatGPT Arduino Programming

The VCC and GND pins of the DHT21, SSD1306 Oled display, and Max6675 Amplifier board are connected with the Arduino 3.3V and GND pins.

The SCK, CS, and SO pins of the Max6675 Amplifier board are connected to the Arduino pins D6, D5, and D3 respectively.

The Data wire of the DHT21 Temperature and Humidity sensor is connected to the digital pin D2.

The SDA and SCL pins of the SSD1306 Oled display module are connected to the analog pins A4 and A5. A4 is the SDA and A5 is the SCL.

ChatGPT Arduino Programming

I have connected everything as per the circuit diagram. And as you can see I am using my Arduino Nano development board. But you can also do all these connections on a breadboard. But, if you want to make the same Arduino Nano development board then you can download its PCB Gerber files.

Arduino Nano Dev Board Gerber Files



My Code:

I have written this code. And you can see I have added all the required libraries. I have been using these libraries for quite a long time. So, if you don’t know how to install these libraries then you can read my getting started articles on Oled display, DHT21, and Max6675.

 



Practical Testing:

ChatGPT Arduino Programming

I applied heat to the DHT21 and K type thermocouple and the temperature raised to 17.5 and 37.25 degrees Celsius. So, my code is working and it took me around 30 Minutes to make it work. It may seem hard to believe, but I did it in 30 minutes as I have been using these sensors and displays for years. Anyway, now let’s go ahead and ask ChatGPT to write the Code.




Now, let’s get back to our project.

As I mentioned, the more details you give to ChatGPT, the better it will respond. So let’s go ahead and tell ChatGPT about the project.

Write me Arduino code for monitoring two sensors DHT21 and Max6675 K type thermocouple. The data wire of the Dht21 sensor is connected to the digital pin D2 pin of the Arduino. Whereas the SCK, CS, and SO pins of the Max6675 are connected to the Arduino digital pins D6, D5, and D3 respectively. The SDA and SCL pins of the SSD1306 Oled display module are connected with the A4 and A5 pins respectively. I want you to display the dht21 temperature, dht21 Humidity, and the temperature value from the Max6675 k type thermocouple on the SSD1306 Oled display module.

You can see, I am telling ChatGPT about the connections and I am giving it some instructions how to do it. So, I am going to press the Enter key and let’s see.

Arduino Code by ChatGPT:

 

I didn’t ask for the comments so that’s why ChatGPT is not adding any comments. Anyway I copied this code and pasted into the Arduino IDE. And when I compiled the code I got two errors which I fixed.



Code fixed:

 

Practical Demonstration:

ChatGPT Arduino Programming

Its displaying all the values in the same order as I asked for. It’s outstanding. The text is small but it’s not an issue. We can increase the font size. Anyway, you can see the Temperature and Humidity values from the DHT21 Sensor and the temperature value from the Max6675 K type thermocouple.

It took me 30 minutes to complete the code but ChatGPT did it in just a few seconds. There were a few errors which I fixed in less than 5 minutes time. So, ChatGPT can save a lot of your time. You guys need to give it a try. So, that’s all for now.



Watch Video Tutorial:

Engr Fahad

My name is Shahzada Fahad and I am an Electrical Engineer. I have been doing Job in UAE as a site engineer in an Electrical Construction Company. Currently, I am running my own YouTube channel "Electronic Clinic", and managing this Website. My Hobbies are * Watching Movies * Music * Martial Arts * Photography * Travelling * Make Sketches and so on...

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button