{"id":17908,"date":"2023-04-21T21:55:54","date_gmt":"2023-04-21T21:55:54","guid":{"rendered":"https:\/\/wolles-elektronikkiste.de\/?p=17908"},"modified":"2023-11-30T22:08:47","modified_gmt":"2023-11-30T22:08:47","slug":"using-chatgpt-and-bing-for-arduino","status":"publish","type":"post","link":"https:\/\/wolles-elektronikkiste.de\/en\/using-chatgpt-and-bing-for-arduino","title":{"rendered":"Using ChatGPT and Bing for Arduino"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">About this post<\/h2>\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>Arduino is a great platform for Makers to implement their own electronics projects. But sometimes programming the Arduino boards can be difficult &#8211; especially for beginners. This is where ChatGPT can help: As an intelligent chatbot, it can answer questions about Arduino programming, provide tips and advice, and respond to problems during project development. In this post, we will explore how ChatGPT and Arduino can work together to improve the Maker experience and reduce development time.<\/p>\n<cite>ChatGPT<\/cite><\/blockquote>\n\n<p>The above paragraph was written by ChatGPT. I only specified that I would like to write a post about how ChatGPT can support Arduino users and asked for a brief introduction. Artificial intelligence is already very mature for such tasks.<\/p>\r\n<p>No matter what you think of AI, it will come and permanently change our lives, just as the Internet did. However, this post will not be an ethical-moral discussion, but we will simply explore the question: What can ChatGPT already do in relation to the Arduino world today &#8211; and what not?<\/p>\r\n<p>&#8220;The new&#8221; Bing (Microsoft&#8217;s chatbot) and ChatGPT are based on GPT. I have tried both, but put the emphasis on ChatGPT. Bard, the competitor from Google, was not yet available in Germany at the time of writing &#8211; exciting times are ahead.<\/p>\r\n<p>By the way, the post image (brain with MCU) was also generated by an artificial intelligence, namely <a href=\"https:\/\/openai.com\/product\/dall-e-2\" target=\"_blank\" rel=\"noopener\">Dall\u22c5E 2<\/a>. Only the lettering &#8220;Microcontroller&#8221; was added manually. In contrast to ChatGPT, Dall-E 2 is only available for a fee (approx. 10 euro cents per image or attempt).<\/p>\r\n\n<h2 class=\"wp-block-heading\">What is ChatGPT? <\/h2>\n\n<p>Let us ask ChatGPT: <em>What is ChatGPT, and how does it work?<\/em><\/p>\r\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>ChatGPT is an artificial intelligence chatbot based on OpenAI&#8217;s GPT (Generative Pre-trained Transformer) architecture. ChatGPT is trained to hold human-like conversations in English and other languages.<\/p>\n\n\n\n<p>ChatGPT&#8217;s functionality is based on machine learning and, in particular, Deep Learning methods. It has been pre-trained on large text corpora using transformer networks to learn language understanding and the ability to generate human-like responses.<\/p>\n\n\n\n<p>When you talk to ChatGPT, it analyzes your input and uses its understanding of language and context to generate a response. These responses are based on the patterns and correlations discovered in the model&#8217;s training dataset.<\/p>\n\n\n\n<p>Because ChatGPT has been trained on large amounts of data, it can handle a variety of topics and even provide specific information if it has sufficient knowledge in that area.<\/p>\n<cite>ChatGPT about ChatGPT<\/cite><\/blockquote>\n\n<h4 class=\"wp-block-heading\">How can I try ChatGPT?<\/h4>\n\n<p>If you want to use ChatGPT, then sign up <a href=\"https:\/\/chat.openai.com\/auth\/login\" target=\"_blank\" rel=\"noopener\">here<\/a>. You will need to provide your email address and (for whatever reason) a phone number. Then think of a password, confirm the email address, and you&#8217;re ready to go.&nbsp;<\/p>\r\n<p>According to OpenAI, there may be waiting times when using the free version. However, I have not had this experience.<\/p>\r\n<p><em>Note: ChatGPT has recently been banned for violations of data and youth protection laws in Italy. So, should you be worried? Everyone has to answer that for themselves. ChatGPT itself points out that you should not enter any sensitive data. My advice is to consider all questions to see if they could draw conclusions about you that you don&#8217;t want drawn.<br><\/em><\/p>\r\n\n<h4 class=\"wp-block-heading\">How is Bing different?<\/h4>\n\n<p>Currently, ChatGPT works with GPT version 3.5. Bing, on the other hand, uses a customized version of GPT-4. I mainly tested ChatGPT, but asked some of the questions to Bing as well for comparison. Bing&#8217;s answers tended to be somewhat shorter, but they contained links to more detailed information more often. Otherwise, the results were similar in both positive and negative aspects. <\/p>\r\n<p>Bing is conveniently accessible via the Edge browser. Just click on the round, blue Bing logo on the far right of the toolbar. Alternatively, there is a <a href=\"https:\/\/play.google.com\/store\/apps\/details?id=com.microsoft.bing&amp;hl=de&amp;gl=US\" target=\"_blank\" rel=\"noopener\">Bing app<\/a> on Google Play.<\/p>\r\n\n<h2 class=\"wp-block-heading\">A first sketch created by ChatGPT<\/h2>\n\n<p>Enough of the introductory words. Now let&#8217;s see what ChatGPT has to offer in terms of Arduino programming:<\/p>\r\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2023\/04\/chatgpt_example_eng.png\"><img decoding=\"async\" src=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2023\/04\/chatgpt_example_eng-1.png\" alt=\"\" class=\"wp-image-17795\"\/><\/a><figcaption class=\"wp-element-caption\">ChatGPT writes a blink sketch<\/figcaption><\/figure>\n\n<p>ChatGPT provides nicely formatted code with comments and additional explanations. With the button &#8220;Copy Code&#8221; you can easily copy the sketch. A promising start, even if the creation of a Blink sketch doesn&#8217;t really require an AI, of course.&nbsp;<\/p>\r\n\n<h2 class=\"wp-block-heading\">The next level: Blink without millis()<\/h2>\n\n<p>To increase the difficulty a bit, I asked ChatGPT if it could provide me with a version of the sketch without <code>delay()<\/code>. Here is the result:<\/p>\r\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-group=\"blink_without_delay.ino\" data-enlighter-title=\"blink_without_delay.ino\">const int ledPin = 13;  \/\/ defines the LED pin number\r\n\r\nunsigned long previousMillis = 0;  \/\/ Variable for storing the last milliseconds\r\nconst long interval = 1000;        \/\/ Blink-Interval in milliseconds\r\n\r\nvoid setup() {\r\n  pinMode(ledPin, OUTPUT);  \/\/ Set LED pin as output\r\n}\r\n\r\nvoid loop() {\r\n  unsigned long currentMillis = millis();  \/\/ Stores the current milliseconds\r\n  \r\n  if (currentMillis - previousMillis &gt;= interval) {  \/\/ Checks if the blink interval has elapsed\r\n    previousMillis = currentMillis;  \/\/ Store the new milliseconds\r\n    \r\n    digitalWrite(ledPin, !digitalRead(ledPin));  \/\/ Toggles the LED (on\/off)\r\n  }\r\n}\r\n<\/pre>\r\n\n<p>Additional comments from ChatGPT:<\/p>\r\n<p><em>In this program, the <code>millis()<\/code> function is used to measure the blink interval. The variable <code>previousMillis<\/code> stores the time of the last blink, and the variable <code>interval<\/code> specifies the desired blink interval. In the <code>loop<\/code>-part, it is checked if the blink interval has elapsed by comparing the difference between the current and the previous milliseconds with the <code>interval<\/code>. When the flashing interval has been reached, the state of the LED is reversed. This will turn the LED on and off.<\/em><\/p>\r\n\n<p>Cool! Apart from the fact that ChatGPT has halved the frequency, everything is correct. At this point, I felt a emerging euphoria.<\/p>\r\n\n<h2 class=\"wp-block-heading\">Top level: Timer and PWM<\/h2>\n\n<p>Now we go one step further and check the capabilities of ChatGPT in relation to the Arduino timers and PWM. If you are interested in this not-so-simple topic, you can take a look at my posts about the <a href=\"https:\/\/wolles-elektronikkiste.de\/en\/timer-and-pwm-part-1-8-bit-timer0-2\" target=\"_blank\" rel=\"noopener\">Timer0\/Timer2<\/a> and the <a href=\"https:\/\/wolles-elektronikkiste.de\/en\/timer-and-pwm-part-2-16-bit-timer1\" target=\"_blank\" rel=\"noopener\">Timer1<\/a>.<\/p>\r\n\n<p>Now my question about this:<em> Could you please write me an Arduino program that generates a PWM signal with a frequency of 1 kilohertz and a duty cycle of 20 percent?<\/em><\/p>\r\n<p>Answer: <em>Yes, here is an example program that generates a PWM signal at pin 9 with a frequency of 1 kHz and a duty cycle of 20%<\/em>:<\/p>\r\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-group=\"pwm_first_try.ino\" data-enlighter-title=\"pwm_first_try.ino\">void setup() {\r\n  pinMode(9, OUTPUT);          \/\/ Sets pin 9 as output\r\n  TCCR1A = _BV(COM1A1) | _BV(WGM11); \/\/ Sets PWM mode\r\n  TCCR1B = _BV(WGM13) | _BV(WGM12) | _BV(CS10); \/\/ Sets fast PWM mode and no prescaler\r\n  OCR1A = 156;                 \/\/ Sets duty cycle to 20% (156 of 255)\r\n}\r\n\r\nvoid loop() {\r\n  \/\/ No code necessary\r\n}\r\n<\/pre>\r\n\n<p>Further comments from ChatGPT:<\/p>\r\n<p><em>In this program, the pinMode function is used to set the digital pin 9 as output. Registers TCCR1A and TCCR1B are configured to set Timer1 to Fast PWM mode and invert the output to generate the PWM signal with a duty cycle of 20%. The OCR1A registers are set to 156, which corresponds to a duty cycle of 20% (156 out of 255). Since the PWM signal generation is done in the setup, no code is needed in the loop part.<\/em><\/p>\r\n<p><strong>This sketch does not work!<\/strong> Some aspects are correct:<\/p>\r\n<ul>\r\n<li>Setting of the Fast PWM mode (14).<\/li>\r\n<li>No prescaler.<\/li>\r\n<li>Output at pin 9 (if there was an output signal!).<\/li>\r\n<\/ul>\r\n<p>But there are also mistakes:<\/p>\r\n<ul>\r\n<li>The calculation of the frequency and duty cycle.<\/li>\r\n<\/ul>\r\n<p>And the statement that 156 out of 255 would result in a duty cycle of 20% is pretty gross nonsense.<\/p>\r\n\n<p>Here we can see a problem with ChatGPT. Its answers sound like irrefutable facts, so you tend to believe everything. So don&#8217;t trust the AI blindly!<\/p>\r\n<p>The correct code would be, by the way:<\/p>\r\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-group=\"correct_timer_pwm.ino\" data-enlighter-title=\"correct_timer_pwm.ino\">void setup() {\r\n  pinMode(9, OUTPUT);          \r\n  TCCR1A = _BV(COM1A1) | _BV(WGM11); \r\n  TCCR1B = _BV(WGM13) | _BV(WGM12) | _BV(CS10); \r\n  ICR1 = 15999;\r\n  OCR1A = 3199;\r\n}\r\n\r\nvoid loop() {\r\n  \/\/ No code needed\r\n}<\/pre>\r\n\n<p>Only a small part is missing, but a very crucial one.<\/p>\r\n\n<h3 class=\"wp-block-heading\">Timer and PWM &#8211; a bit simpler<\/h3>\n\n<p>Well, let&#8217;s make it a little easier for ChatGPT and see if it can help us with the timers and PWM after all.&nbsp; To that end, I asked the following question:&nbsp;<\/p>\r\n\n<p><em>The following code produces a PWM signal with a duty cycle of 20% and a frequency of 1 kHz. Do you know how I need to change it to increase the Duty Cycle to 30% and increase the frequency to 8 kHz?<\/em> &lt;Here I have inserted the code from correct_timer_pwm.ino&gt;.<\/p>\r\n<p>ChatGPT&#8217;s response: <em>Yes, I can help you change the code accordingly. Here is the corrected code with a DutyCycle of 30% and a frequency of 8 kHz:<\/em><\/p>\r\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-group=\"pwm_second_try.ino\" data-enlighter-title=\"pwm_second_try.ino\">void setup(){ \r\n  \/\/ Clear OC1A on Compare Match \/ Set OC1A at Bottom; Wave Form Generator: Fast PWM 14, Top = ICR1\r\n  TCCR1A = (1&lt;&lt;COM1A1) + (1&lt;&lt;WGM11); \r\n  TCCR1B = (1&lt;&lt;WGM13) + (1&lt;&lt;WGM12) + (1&lt;&lt;CS10); \/\/ prescaler = none; \r\n  ICR1 = 1999; \/\/ 8 kHz = 16 MHz \/ (2 * 1 * 2000)\r\n  OCR1A = 599; \/\/ 30% of 1999\r\n  DDRB |= (1&lt;&lt;PB1);\r\n} \r\n\r\nvoid loop() { \r\n  \/\/ do something else\r\n}\r\n<\/pre>\r\n\n<p>In addition, ChatGPT still gave the following explanation:<\/p>\r\n\n<p><em>The changes that have been made are:<\/em><\/p>\r\n<ol>\r\n<li><em>The value of ICR1 was set to 1999 to produce a frequency of 8 kHz. This value was calculated by dividing the desired frequency (8 kHz) by the clock frequency of the Arduino (16 MHz) and then subtracting from this value. The result (1999) was then set to ICR1.<\/em><\/li>\r\n<li><em>The value of OCR1A was set to 599 to generate a Duty Cycle of 30%. This value was calculated by multiplying the maximum counter value (1999) by the desired Duty Cycle (0.3). The result (599.7) was then rounded to the nearest integer and set to OCR1A. <\/em><\/li>\r\n<\/ol>\r\n<p><em>With these changes, the sketch should generate the desired PWM signal.<\/em><\/p>\r\n\n<p><strong>The sketch is correct<\/strong>, but the additional explanations are not quite:<\/p>\r\n<ul>\r\n<li>Not the desired frequency is divided by the clock frequency, but vice versa. And subtracted is only the 1.<\/li>\r\n<li>599 not the nearest integer value of 599.7. A rather minor flaw.<\/li>\r\n<\/ul>\r\n<p>This example shows that it can be worthwhile to specify or rephrase questions once again.<\/p>\r\n\n<h3 class=\"wp-block-heading\">Timer and PWM &#8211; ChatGPT learns!<\/h3>\n\n<p>A few days later, I re-entered the original question (PWM signal, 1 kHz, 20% duty cycle) into a new chat. This time I got:<\/p>\r\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-group=\"pwm_third_try.ino\" data-enlighter-title=\"pwm_third_try.ino\">int outputPin = 9; \/\/ PWM-Ausgangspin\r\nint dutyCycle = 20; \/\/ Duty cycle in percent\r\n\r\nvoid setup() {\r\n  pinMode(outputPin, OUTPUT); \/\/ Set pin to \"output\"\r\n  TCCR1A = _BV(COM1A1) | _BV(WGM11); \/\/ Set PWM mode\r\n  TCCR1B = _BV(WGM13) | _BV(WGM12) | _BV(CS10); \/\/ Set prescaler to 1 and phase-correct PWM\r\n  ICR1 = 1999; \/\/ Set Top to 1999 (1kHz)\r\n}\r\n\r\nvoid loop() {\r\n  int duty = map(dutyCycle, 0, 100, 0, ICR1); \/\/ Calculate duty cycle value\r\n  OCR1A = duty; \/\/ Set duty cycle value\r\n}\r\n<\/pre>\r\n\n<p>The PWM frequency is not correct (8 kHz at 16 MHz system frequency), but the duty cycle is. Assigning the value of OCR1A in <code>loop()<\/code> only makes sense if you want to change it during runtime. But at least, the code is already considerably better than the one I had originally received.&nbsp;<\/p>\r\n\n<h2 class=\"wp-block-heading\">Debugging<\/h2>\n\n<p>ChatGPT can also debug programs. At least this works relatively well for syntax errors, i.e. incorrect spelling. In the case of semantic errors (code compiles, but the sketch doesn&#8217;t do what you wanted) it becomes more difficult because ChatGPT can of course only guess what you actually had in mind.<\/p>\r\n<p>To test ChatGPT, I took a sketch from the Arduino examples and added four errors:<\/p>\r\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-group=\"sketch_with_bugs.ino\" data-enlighter-title=\"sketch_with_bugs.ino\">const int sensorMin = 0;      \r\nconst int sensorMax = 600;    \r\n\r\nvoid setup() {\r\n  \/\/ initialize serial communication:\r\n  Serial.begin(9700);  \/\/ 1\r\n}\r\n\r\nvoid loop() {\r\n  int sensoReading = analogRead(A0); \/\/ 2\r\n  imt range = map(sensorReading, sensorMin, sensorMax, 0, 3);  \/\/ 3\r\n\r\n  switch (range) {\r\n    case 0:  \r\n      Serial.println(\"dark\");\r\n      break;\r\n    case 1:  \r\n      Serial.println(\"dim\");\r\n      break;\r\n    case 2:  \r\n      Serial.println(\"medium\");\r\n      break;\r\n    case 4:  \/\/ 4\r\n      Serial.println(\"bright\");\r\n      break;\r\n  }\r\n  delay(1000); \r\n} <\/pre>\r\n\n<p>Then I asked ChatGPT if it could help me find the errors. The answer was:<\/p>\r\n<p><em>Yes, I can try to help you with the errors in your Arduino code<\/em>.<\/p>\r\n<p><em>Here are some problems I found in your code:<\/em><\/p>\r\n<ol>\r\n<li><em>The Serial.begin command should be 9600 instead of 9700 since this is the default baud rate for Arduino.<\/em><\/li>\r\n<li><em>&#8220;sensoReading&#8221; is misspelled. It should be &#8220;sensorReading&#8221;.<\/em><\/li>\r\n<li><em>The &#8220;int&#8221; in &#8220;int range&#8221; is misspelled. It should be &#8220;int&#8221; instead of &#8220;imt&#8221;.<\/em><\/li>\r\n<li><em>The case &#8220;4&#8221; should be &#8220;3&#8221; to match the number of cases in the switch statement.<\/em><\/li>\r\n<\/ol>\r\n\n<p>Not bad! Errors 2 and 3 would be noticeable by an abort of the compilation. However, errors 1 and 4 would not be reported, so ChatGPT would have been a real help here.<\/p>\r\n\n<h4 class=\"wp-block-heading\">Another error: division by zero<\/h4>\n\n<p>In the following sketch, we divide by zero:<\/p>\r\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-group=\"division_by_zero.ino\" data-enlighter-title=\"division_by_zero.ino\">void setup() {\r\n  Serial.begin(9600);\r\n  const int a = 2;\r\n  const int b = 4;\r\n  \r\n  int c = 42\/(2*a-b);\r\n  Serial.print(\"c = \");\r\n  Serial.println(c);\r\n}\r\n\r\nvoid loop() {}<\/pre>\r\n\n<p>I have asked ChatGPT to find the error. ChatGPT&#8217;s response:<\/p>\r\n<p><em>The program has no obvious error, but it can cause a problem if the value of 2*a-b is zero because then a division by zero occurs and the program crashes. However, since a and b are declared as constants and have fixed values, this should not be a problem.<\/em><\/p>\r\n\n<p>I.e. basically the problem &#8220;division by zero&#8221; was identified; however, ChatGPT did not recognize that &#8220;2*a &#8211; b&#8221; is zero <strong>in every case<\/strong>. The compiler of the Arduino IDE is smarter and gives a corresponding warning.&nbsp;<\/p>\r\n\n<h2 class=\"wp-block-heading\">Controlling modules<\/h2>\n\n<p>Using two examples, let&#8217;s now see if ChatGPT can also help with programming more complex, external components. For this, I chose two quite common sensor modules, namely the ultrasonic distance sensor HC-SR04 and the 9-axis sensor module MPU9250 (acceleration, gyroscope, magnetometer).<\/p>\r\n\n<h3 class=\"wp-block-heading\">Example 1: HC-SR04<\/h3>\n\n<p>My question: <em>Can you write me an Arduino program that measures the distance with a HC-SR04 once per second? If the distance falls below 1.5 meters, an LED at pin 7 should light up for half a second.<\/em><\/p>\r\n\n<p>And here is the sketch from ChatGPT:<\/p>\r\n\n<div class=\"scroll-paragraph\">\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-group=\"hcsr04.ino\" data-enlighter-title=\"hcsr04.ino\">const int trigPin = 2;    \/\/ Definiert die Trig-Pin-Nummer\r\nconst int echoPin = 3;    \/\/ Defines the echo pin number\r\nconst int ledPin = 7;     \/\/ Defines the LED pin number\r\n\r\nvoid setup() {\r\n  pinMode(trigPin, OUTPUT);   \/\/ Sets the trig pin as OUTPUT\r\n  pinMode(echoPin, INPUT);    \/\/ Sets the echo pin as INPUT\r\n  pinMode(ledPin, OUTPUT);    \/\/ Sets the LED pin as OUTPUT\r\n  Serial.begin(9600);         \r\n}\r\n\r\nvoid loop() {\r\n  \/\/ Sends the ultrasonic impulse\r\n  digitalWrite(trigPin, LOW);\r\n  delayMicroseconds(2);\r\n  digitalWrite(trigPin, HIGH);\r\n  delayMicroseconds(10);\r\n  digitalWrite(trigPin, LOW);\r\n  \r\n  \/\/ Reads duration of the echo signal\r\n  long duration = pulseIn(echoPin, HIGH);\r\n  \r\n  \/\/ Calculates the distance base on the echo signal duration\r\n  float distance = duration * 0.034 \/ 2;\r\n  \r\n  \/\/ Checks, if the distance is below 1.5 meters\r\n  if (distance &lt; 1.5) {\r\n    digitalWrite(ledPin, HIGH);    \/\/ LED switched on\r\n    delay(500);                    \/\/ Wait 0.5 seconds\r\n    digitalWrite(ledPin, LOW);     \/\/ LED switched off\r\n  }\r\n  \r\n  \/\/ Outputs the distance on the serial monitor\r\n  Serial.print(\"Distance: \");\r\n  Serial.print(distance);\r\n  Serial.println(\" m\");\r\n  \r\n  \/\/ Wait 1 second\r\n  delay(1000);\r\n}\r\n<\/pre>\r\n<\/div>\r\n\n<p>Not bad! The only mistake is that &#8220;distance&#8221; according to this calculation is in centimeters and not in meters as indicated. After pointing out the error to ChatGPT and asking for a revised version, I received a correct sketch.<\/p>\r\n<p>Bing told me it would not be able to create a sketch for the HC-SR04. At least that was an honest answer!<\/p>\r\n<p>Then I asked ChatGPT if it could supply me with a circuit for the sketch. As usual, ChatGPT started the answer with a confident &#8220;<em>Yes, of course<\/em>&#8220;. Here is the result:<\/p>\r\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">                   +5V\r\n                    |\r\n                    |\r\n                    R1\r\n                    |\r\n                    |\r\nTrig --------------\/\\\/\\\/\\\/\\------------------- Arduino Pin 9\r\n                    |\r\n                    |\r\nEcho --------------\/\\\/\\\/\\\/\\------------------- Arduino Pin 10\r\n                    |\r\n                    |\r\n                    |                   R2\r\n                    |                   |\r\n                    |                   |\r\n                    |                   LED\r\n                    |                   |\r\n                    |                   |\r\n                    --------------------- Arduino Pin 7\r\n                    |\r\n                    |\r\n                   GND\r\n\r\nR1, R2 = ~200 ohms<\/pre>\r\n\n<p>Hmmm, well, let&#8217;s say I know roughly what is meant. Circuits are therefore not a mature feature. <\/p>\r\n\n<h3 class=\"wp-block-heading\">Example 2: MPU9250<\/h3>\n\n<p>Next try, next question: <em>Can you write me a program that determines the acceleration using an MPU9250?<\/em><\/p>\r\n<p>Here is the answer from ChatGPT:<\/p>\r\n\n<div class=\"scroll-paragraph\">\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-group=\"mpu9250.ino\" data-enlighter-title=\"mpu9250.ino\">#include &lt;Wire.h&gt;\r\n#include &lt;MPU9250.h&gt;\r\n\r\nMPU9250 IMU;    \/\/ Creates an object of the MPU9250 class\r\n\r\nvoid setup() {\r\n  Serial.begin(9600);   \/\/ Starts serial communication with 9600 Baud\r\n  Wire.begin();         \/\/ Starts the I2C communication\r\n  IMU.setup();          \/\/ Initializes the MPU9250 sensor\r\n}\r\n\r\nvoid loop() {\r\n  \/\/ Reads the accleration values from the MPU9250 sensor\r\n  IMU.updateAccel();\r\n  float ax = IMU.ax;\r\n  float ay = IMU.ay;\r\n  float az = IMU.az;\r\n  \r\n  \/\/ Outputs the acceleration values on the serial monitor\r\n  Serial.print(\"Acceleration: \");\r\n  Serial.print(ax);\r\n  Serial.print(\" m\/s^2, \");\r\n  Serial.print(ay);\r\n  Serial.print(\" m\/s^2, \");\r\n  Serial.print(az);\r\n  Serial.println(\" m\/s^2\");\r\n  \r\n  \/\/ Waits 100 milliseconds\r\n  delay(100);\r\n}\r\n<\/pre>\r\n<\/div>\r\n\n<p>This is not really useful. The sketch is more of a generic code. I then asked a few follow-up questions, such as which MPU9250 library is meant. I got a concrete answer to this, but the library did not match the code. All further attempts to obtain a working program from ChatGPT by providing assistance also failed.&nbsp;<\/p>\r\n\n<h2 class=\"wp-block-heading\">SPI interfaces ESP32<\/h2>\n\n<p>Topic change. Question: <em>Can you explain to me how to use both SPI interfaces of an ESP32?<\/em><\/p>\r\n<p>Besides some general explanations, ChatGPT answered with an example sketch:<\/p>\r\n\n<div class=\"scroll-paragraph\">\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-group=\"two_spi_interfaces_esp32.ino\" data-enlighter-title=\"two_spi_interfaces_esp32.ino\">#include &lt;SPI.h&gt;\r\n\r\n\/\/ define SPI pins for first interface\r\n#define SCK1 14\r\n#define MISO1 12\r\n#define MOSI1 13\r\n#define SS1 15\r\n\r\n\/\/ define SPI pins for second interface\r\n#define SCK2 18\r\n#define MISO2 19\r\n#define MOSI2 23\r\n#define SS2 5\r\n\r\nvoid setup() {\r\n  Serial.begin(9600);\r\n\r\n  \/\/ initialize the first SPI interface\r\n  SPI.begin(SCK1, MISO1, MOSI1, SS1);\r\n  SPI.setClockDivider(SPI_CLOCK_DIV2);\r\n\r\n  \/\/ initialize the second SPI interface\r\n  SPI.begin(SCK2, MISO2, MOSI2, SS2);\r\n  SPI.setClockDivider(SPI_CLOCK_DIV2);\r\n}\r\n\r\nvoid loop() {\r\n  \/\/ use the first SPI interface\r\n  digitalWrite(SS1, LOW);\r\n  SPI.transfer(0x55);\r\n  digitalWrite(SS1, HIGH);\r\n\r\n  \/\/ use the second SPI interface\r\n  digitalWrite(SS2, LOW);\r\n  SPI.transfer(0xAA);\r\n  digitalWrite(SS2, HIGH);\r\n  \r\n  delay(1000);\r\n}\r\n<\/pre>\r\n<p>&nbsp;<\/p>\r\n<\/div>\r\n\n<p>Parts of the program are fine, but it also contains numerous errors. At least, it doesn&#8217;t work that way. It would take too long to go into the details here. If you&#8217;re interested in the topic, check out my <a href=\"https:\/\/wolles-elektronikkiste.de\/en\/programming-the-esp32-with-arduino-code#SPI\" target=\"_blank\" rel=\"noopener\">post about the ESP32<\/a> or this <a href=\"https:\/\/github.com\/espressif\/arduino-esp32\/blob\/master\/libraries\/SPI\/examples\/SPI_Multiple_Buses\/SPI_Multiple_Buses.ino\" target=\"_blank\" rel=\"noopener\">example sketch<\/a> on GitHub.<\/p>\r\n\n<h2 class=\"wp-block-heading\">More general questions<\/h2>\n\n<p>During the realization of projects, questions may also arise that are not primarily about programming.&nbsp; <\/p>\r\n\n<h3 class=\"wp-block-heading\">MOSFET recommendation<\/h3>\n\n<p>Question: <em>Can you recommend MOSFETs that I can switch directly with a microcontroller?<\/em><\/p>\r\n<p>Response:<\/p>\r\n<p><em>Yes, there are many MOSFETs that can be controlled with a microcontroller. Here are some MOSFETs you can consider:<\/em><\/p>\r\n<ol>\r\n<li><em>IRFZ44N &#8211; This is a popular N-channel MOSFET with a drain-to-source breakdown voltage of 55V and a maximum drain-source current of 49A. It is suitable for a wide range of applications, including motor control and power control.<\/em><\/li>\r\n<li><em>IRLZ44N &#8211; This is a similar MOSFET to the IRFZ44N, but with a lower resistance and gate voltage. It has a drain-to-source breakdown voltage of 55V and a maximum drain-source current of 47A.<\/em><\/li>\r\n<li><em>BSS138 &#8211; This is a small N-channel MOSFET suitable for low power and voltage applications. It has adrain-to-source breakdown voltage of 50V and a maximum drain-source current of 220mA.<\/em><\/li>\r\n<li><em>FQP30N06L &#8211; This is an N-channel MOSFET with a drain-to-source breakdown voltage of 60V and a maximum drain-source current of 32A. It also has a low on-resistance and is suitable for applications such as switching regulators and motor control.<\/em><\/li>\r\n<li><em>IRF3205 &#8211; This is an N-channel MOSFET with a drain-to-source breakdown voltage of 55V and a maximum drain-source current of 110A. It also has low on-resistance and is suitable for high-power applications such as switching regulators and power converters.<\/em><\/li>\r\n<\/ol>\r\n<p><em>Before selecting a MOSFET, make sure that it meets the required specifications for your application and that it is also compatible with the gate voltage of your microcontroller.<\/em><\/p>\r\n\n<p>The answer is not bad, but could be even better. Recommendations 2, 3 and 4 are flawless. Recommendations 1 (IRFZ44N) and 5 (IRF3205), on the other hand, are only suitable to a limited extent, since the limit for the gate voltage of 2-4 volts is quite high. For a 5 volt microcontroller this will work, for a 3.3 volt MCU it might fail. The recommendations IRLZ44N (1-2 volts), BSS138 (0.8 volts) and IRF3205 (1-2.5 V) are better. OK, finally, ChatGPT points out the gate voltage issue. But that&#8217;s precisely why I asked ChatGPT which MOSFETs are <strong>directly<\/strong> controllable with a microcontroller.<\/p>\r\n\n<p>When asked what I should take for a 3.3 volt microcontroller, I received the recommendations IRLZ44N, BSS138 and IRF3708 &#8211; all good! So you have to ask your question as precisely and in detail as possible. There are fuzzy answers to fuzzy questions.<\/p>\r\n\n<h3 class=\"wp-block-heading\">Miscellaneous<\/h3>\n\n<p>I came up with some more questions:<\/p>\r\n\n<ul>\r\n<li>How does the data transmission via SPI work?<\/li>\r\n<li>How much power does an Arduino supply?<\/li>\r\n<li>What is the difference between LGT8F328P and ATmega328P?<\/li>\r\n<li>How do I install an Arduino library?<\/li>\r\n<li>Where can I find the API documentation for the ESP32?<\/li>\r\n<li>How can I invert an electronic signal (High\/Low)?<\/li>\r\n<\/ul>\r\n\n<p>It would be a bit lengthy to go through all the answers in detail. In summary: The answers were all correct! Sometimes they might have been a bit superficial, but in those cases, follow-up questions helped. Many pluses for ChatGPT in this part!<\/p>\r\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n<p>My verdict on ChatGPT&#8217;s (and Bing&#8217;s) Arduino capabilities is mixed:<\/p>\r\n<ul>\r\n<li>ChatGPT can be a help for programming, but the results are to be questioned critically. Getting a completely functional and correct program is a matter of luck. But at least you&#8217;ll get something to build on with a fairly high probability.<\/li>\r\n<li>For general questions about Arduino you get compact answers from ChatGPT. In comparison, Google search requires you to gather information from multiple matches. In this respect, ChatGPT is extremely convenient. However, diversity is lost as ChatGPT makes a selection for you or gives a kind of &#8220;average answer&#8221;.<\/li>\r\n<li>Beginners can especially benefit from ChatGPT. However, this group in particular will find it more difficult to identify incorrect answers. In addition, the learning effect is lower.<\/li>\r\n<li>ChatGPT claims it can do everything. A little less self-confidence or overconfidence would be more appropriate.<\/li>\r\n<li>Unlike real intelligence, ChatGPT does not ask queries to get more details. It tries to make the best of a question, even if it is inaccurate. In this way, the impression is created that the answer is correct in all cases. A human would ask for details or start his answer with &#8220;It depends on if &#8230;&#8221;.<\/li>\r\n<\/ul>\r\n<p>But all bugs, limitations and gaps aside: I am quite impressed with what ChatGPT and Bing are already capable of. And I am convinced that we will see significant progress within a short period of time. It will be very exciting to follow the further development.<\/p>\r\n\n<h2 class=\"wp-block-heading\">Appendix: back to the core competencies of ChatGPT<\/h2>\n\n<p>Finally, a bit of fun and the things ChatGPT is great at. I asked ChatGPT to write a funny poem about the Arduino in English. Here is the result:<\/p>\r\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2023\/04\/arduino_poem.png\"><img loading=\"lazy\" decoding=\"async\" width=\"660\" height=\"483\" src=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2023\/04\/arduino_poem.png\" alt=\"ChatGPT poetry\" class=\"wp-image-17913\" srcset=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2023\/04\/arduino_poem.png 660w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2023\/04\/arduino_poem-300x220.png 300w\" sizes=\"auto, (max-width: 660px) 100vw, 660px\" \/><\/a><figcaption class=\"wp-element-caption\">ChatGPT poetry<\/figcaption><\/figure>\n<\/div>\n<p>Not 100% perfect, but almost. I couldn&#8217;t do that &#8211; and certainly not in a few seconds!<\/p>\r\n","protected":false},"excerpt":{"rendered":"<p>ChatGPT is THE topic par excellence at the moment. And one reads that ChatGPT can even program. That, and how else this AI can help us with Arduino projects, is what we&#8217;ll review in this post.<\/p>\n","protected":false},"author":1,"featured_media":17838,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[575],"tags":[2092,556,2098,2091,2090,2093,2089,2096,2095,2094,2097],"class_list":["post-17908","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-software-and-tools","tag-ai","tag-arduino-en-2","tag-artificial-intelligence","tag-bard-en","tag-bing-en","tag-chatbot-en","tag-chatgpt-en","tag-debugging-en-2","tag-gpt-3-5-en","tag-gpt-4-en","tag-program"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Using ChatGPT and Bing for Arduino &#8226; Wolles Elektronikkiste<\/title>\n<meta name=\"description\" content=\"One reads that ChatGPT can program. That, and how else this AI can help us with Arduino projects, is what we&#039;ll review in this post.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/wolles-elektronikkiste.de\/en\/using-chatgpt-and-bing-for-arduino\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Using ChatGPT and Bing for Arduino &#8226; Wolles Elektronikkiste\" \/>\n<meta property=\"og:description\" content=\"One reads that ChatGPT can program. That, and how else this AI can help us with Arduino projects, is what we&#039;ll review in this post.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/wolles-elektronikkiste.de\/en\/using-chatgpt-and-bing-for-arduino\" \/>\n<meta property=\"og:site_name\" content=\"Wolles Elektronikkiste\" \/>\n<meta property=\"article:published_time\" content=\"2023-04-21T21:55:54+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-11-30T22:08:47+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2023\/04\/post_image_chatgpt.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"1024\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Wolfgang Ewald\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Wolfgang Ewald\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"18 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/using-chatgpt-and-bing-for-arduino#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/using-chatgpt-and-bing-for-arduino\"},\"author\":{\"name\":\"Wolfgang Ewald\",\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en#\\\/schema\\\/person\\\/b774e4d64b4766889a2f7c6e5ec85b46\"},\"headline\":\"Using ChatGPT and Bing for Arduino\",\"datePublished\":\"2023-04-21T21:55:54+00:00\",\"dateModified\":\"2023-11-30T22:08:47+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/using-chatgpt-and-bing-for-arduino\"},\"wordCount\":2941,\"commentCount\":4,\"publisher\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en#\\\/schema\\\/person\\\/b774e4d64b4766889a2f7c6e5ec85b46\"},\"image\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/using-chatgpt-and-bing-for-arduino#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/wp-content\\\/uploads\\\/2023\\\/04\\\/post_image_chatgpt.jpg\",\"keywords\":[\"AI\",\"Arduino\",\"artificial intelligence\",\"Bard\",\"Bing\",\"chatbot\",\"ChatGPT\",\"debugging\",\"GPT 3.5\",\"GPT-4\",\"program\"],\"articleSection\":[\"Software and tools\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/using-chatgpt-and-bing-for-arduino#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/using-chatgpt-and-bing-for-arduino\",\"url\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/using-chatgpt-and-bing-for-arduino\",\"name\":\"Using ChatGPT and Bing for Arduino &#8226; Wolles Elektronikkiste\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/using-chatgpt-and-bing-for-arduino#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/using-chatgpt-and-bing-for-arduino#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/wp-content\\\/uploads\\\/2023\\\/04\\\/post_image_chatgpt.jpg\",\"datePublished\":\"2023-04-21T21:55:54+00:00\",\"dateModified\":\"2023-11-30T22:08:47+00:00\",\"description\":\"One reads that ChatGPT can program. That, and how else this AI can help us with Arduino projects, is what we'll review in this post.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/using-chatgpt-and-bing-for-arduino#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/using-chatgpt-and-bing-for-arduino\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/using-chatgpt-and-bing-for-arduino#primaryimage\",\"url\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/wp-content\\\/uploads\\\/2023\\\/04\\\/post_image_chatgpt.jpg\",\"contentUrl\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/wp-content\\\/uploads\\\/2023\\\/04\\\/post_image_chatgpt.jpg\",\"width\":1024,\"height\":1024},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/using-chatgpt-and-bing-for-arduino#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Startseite\",\"item\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Using ChatGPT and Bing for Arduino\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en#website\",\"url\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\",\"name\":\"Wolles Elektronikkiste\",\"description\":\"Die wunderbare Welt der Elektronik\",\"publisher\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en#\\\/schema\\\/person\\\/b774e4d64b4766889a2f7c6e5ec85b46\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en#\\\/schema\\\/person\\\/b774e4d64b4766889a2f7c6e5ec85b46\",\"name\":\"Wolfgang Ewald\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/wp-content\\\/uploads\\\/2019\\\/03\\\/cropped-Logo-1.png\",\"url\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/wp-content\\\/uploads\\\/2019\\\/03\\\/cropped-Logo-1.png\",\"contentUrl\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/wp-content\\\/uploads\\\/2019\\\/03\\\/cropped-Logo-1.png\",\"width\":512,\"height\":512,\"caption\":\"Wolfgang Ewald\"},\"logo\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/wp-content\\\/uploads\\\/2019\\\/03\\\/cropped-Logo-1.png\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Using ChatGPT and Bing for Arduino &#8226; Wolles Elektronikkiste","description":"One reads that ChatGPT can program. That, and how else this AI can help us with Arduino projects, is what we'll review in this post.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/wolles-elektronikkiste.de\/en\/using-chatgpt-and-bing-for-arduino","og_locale":"en_US","og_type":"article","og_title":"Using ChatGPT and Bing for Arduino &#8226; Wolles Elektronikkiste","og_description":"One reads that ChatGPT can program. That, and how else this AI can help us with Arduino projects, is what we'll review in this post.","og_url":"https:\/\/wolles-elektronikkiste.de\/en\/using-chatgpt-and-bing-for-arduino","og_site_name":"Wolles Elektronikkiste","article_published_time":"2023-04-21T21:55:54+00:00","article_modified_time":"2023-11-30T22:08:47+00:00","og_image":[{"width":1024,"height":1024,"url":"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2023\/04\/post_image_chatgpt.jpg","type":"image\/jpeg"}],"author":"Wolfgang Ewald","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Wolfgang Ewald","Est. reading time":"18 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/wolles-elektronikkiste.de\/en\/using-chatgpt-and-bing-for-arduino#article","isPartOf":{"@id":"https:\/\/wolles-elektronikkiste.de\/en\/using-chatgpt-and-bing-for-arduino"},"author":{"name":"Wolfgang Ewald","@id":"https:\/\/wolles-elektronikkiste.de\/en#\/schema\/person\/b774e4d64b4766889a2f7c6e5ec85b46"},"headline":"Using ChatGPT and Bing for Arduino","datePublished":"2023-04-21T21:55:54+00:00","dateModified":"2023-11-30T22:08:47+00:00","mainEntityOfPage":{"@id":"https:\/\/wolles-elektronikkiste.de\/en\/using-chatgpt-and-bing-for-arduino"},"wordCount":2941,"commentCount":4,"publisher":{"@id":"https:\/\/wolles-elektronikkiste.de\/en#\/schema\/person\/b774e4d64b4766889a2f7c6e5ec85b46"},"image":{"@id":"https:\/\/wolles-elektronikkiste.de\/en\/using-chatgpt-and-bing-for-arduino#primaryimage"},"thumbnailUrl":"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2023\/04\/post_image_chatgpt.jpg","keywords":["AI","Arduino","artificial intelligence","Bard","Bing","chatbot","ChatGPT","debugging","GPT 3.5","GPT-4","program"],"articleSection":["Software and tools"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/wolles-elektronikkiste.de\/en\/using-chatgpt-and-bing-for-arduino#respond"]}]},{"@type":"WebPage","@id":"https:\/\/wolles-elektronikkiste.de\/en\/using-chatgpt-and-bing-for-arduino","url":"https:\/\/wolles-elektronikkiste.de\/en\/using-chatgpt-and-bing-for-arduino","name":"Using ChatGPT and Bing for Arduino &#8226; Wolles Elektronikkiste","isPartOf":{"@id":"https:\/\/wolles-elektronikkiste.de\/en#website"},"primaryImageOfPage":{"@id":"https:\/\/wolles-elektronikkiste.de\/en\/using-chatgpt-and-bing-for-arduino#primaryimage"},"image":{"@id":"https:\/\/wolles-elektronikkiste.de\/en\/using-chatgpt-and-bing-for-arduino#primaryimage"},"thumbnailUrl":"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2023\/04\/post_image_chatgpt.jpg","datePublished":"2023-04-21T21:55:54+00:00","dateModified":"2023-11-30T22:08:47+00:00","description":"One reads that ChatGPT can program. That, and how else this AI can help us with Arduino projects, is what we'll review in this post.","breadcrumb":{"@id":"https:\/\/wolles-elektronikkiste.de\/en\/using-chatgpt-and-bing-for-arduino#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/wolles-elektronikkiste.de\/en\/using-chatgpt-and-bing-for-arduino"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/wolles-elektronikkiste.de\/en\/using-chatgpt-and-bing-for-arduino#primaryimage","url":"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2023\/04\/post_image_chatgpt.jpg","contentUrl":"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2023\/04\/post_image_chatgpt.jpg","width":1024,"height":1024},{"@type":"BreadcrumbList","@id":"https:\/\/wolles-elektronikkiste.de\/en\/using-chatgpt-and-bing-for-arduino#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Startseite","item":"https:\/\/wolles-elektronikkiste.de\/en"},{"@type":"ListItem","position":2,"name":"Using ChatGPT and Bing for Arduino"}]},{"@type":"WebSite","@id":"https:\/\/wolles-elektronikkiste.de\/en#website","url":"https:\/\/wolles-elektronikkiste.de\/en","name":"Wolles Elektronikkiste","description":"Die wunderbare Welt der Elektronik","publisher":{"@id":"https:\/\/wolles-elektronikkiste.de\/en#\/schema\/person\/b774e4d64b4766889a2f7c6e5ec85b46"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/wolles-elektronikkiste.de\/en?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/wolles-elektronikkiste.de\/en#\/schema\/person\/b774e4d64b4766889a2f7c6e5ec85b46","name":"Wolfgang Ewald","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/03\/cropped-Logo-1.png","url":"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/03\/cropped-Logo-1.png","contentUrl":"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/03\/cropped-Logo-1.png","width":512,"height":512,"caption":"Wolfgang Ewald"},"logo":{"@id":"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/03\/cropped-Logo-1.png"}}]}},"_links":{"self":[{"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/posts\/17908","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/comments?post=17908"}],"version-history":[{"count":0,"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/posts\/17908\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/media\/17838"}],"wp:attachment":[{"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/media?parent=17908"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/categories?post=17908"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/tags?post=17908"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}