Example sketches for the new Arduino IDE for ESP8266

Moderator: igrr

User avatar
By picstart
#31177 I have a windows 7 pro 64 bit OS..I use the Portable mode KISS feature of Arduino.
Generic esp8266 board ..I've also tried NodeMCu 12 boards and the errors are identical.
I downloaded as a zip files and unpacked then into the folders below inside Arduino/arduino-1.6.5/libraries
Adafruit-GFX-Library-master
Adafruit-ST7735-Library-master
I am using as a test to see if a successful compile is a possible an unmodified graphicstest.ino in Adafruit-ST7735-Library-master/examples


.Now I now this is a commercial package destined to increase sales of hardware.....I'm using at standalone esp8266 so I shouldn't expect much and obviously can't call for support from Adafruit ( I don't own their board)
Nevertheless at least one person claims to have it working but it maybe it doesn't work with 1.6.5 Arduino or Adafruit has broken the code so as to not have it run on the esp8266 for commercial reasons.

Does anyone have this compiling with arduino-1.6.5? It is not a wiring issue it doesn't even compile.

I know I can go in and fix these issues but this is an example of a downside in using commercial software for the esp8266 Arduino IDE
since next time a commercial vendor updates you have some new free features ( Microsoft jargon for bugs ) to contend with.



I doesn't compile and the errors are below
[quote]graphicstest.ino: In function 'void setup()':
graphicstest.ino:71:397: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
C:\Arduino\arduino-1.6.5\libraries\Adafruit-ST7735-Library-master\Adafruit_ST7735.cpp: In constructor 'Adafruit_ST7735::Adafruit_ST7735(int8_t, int8_t, int8_t, int8_t, int8_t)':
C:\Arduino\arduino-1.6.5\libraries\Adafruit-ST7735-Library-master\Adafruit_ST7735.cpp:47:3: error: '_cs' was not declared in this scope
_cs = cs;
^
C:\Arduino\arduino-1.6.5\libraries\Adafruit-ST7735-Library-master\Adafruit_ST7735.cpp:48:3: error: '_rs' was not declared in this scope
_rs = rs;
^
C:\Arduino\arduino-1.6.5\libraries\Adafruit-ST7735-Library-master\Adafruit_ST7735.cpp:49:3: error: '_sid' was not declared in this scope
_sid = sid;
^
C:\Arduino\arduino-1.6.5\libraries\Adafruit-ST7735-Library-master\Adafruit_ST7735.cpp:50:3: error: '_sclk' was not declared in this scope
_sclk = sclk;
^
C:\Arduino\arduino-1.6.5\libraries\Adafruit-ST7735-Library-master\Adafruit_ST7735.cpp:51:3: error: '_rst' was not declared in this scope
_rst = rst;
^[/quote]
User avatar
By norm8332
#31182 Make sure you have Option 1 uncommented (HW SPI) and option 2 commented out in the graphicstest.ino. Like below..

// Option 1 (recommended): must use the hardware SPI pins
// (for UNO thats sclk = 13 and sid = 11) and pin 10 must be
// an output. This is much faster - also required if you want
// to use the microSD card (see the image drawing example)
Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_RST);
User avatar
By picstart
#31186 Make sure you have Option 1 uncommented (HW SPI) and option 2 commented out in the graphicstest.ino. Like below..
/ Option 1 (recommended): must use the hardware SPI pins
// (for UNO thats sclk = 13 and sid = 11) and pin 10 must be
// an output. This is much faster - also required if you want
// to use the microSD card (see the image drawing example)
Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_RST);

This is my Option1 selected in ..I've used this all along and have yet to get a successful compile
graphicstest.ino.

// Option 1 (recommended): must use the hardware SPI pins
// (for UNO thats sclk = 13 and sid = 11) and pin 10 must be
// an output. This is much faster - also required if you want
// to use the microSD card (see the image drawing example)
Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_RST);

// Option 2: use any pins but a little slower!
#define TFT_SCLK 13 // set these to be whatever pins you like!
#define TFT_MOSI 11 // set these to be whatever pins you like!
//Adafruit_ST7735 tft = Adafruit_ST7735(TFT_CS, TFT_DC, TFT_MOSI, TFT_SCLK, TFT_RST);


float p = 3.1415926;


You are lucky at least you got this to work..I suspect it was crippled at some later date The issue is with _CS and others it is undeclared
error
C:\Arduino\arduino-1.6.5\libraries\Adafruit-ST7735-Library-master\Adafruit_ST7735.cpp:47:3: error: '_cs' was not declared in this scope
_cs = cs;
The commercial vendor Adafruit may declare this for their boards and maybe not for a Generic esp8266
It is a pity ucglib is mostly dysfunctional for the esp8266 it would be less prone to vendors building in product specific code
User avatar
By norm8332
#31198 You are correct..I tested the very latest version of Adafruit_ST7735 and I got the same error. They did change it. The one i have is dated 1 week earlier than the latest and it works. I am preserving it on Github for the ESP8266 Community.

You can get the working one here: https://github.com/norm8332/ST7735_ESP8266