Uploaded February 2022 | Updated September 2026, 6 hours ago
Today we will be writing a #subscription counter on a tint #TTGO module that runs an #ESP32
We will be writing it in #Arduino C++ and have a close look at this cute little #embedded system! And learn how to query Youtube's API
Code: github.com/rdoetjes/ytcounter
TTGO T (4MB flash): https://www.tinytronics.nl/shop/en/development-boards/microcontroller-boards/with-wi-fi/lilygo-ttgo-t-display-v1.1-esp32-with-1.14-inch-tft-display
TTGO T (16MB flash): https://opencircuit.nl/product/ttgo-t-display-v1.1-esp32-1.14-inch-tft-16mb
Today we will be writing a #subscription counter on a tint #TTGO module that runs an #ESP32
We will be writing it in #Arduino C++ and have a close look at this cute little #embedded system! And learn how to query Youtube's API
Code: github.com/rdoetjes/ytcounter
TTGO T (4MB flash): https://www.tinytronics.nl/shop/en/development-boards/microcontroller-boards/with-wi-fi/lilygo-ttgo-t-display-v1.1-esp32-with-1.14-inch-tft-display
TTGO T (16MB flash): https://opencircuit.nl/product/ttgo-t-display-v1.1-esp32-1.14-inch-tft-16mb










![MAKING A CHATBOT IN ZIG (OpenAI API consumption)
Today we will learn how to consume APIs in #Zig we learn how to consume an #APIs using #TLS #HTTPS and Bearer token, specifically OpenAI, which we will use to make a simple REPL based chat bot.
The code:
https://github.com/rdoetjes/tuts/tree/main/zig-https-openai
NOTES: This is a basic single answer and forget bot. If you want to keep the actual chat state like you see in ChatGPT, you would feed the answers back into the message with the role assistant, you answers with the role user. System role is used to set up the basic state like: Answer in a way like the character Leisure Suite Larry, you keep things light and full of innuendo.
This is an idea I am working on an interactive adventure
{
model: gpt-4,
messages: [
{role: system, content: You are an assistant guiding the user through an interactive adventure.},
{role: user, content: I enter the room and see a sword on a pedestal.},
{role: assistant, content: The sword gleams under the light. Its beautifully crafted, with a silver hilt.},
{role: user, content: I take the sword.},
{role: assistant, content: You now have the sword in your possession.},
{role: user, content: I walk towards the door with the sword in hand.},
{role: assistant, content: You feel empowered as you walk towards the door, the sword glimmering in your hand.}
]
}
Chapters:
00:00 Introduction
02:13 Coding one page API request
19:48 Running the debugged code
20:31 Going through the OpenAI API abstraction code
25:05 Demo chatbot MAKING A CHATBOT IN ZIG (OpenAI API consumption)](https://i.ytimg.com/vi/WzGgepdA1lU/mqdefault.jpg)