Skip to content
This repository has been archived by the owner on Aug 27, 2023. It is now read-only.

Infinite connecting to slicer when i2c SSD1306 is enabled #333

Open
malketiya opened this issue May 16, 2023 · 0 comments
Open

Infinite connecting to slicer when i2c SSD1306 is enabled #333

malketiya opened this issue May 16, 2023 · 0 comments

Comments

@malketiya
Copy link

Hello. I am trying to compile the firmware for a 32x128 OLED display with i2c.
Upon completion of code generation, it says that everything is normall.
When I try to connect to Pronterface it keeps connecting endlessly.
In the display.h file I have changed adress:

#if defined DISPLAY_TYPE_SSD1306
#define DISPLAY_I2C_ADDRESS         0x3C

Then I go to display_ssd1306.c and there missed bracket or not?

  default:
          // Should be a printable character.
          index = data - 0x20;
          // Write pixels command.
          displaybus_write(0x40, 0);
          // Send the character bitmap.
          #ifdef FONT_IS_PROPORTIONAL
            for (i = 0; i < pgm_read_byte(&font[index].columns); i++) {   // <--- here start
          #else
            for (i = 0; i < FONT_COLUMNS; i++) {
          #endif
              displaybus_write(pgm_read_byte(&font[index].data[i]), 0);
          }
          // Send space between characters.
          for (i = 0; i < FONT_SYMBOL_SPACE; i++) {
            displaybus_write(0x00, (i == FONT_SYMBOL_SPACE - 1));
          }
          break;
      }                                                      // <--- here end

I am bad programmer, maybe I something do wrong.
Sorry for my English. Maybe somebody can help me?
I will be very gratefull

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

No branches or pull requests

1 participant