This commit is contained in:
2025-05-06 16:22:31 +02:00
parent a20e4ef745
commit ef8daf1a2a

View File

@@ -425,7 +425,7 @@ This is the full code of the screen. The schematic for the pcb can be found in [
## Turning it into a library ## Turning it into a library
So I asked Copilot (Claude 3.7 Sonnet) to turn this above into a library. Using this prompt "turn the screen thing into a library so i can easily create menus and stuff" and using the context from my files it came up with this broken and oversized mess. So I asked Copilot (Claude 3.7 Sonnet) to turn this above into a library. Using this prompt "turn the screen thing into a library so i can easily create menus and stuff" and using the context from my files it came up with this broken and oversized mess.
??? Failure.cpp ??? Failure
```cpp ```cpp
#ifndef OLED_MENU_H #ifndef OLED_MENU_H
#define OLED_MENU_H #define OLED_MENU_H
@@ -518,7 +518,7 @@ So I asked Copilot (Claude 3.7 Sonnet) to turn this above into a library. Using
#endif // OLED_MENU_H #endif // OLED_MENU_H
``` ```
??? Failure.h ??? Failure
```cpp ```cpp
#include "OLEDMenu.h" #include "OLEDMenu.h"
@@ -733,7 +733,7 @@ So I asked Copilot (Claude 3.7 Sonnet) to turn this above into a library. Using
Then I asked it to rewrite it and make it simpler and to add in a way to call functions using these menu tabs and to use the original graphics. Then I asked it to rewrite it and make it simpler and to add in a way to call functions using these menu tabs and to use the original graphics.
Then it came up with this Then it came up with this
??? AI generated.cpp ??? AIgenerated
```cpp ```cpp
#include "MenuSystem.h" #include "MenuSystem.h"
#include "MenuGraphics.h" #include "MenuGraphics.h"
@@ -896,7 +896,7 @@ Then it came up with this
``` ```
??? AI generated.h ??? AIgenerated
```cpp ```cpp
#ifndef MENU_SYSTEM_H #ifndef MENU_SYSTEM_H
#define MENU_SYSTEM_H #define MENU_SYSTEM_H
@@ -959,7 +959,7 @@ Then it came up with this
``` ```
Which worked really well with my code Which worked really well with my code
??? My code ??? example
```cpp ```cpp
#include <Arduino.h> #include <Arduino.h>
#include <Wire.h> #include <Wire.h>