Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GEOMETRY_64_48 and drawStringf method added #198

Merged
merged 9 commits into from
Nov 16, 2020

Conversation

thorsten-l
Copy link
Contributor

I did only to few little changes to get my 64x48 Shield working and i really needed the possibility to do a 'printf' like formatted output. So i implemented a drawStringf method.

@stale
Copy link

stale bot commented May 18, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label May 18, 2019
@Testato
Copy link

Testato commented May 19, 2019

This PR solve the Issue #73
Please accept it

@stale stale bot removed the wontfix label May 19, 2019
@Testato Testato mentioned this pull request May 19, 2019
@marcelstoer
Copy link
Member

@thorsten-l sorry the PRs weren't processed in due time over the last year. Can I ask you to resolve the conflicts in src/OLEDDisplay.cpp? I had to merge a large PR from @helmut64 first, sorry.

this->displayWidth = 128;
this->displayHeight = 32;
break;
case GEOMETRY_64_48:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please fix the formatting in this switch statement (indentation), thanks.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you please approve this change request? it has been opened since 2018 and it basically works...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I approved it a year ago and we would have merged it if all feedback had been addressed or if we had been given permission to edit the file in question ourselves.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey Marcel,
thanks for replying.
Isn't the only todo open: to fix the indenting of one code block?

Cheers
l.

@stale stale bot added the stale label Dec 9, 2019
@stale stale bot closed this Dec 23, 2019
@LennartHennigs
Copy link

please reopen this PR and accept the fix

@ThingPulse ThingPulse deleted a comment from stale bot Nov 9, 2020
@marcelstoer marcelstoer removed the stale label Nov 9, 2020
@marcelstoer marcelstoer reopened this Nov 9, 2020
@marcelstoer marcelstoer merged commit 9520e17 into ThingPulse:master Nov 16, 2020
@rin67630
Copy link

rin67630 commented Nov 27, 2020

MiniOLED is perfectly working , but DrawStringf is only documented, does not compile...
Can we hope for a Christmas gift?

@thorsten-l
Copy link
Contributor Author

thorsten-l commented Nov 27, 2020

#include <Arduino.h>
#include <SSD1306Brzo.h>

SSD1306Brzo display(0x3c, D2, D1, GEOMETRY_64_48 );

static char buffer[32];
static unsigned long counter;

void setup() {
  Serial.begin(115200);
  counter = 0l;
  display.init();
  display.flipScreenVertically();
}

void loop() {
  Serial.printf( "c=%lu\n", counter );
  display.clear();
  display.drawStringf( 10, 10, buffer, "c=%lu", counter );
                            // ^^^^^^ shared buffer to save memory
  display.display();
  delay( 1000 );
  counter++;
}

I just compiled and run this sample code successfully, with PlatformIO.

@thorsten-l
Copy link
Contributor Author

[env:d1_mini]
platform = espressif8266
board = d1_mini
framework = arduino

lib_deps = 
  Brzo [email protected]
  https://github.com/ThingPulse/esp8266-oled-ssd1306

monitor_speed = 115200
upload_speed = 230400

with this platformio.ini file

@marcelstoer
Copy link
Member

Thank you Thorsten 👍 🥇

@thorsten-l
Copy link
Contributor Author

ESP-SSD1306-DrawStringf-Sample
A tiny bit more complex sample for drawStringf. Successfully tested with ESP8266 (D1 mini) and ESP32 (LOLIN32).
To give you a complete sample project.

@marcelstoer
Copy link
Member

Way cool Thorsten! Thanks again for offering such excellent user support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants