Feed on
Posts
Comments

Fun with ChatGPT

Unless if you’ve been living under a rock, you’ve probably heard of ChatGPT by now, if you haven’t given it a try yet. Over this past weekend, I’ve had some fun with it. Not only it’s amazingly good at writing text description, but it can write programming solutions too. Here are just a few things I asked it to do.

Ray: tell me about opensprinkler

ChatGPT: OpenSprinkler is an open-source, web-based sprinkler controller for watering gardens, lawns, and other outdoor areas. It allows users to automate their irrigation systems and customize watering schedules through a web interface or a smartphone app. The controller can be programmed to turn on and off sprinkler valves at specified times, and can also be integrated with weather data to adjust watering schedules based on local weather conditions. OpenSprinkler is designed to be easy to install and use, and is compatible with a wide range of sprinkler valve systems.

Ray: tell me more about opensprinkler

ChatGPT:

OpenSprinkler is a sprinkler controller that allows users to automate their irrigation systems and customize watering schedules through a web interface or a smartphone app. The controller is connected to a network and can be accessed remotely, allowing users to control their irrigation systems from anywhere with an internet connection.

In addition to being able to set custom watering schedules, OpenSprinkler also offers a number of advanced features that make it easy to optimize watering schedules and conserve water. For example, the controller can be programmed to turn on and off sprinkler valves based on local weather data, such as temperature, humidity, and precipitation. This helps ensure that plants are watered at the optimal times, while also minimizing water waste.

OpenSprinkler is compatible with a wide range of sprinkler valve systems, making it a versatile choice for homeowners and gardeners. It is also easy to install and use, with a user-friendly interface that makes it easy to set up and customize watering schedules.

Overall, OpenSprinkler is a useful tool for automating and optimizing irrigation systems, and can help homeowners and gardeners save time and resources by ensuring that their plants are watered efficiently.

Ray: tell me about opengarage

ChatGPT:

OpenGarage is an open-source, WiFi-enabled garage door opener that allows users to remotely control their garage doors using a web interface or smartphone app. It consists of a microcontroller board with an embedded web server and a relay, which is used to activate the garage door opener.

Users can access the OpenGarage controller through a web interface or smartphone app to open and close the garage door, as well as set custom schedules and receive notifications when the garage door is opened or closed. The controller can also be integrated with other smart home devices, such as home security systems or smart lights, allowing users to automate their garage door functions and create custom scenes.

OpenGarage is designed to be easy to install and use, with a user-friendly interface and a range of customization options. It is also open-source, which means that the software is freely available for users to modify and customize to meet their specific needs.

Overall, OpenGarage is a useful tool for automating and controlling garage doors, and can help users save time and effort by allowing them to remotely access their garages from anywhere with an internet connection.

Ray: what’s unique about opengarage

OpenGarage is an open-source, WiFi-enabled garage door opener that offers a number of unique features and benefits compared to other garage door openers on the market. Some of the key features and benefits of OpenGarage include:

  1. Open-source: One of the key features of OpenGarage is that it is open-source, which means that the software is freely available for users to modify and customize to meet their specific needs. This allows users to easily add custom features or modify the controller to work with specific garage door systems.
  2. Remote access: OpenGarage can be accessed remotely through a web interface or smartphone app, which allows users to control their garage doors from anywhere with an internet connection.
  3. Customization: OpenGarage offers a wide range of customization options, including the ability to set custom schedules, receive notifications when the garage door is opened or closed, and integrate with other smart home devices. This makes it easy for users to automate their garage door functions and create custom scenes.
  4. Compatibility: OpenGarage is compatible with a wide range of garage door systems, making it a versatile choice for homeowners.
  5. User-friendly interface: OpenGarage has a user-friendly interface that makes it easy to set up and customize garage door functions, even for users who are not technically proficient.

Overall, OpenGarage is a powerful and flexible garage door opener that offers a wide range of features and customization options to help users automate and control their garage doors.


As you can see from above, it’s really quite good at generating text descriptions. What’s more incredible is its ability to generate programming code. For example:

Ray: write a jquery program with three buttons, when the first button is clicked, draw a circle, when the second button is clicked, draw a square, when the third button is clicked, draw a face

In this case, the chat engine stopped a few times, and I had to type ‘continue’ to let it finish the program. But after it’s done, it generated a proper Javascript program, when you run it, it pops up the following interface. The circle and square are both drawn perfectly, the face is a bit of a failure, but it’s amusing to see it even produced comments in the code to document how the code draws a face.

I was pretty mind-blown by its capability. As a text generation engine, it’s clearly not just memorizing things, because if you ask it the same question again it will give you a somewhat different answer. I’ve also tried a number of other things, as listed below. Some are more successful than the others.

  • tell me about opensprinkler, in Shakespeare style
  • write instructions to create an IFTTT applet for OpenSprinkler
  • write an Arduino program for ESP8266 to connect to opensprinkler.com
  • write an Arduino program for ENC28J60
  • write a C++ program that uses a circular queue to implement a log

If you want to make changes or correct any mistakes, you can have a conversation with it. Such as ‘change the variable x to y’; ‘rewrite the second paragraph to use less words’, ‘your circular queue implementation is wrong, blah blah blah’.

To a University Professor like me, this is going to have a profound impact on how classes are to be taught, how homework is to be assigned, and how cheating cases are to be detected in the future. I mean, not only it can produce essays, but it can generated reasonably complex program code. A lot of the introductory level programming tasks can be easily solved by it. Well, at least for now, I am glad we can leverage this incredible tool for ourselves to write text descriptions, instructions, and sample programs. Have fun with it!

Leave a Reply