arduino / arduino/Arduino

Display sketch doesn't work correctly after updating from Arduino IDE 1.8.5

Open
#10,106 0 comments 1 reaction 0 assignees View on GitHub
Architecture: AVR Component: Core Type: Bug
Dominant language
Java
Stars
14.6k
Forks
7k
PR merge metrics
No merged PRs in 30d

Description

The compiler error (presumably) was revealed in process of working with the screen SDD1351. In Arduino version 1.8.5, the code "Work185notWork186and1812" works fine, but in version 1.8.6 and up to the current version this code does not work correctly causing problems with displaying and blurring the image on the screen. This problem in versions above 1.8.6 is solved by adding the following lines of code, as an illogical "mantra":
```c++
millis ();
millis ();
millis ();
tft.fillRect (0, 0, 128, 128, BLACK);
tft.fillScreen (BLACK);
int color = 100;
for (int i = 0; i <= 24; i ++) {
tft.drawRoundRect (0, 0, 0, 0, 5, color);
color + = 1100;
}
static const uint16_t PROGMEM colors [] = {GREEN, WHITE};
for (uint8_t c = 0; c <2; c ++) {
tft.fillRect (0, tft.height () * c / 8, tft.width (), tft.height () / 8,
pgm_read_word (& colors [c]));
}
```
After that, the monitor starts working normally, but these are unnecessary lines of code, which should not be. This abnormal behavior occurs during the compilation of the program on the board.

[Work185notWork186and1812.txt](https://github.com/arduino/Arduino/files/4545403/Work185notWork186and1812.txt)

[Workon187and1812withunnecessarycode.txt](https://github.com/arduino/Arduino/files/4545411/Workon187and1812withunnecessarycode.txt)

Contributor guide

Open the contributing guide

Research direction

Compare the attached Work185notWork186and1812.txt and Workon187and1812withunnecessarycode.txt sketches, then reproduce the display issue with the SDD1351 screen across the stated Arduino IDE versions. Trace the compiler or board behavior responsible for the blurred image; done means the sketch displays correctly without the added workaround lines.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
embedded-iot
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.