ST7735 error

Hello to all , I have 1.8TFTSPI screen ( KMR-1.8 SPI ) for which I wrote a sketch some months ago without problems . I used the sketch several times with the same kind of screen and the same kind of UNO. Today I tried to load the sketch again and received following mistakes . I downloaded the latest Adafruit for ST-7735 but got the same results.

I reinstalled ARDUINO-IDE but improvement.

I do not understand the fault in istart , rowstart,colstart.........

Can someone help me please with some advise ?

Marco from France

Arduino: 1.8.7 (Windows 10), Board:"Arduino/Genuino Uno"

C:\Users\f8voa\Documents\Arduino\libraries\Adafruit-ST7735-Library-master\Adafruit_ST7735.cpp: In member function 'virtual void Adafruit_ST7735::setRotation(uint8_t)':

C:\Users\f8voa\Documents\Arduino\libraries\Adafruit-ST7735-Library-master\Adafruit_ST7735.cpp:248:6: error: '_xstart' was not declared in this scope

_xstart = _colstart;

^

C:\Users\f8voa\Documents\Arduino\libraries\Adafruit-ST7735-Library-master\Adafruit_ST7735.cpp:249:6: error: '_ystart' was not declared in this scope

_ystart = _rowstart;

^

C:\Users\f8voa\Documents\Arduino\libraries\Adafruit-ST7735-Library-master\Adafruit_ST7789.cpp: In member function 'virtual void Adafruit_ST7789::setRotation(uint8_t)':

C:\Users\f8voa\Documents\Arduino\libraries\Adafruit-ST7735-Library-master\Adafruit_ST7789.cpp:76:6: error: '_xstart' was not declared in this scope

_xstart = _colstart;

^

C:\Users\f8voa\Documents\Arduino\libraries\Adafruit-ST7735-Library-master\Adafruit_ST7789.cpp:77:6: error: '_ystart' was not declared in this scope

_ystart = _rowstart;

^

C:\Users\f8voa\Documents\Arduino\libraries\Adafruit-ST7735-Library-master\Adafruit_ST77xx.cpp: In member function 'virtual void Adafruit_ST77xx::begin(uint32_t)':

C:\Users\f8voa\Documents\Arduino\libraries\Adafruit-ST7735-Library-master\Adafruit_ST77xx.cpp:110:3: error: 'invertOnCommand' was not declared in this scope

invertOnCommand = ST77XX_INVON;

^

C:\Users\f8voa\Documents\Arduino\libraries\Adafruit-ST7735-Library-master\Adafruit_ST77xx.cpp:111:3: error: 'invertOffCommand' was not declared in this scope

invertOffCommand = ST77XX_INVOFF;

^

C:\Users\f8voa\Documents\Arduino\libraries\Adafruit-ST7735-Library-master\Adafruit_ST77xx.cpp: In member function 'virtual void Adafruit_ST77xx::setAddrWindow(uint16_t, uint16_t, uint16_t, uint16_t)':

C:\Users\f8voa\Documents\Arduino\libraries\Adafruit-ST7735-Library-master\Adafruit_ST77xx.cpp:140:8: error: '_xstart' was not declared in this scope

x += _xstart;

^

C:\Users\f8voa\Documents\Arduino\libraries\Adafruit-ST7735-Library-master\Adafruit_ST77xx.cpp:141:8: error: '_ystart' was not declared in this scope

y += _ystart;

^

C:\Users\f8voa\Documents\Arduino\libraries\Adafruit-ST7735-Library-master\Adafruit_ST77xx.cpp: In member function 'virtual void Adafruit_ST77xx::setRotation(uint8_t)':

C:\Users\f8voa\Documents\Arduino\libraries\Adafruit-ST7735-Library-master\Adafruit_ST77xx.cpp:170:6: error: '_xstart' was not declared in this scope

_xstart = _colstart;

^

C:\Users\f8voa\Documents\Arduino\libraries\Adafruit-ST7735-Library-master\Adafruit_ST77xx.cpp:171:6: error: '_ystart' was not declared in this scope

_ystart = _rowstart;

^

exit status 1 Fout bij het compileren voor board Arduino/Genuino Uno

Dit rapport zou meer informatie bevatten met "Uitgebreide uitvoer weergeven tijden compilatie" optie aan in Bestand -> Voorkeuren.

Recent development on that library seems to be a real mess. Here's the commit where the variable declarations were removed: https://github.com/adafruit/Adafruit-ST7735-Library/commit/cbc00ffd464f4e360af9fc566df1210764391219#diff-d938b135503d7ee50c3f2cee7e56f8a1L141 Then they were later added back in: https://github.com/adafruit/Adafruit-ST7735-Library/commit/0b781aaef4375e89b45849282d5e9a49ca545f1d#diff-d938b135503d7ee50c3f2cee7e56f8a1 But then that commit was reverted: https://github.com/adafruit/Adafruit-ST7735-Library/commit/16490554979875167e2588cef83e21eb678a8bf6#diff-d938b135503d7ee50c3f2cee7e56f8a1 None of those commits have a good description.

My advice:

  • Delete C:\Users\f8voa\Documents\Arduino\libraries\Adafruit-ST7735-Library-master
  • Sketch > Include Library > Manage libraries...
  • Wait for the download to finish
  • In the "Filter your search..." box, type "Adafruit ST7735"
  • Click on "Adafruit ST7735 and ST7789 Library by Adafruit"
  • From the "Select version" menu, select version 1.2.4.
  • Click "Install".
  • Wait for installation to finish.
  • Click "Close".
  • Try compiling your sketch.

Likely the errors will still occur with version 1.2.4 of the library. Now repeat the above process, except selecting the previous version from the bad one you just tested until you find the last good version of the library that causes your sketch to compile without errors.

The verbose build tells you which library was used e.g.

Using library Adafruit_GFX_Library at version 1.2.9 in folder: C:\Users\David Prentice\Documents\Arduino\libraries\Adafruit_GFX_Library 
Using library Adafruit_ST7735_and_ST7789_Library at version 1.2.4 in folder: C:\Users\David Prentice\Documents\Arduino\libraries\Adafruit_ST7735_and_ST7789_Library 
Using library SPI at version 1.0 in folder: C:\Program Files (x86)\Arduino-1.8.1\hardware\arduino\avr\libraries\SPI

The Library Manager will give you more information. The important lesson is: avoid multiple library versions Historically, libraries did not have version numbers. They were downloaded from unknown websites. And punters installed them manually. Nowadays, it is wise to let the Library Manager keep you up to date.

David.

Thanks for the info .

I tried something else yesterday . I have several other computers and tried a laptop. On this computer I've only microsoft windows 10 and some anti-virus .

On this computer Arduino with ST7735 is working fine .

So I think it should be something in the last updates received in the last 60 days . I removed the last java version and installed the previous but no better results .

I would like contact ladyada ( the author of ST7735 ) but it seems impossible .

Anyway I will follow Pert and David and try there advice .I will let you know the results. Thanks, Marco

For Pert ,

Thanks for the advice . I did that before but no results . Every time the same error . I really think that some updates are the cause ......(?)

Marco

Did you go all the way back to version 1.1.0?

No , I did not . I installed this morning on an old clean computer with an old win10 without updates.
All’s fine .
Now I will try update after update . I hope I can see where it will go wrong.
It will take tame but I like to know and understand the problem.

Anyway , it is not java .

for the records : I cleaned up last week the computer (with the issues) with sfc/scannow , cleanmsg and shutdown the hibernate with powercfg.exe . (?) Perhaps …?

Marco