---
title: "How to use chatGPT with arduino"
url: "https://maker.wiznet.io/jaden/projects/how-to-use-chatgpt-with-arduino/"
markdown_url: "https://maker.wiznet.io/jaden/projects/how-to-use-chatgpt-with-arduino/md"
type: "WCC: WIZnet Created Content"
author: "jaden kim"
editor: "WIZnet"
editor_url: "https://maker.wiznet.io/"
original_author: "jaden kim"
published: "2023-04-24"
language: "en"
hardware: ["Arduino UNO", "Arduino Ethernet Shield 2"]
likes: 1
views: 3574
comments: 0
source: "WIZnet Makers (https://maker.wiznet.io/)"
---

# How to use chatGPT with arduino

> chatGPT usecase

Original author: jaden kim

## Components

- **Arduino UNO** x 1 ([docs](https://www.farnell.com/datasheets/1682209.pdf))
- **Arduino Ethernet Shield 2** x 1 ([docs](https://docs.arduino.cc/hardware/ethernet-shield-rev2))

## Article

![](https://maker.wiznet.io/upload/ckeditor5/685481630%5F1682325879%2Epng)Have you ever wondered how you can use ChatGPT to help you create an Arduino project?

I recently had the opportunity to try it out([Link](https://maker.wiznet.io/jaden/projects/arduino-sensor-box-made-by-chatgpt/)), and the results were amazing!

![](https://maker.wiznet.io/upload/ckeditor5/685481630%5F1682325834%2Epng)

In fact, I was so impressed with the experience that I wanted to share it with the community.

In this article, I'll be discussing my experience of creating an Arduino project with the help of ChatGPT, and I'll also be sharing some tips on how you can use ChatGPT to create your own projects.

So, whether you're new to Arduino programming or an experienced programmer, read on to learn how ChatGPT can help you bring your ideas to life!

Before we get started, here are some things to consider when writing an Arduino project using chatGPT

![](https://maker.wiznet.io/upload/ckeditor5/685481630%5F1682327827%2Epng)

** 1. ChatGPT is not perfect**

This means that chatGPT may not generate perfect code, which is why you need to be able

to verify the generated code and at least give the user some idea of what went wrong.

** 2. Clearly describe the project you want to implement to Chatgpt**

Because Chatgpt generates projects based on your needs, the more precisely you express

them, the closer it will come to generating the output you want.

** 3. Use HW that many people have been using for a long time.**

Chatgpt is trained based on information on the internet, so HWs with a lot of information

or examples are easier to implement. Also, since the data up to 2021 was trained, it may

be difficult to implement if you use HWs released after that.

With the above considerations in mind, let's start writing commands to chatGPT.

I have an** Arduino Uno** with an** Ethernet shield 2**, a **DHT11sensor**, a **0.96" OLED**, sending temperature and humidity data to a TCP client every 10 seconds, and I want to display the network connection status on the OLED.

Now, let's write a prompt to enter into chatgpt so that it can generate the desired content.

I wrote the prompt like this

**using Arduino UNO, Ethernet shield 2, DHT11 sensor, 0.96" OLED.Arduino UNO is TCP server. display Ethernet status in 0.96" OLEDsend DHT11 data to client every 10 s.generate code.**

ChatGPT will then write the code for me, and while I get the correct code, others may get code that gives them compilation errors.

If that happens, you can type a compilation error message into Chatgpt and it will fix the code, so give that a try, and if it doesn't work, check the code yourself and explain to Chatgpt what went wrong so it can fix it.

So far, we've briefly described how we built our project using Chat GPT.

Next time, we'll go into more detail.

---

Source: https://maker.wiznet.io/jaden/projects/how-to-use-chatgpt-with-arduino/
