Merge branch 'release' into main

This commit is contained in:
Hans Haupt
2024-06-14 10:07:56 +02:00
39 changed files with 1375 additions and 1000 deletions

View File

@ -112,6 +112,8 @@ A german documentation will be provided but does not replace the english documen
### Documentation
Documentation of the Software and Hardware can be found at https://docs.dezibot.de/
#### .h Files
```C++
@ -148,42 +150,21 @@ For instance, in `src/Dezibot.h`, to include `src/motion/Motion.h`, you should w
* Upload Mode: "UART0 / Hardware CDC"
* USB Mode: "Hardware CDC and JTAG"
* Programmer: "Esptool"
* USB CDC on Boot: Enabled
Using `arduino-cli` to compile and upload:
`arduino-cli upload /Users/jo/Documents/Arduino/theSketch -p /dev/cu.usbmodem101 -b esp32:esp32:nora_w10`
`arduino-cli compile /Users/jo/Documents/Arduino/theSketch -p /dev/cu.usbmodem101 -b esp32:esp32:nora_w10`
#### Display
##### Including Library
It is important to specify the SDA and SCL ports by using `Wire.begin(SDA, SCL)`.
Arduino IDE -> Sketch -> Include Library -> add .ZIP Library -> this library
```c++
#include <Wire.h>
#include <Adafruit_SSD1306.h>
If there is any other error like 'Painless_Mesh' not found, you have to include this library also.
#define SCREEN_WIDTH 128
#define SCREEN_HEIGHT 64
Arduino IDE -> Sketch -> Manage Library -> Search for missing Library
#define OLED_RESET -1
#define SCREEN_ADDRESS 0x3C
#### Start from Scratch
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);
It is important, before using any functions of Dezibot, to call ```dezibot.begin()``` once in the setup function.
void Dezibot::begin(void) {
Wire.begin(1, 2);
if (!display.begin(SSD1306_SWITCHCAPVCC, SCREEN_ADDRESS)) {
// Serial.println("SSD1306 allocation failed");
for (;;); // Don't proceed, loop forever
}
// Draw a single pixel in white
display.drawPixel(10, 10, SSD1306_WHITE);
// Show the display buffer on the screen. You MUST call display() after
// drawing commands to make them visible on screen!
display.display();
vTaskDelay(2000);
}
```
In the examples folder, a sketch ``start`` is provided, that handles the initialization.