Compare commits

...
2 Commits
Author SHA1 Message Date
Michel 1bcf5ad7a9 Made code working for the Waveshare Pico OLED 2.23. 2023-12-15 23:06:36 +01:00
Michel afcb74c123 Rebuild for PlatformIO 2023-12-15 22:51:06 +01:00
5 changed files with 815 additions and 792 deletions
+5
View File
@@ -0,0 +1,5 @@
.pio
.vscode/.browse.c_cpp.db*
.vscode/c_cpp_properties.json
.vscode/launch.json
.vscode/ipch
+10
View File
@@ -0,0 +1,10 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"platformio.platformio-ide"
],
"unwantedRecommendations": [
"ms-vscode.cpptools-extension-pack"
]
}
+1
View File
@@ -1,6 +1,7 @@
# Arduino OLED Animations # Arduino OLED Animations
Arduino OLED Animations Arduino OLED Animations
Rebuild for use with [PlatformIO](https://platformio.org/) using a [Raspberry Pi Pico](https://www.raspberrypi.com/products/raspberry-pi-pico/) with the [Waveshare Pico OLED 2.23](https://www.waveshare.com/wiki/Pico-OLED-2.23).
**YOUTUBE VIDEO: https://youtu.be/o3PhC_VJdXo** **YOUTUBE VIDEO: https://youtu.be/o3PhC_VJdXo**
+6
View File
@@ -0,0 +1,6 @@
[env:pico]
platform = raspberrypi
board = pico
framework = arduino
lib_deps =
olikraus/U8g2@^2.35.8
@@ -36,7 +36,8 @@
#include <U8g2lib.h> #include <U8g2lib.h>
#include <Wire.h> // library required for IIC communication #include <Wire.h> // library required for IIC communication
U8G2_SSD1306_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); // initialization for the used OLED display //U8G2_SSD1306_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); // initialization for the used OLED display
U8G2_SSD1305_128X32_ADAFRUIT_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/10, /* data=*/11, /* cs=*/9, /* dc=*/8, /* reset=*/12);
// the arrays below are generated from the image2cpp tool, scroll down for the actual code // the arrays below are generated from the image2cpp tool, scroll down for the actual code
@@ -783,7 +784,7 @@ void setup(void) {
void loop(void) { void loop(void) {
u8g2.clearBuffer(); // clear the internal memory u8g2.clearBuffer(); // clear the internal memory
u8g2.drawXBMP(39, 7, 50, 50, epd_bitmap_allArray[counter]); // draw frame of the animation u8g2.drawXBMP(39, -10, 50, 50, epd_bitmap_allArray[counter]); // draw frame of the animation
u8g2.sendBuffer(); // transfer internal memory to the display u8g2.sendBuffer(); // transfer internal memory to the display
counter = (counter + 1) % 28; // increase the counter, but always go between 0-27 counter = (counter + 1) % 28; // increase the counter, but always go between 0-27