Example sketches for the new Arduino IDE for ESP8266

Moderator: igrr

User avatar
By erhardd
#32054 Here a pic, that i've upload from my "Eigene Bilder"-files to the SD-card with " 'esp-homenet-addr.'/edit" in the browser;
Then i've opened it with button#3;
The LED you can see flickers in ~30sek. and it is connected with PortB6 on the mcp23s17;

Image

A big question:
How can I free "Globale Variablen dyn. Speicher" where the arrays i used reside?
User avatar
By erhardd
#32124 -here is the sketch for activated 3 progr. - buttons;
You can upload the pic "/emo1.bmp" directly to the root of the SD-card or, better, upload via browser.
Search the 'esp-homenet-addr.' in your router(e.g.: 192.168.x.x) and append "/edit"to that address in the browser. Then upload the pic per the tab.
If you load more then this one you have the name to change in e.g.: 2.bmp , 3.bmp a.s.f.(max. 10) ;
-this *.bmp are 240x320 pixels/24 bit color-deep;
button3 will show all loaded .bmp as slideshow!
To break this, you have to touch elsewhere for longer time(~5sec.).
Have fun ...
You do not have the required permissions to view the files attached to this post.
User avatar
By danbicks
#32130 Really good work, Just to clarify on the touch screen display, are only 2 wires required for the touch function?
cs and IRQ. If so how is this data sent to the ESP?

The display side I have working on a similar device, the touch bit I would like to look in to in more detail.

Do I take it that the mcp23s17 is breaking out additional I/O pins due to display and touch taking all available pins?

Cheers

Dans
User avatar
By erhardd
#32134 Hi, danbicks!
Of course you need the MOSI,MISO and SCK-Pins. These pins are all shared between the TFT-Display, SD-card ,Touch-IC and the MCP23s17, only the spez. cs-Pins and the irq-Touch must be determined by you.
Code: Select all#define MCP23S17_SLAVE_SELECT_PIN  2
Ucglib_ILI9341_18x240x320_HWSPI ucg(/*cd=*/ 15 , /*cs=*/ 4, /*reset=*/ 15);  // *reset=rst
XPT2046 touch(/*cs=*/ 16, /*irq=*/ 0);
const int chipSelect = 5; // SD-card

the mcp23s17 is breaking out additional I/O pins

Yes, but they do nothing! Only blinking around(at moment only 1 LED). This shows me up, if the program flows correctly ..
At the mcp-board the Adress #1 is tied programmed with 0R to +Vss;
That's why:
Code: Select allvoid timeout()
{
  Mcp23s17_1.port(counter++);

the chip is addressed as Mcp23s17_1 ...