Would you like to react to this message? Create an account in a few clicks or log in to continue.

You are not connected. Please login or register

Simulating Arduino with ILI9341 screen

2 posters

Go down  Message [Page 1 of 1]

1Simulating Arduino with ILI9341 screen Empty Simulating Arduino with ILI9341 screen Sun Jan 23, 2022 6:04 pm

nr4ps



Can someone tell me what I'm doing wrong here? Screen is just blank.

Simulating Arduino with ILI9341 screen Screen10

Code:

#include <SPI.h>
#include "Adafruit_GFX.h"
#include "Adafruit_ILI9341.h"

// For the Adafruit shield, these are the default.
#define TFT_DC 9
#define TFT_CS 10
// Use hardware SPI (on Uno, #13, #12, #11) and the above for CS/DC
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC);

int lineno=0;

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600); // open the serial port at 9600 bps
  Serial.print("Hello world.\n");
  Serial.print("Beginning TFT screen\n");
  tft.begin();
  Serial.print("TFT screen has begun\n");
}

void loop() {
  // put your main code here, to run repeatedly:
  tft.fillScreen(ILI9341_WHITE);
  yield();
  tft.setCursor(lineno, 0);
  tft.setTextColor(ILI9341_BLACK);  tft.setTextSize(1);
  tft.println("Hello World!");
  Serial.print("Line"); Serial.print(lineno); Serial.print("\n");
  lineno = (lineno+1)%tft.height();
  delay(300);
}

arcachofo

arcachofo

Hi.
Looks like the RST Pin definition is missing:
Code:
// For the Adafruit shield, these are the default.
#define TFT_RST 8
#define TFT_DC  9
#define TFT_CS  10
// Use hardware SPI (on Uno, #13, #12, #11) and the above for CS/DC
Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC, TFT_RST);

nr4ps likes this post

3Simulating Arduino with ILI9341 screen Empty Re: Simulating Arduino with ILI9341 screen Mon Jan 24, 2022 10:46 pm

nr4ps



Thanks!

nr4ps



Does SimulIDE support rotation of the display into landscape? I can rotate the item itself, but when I use tft.setRotation(1) in the code, it still draws to the display in portrait.

arcachofo

arcachofo

Does SimulIDE support rotation of the display into landscape? I can rotate the item itself, but when I use tft.setRotation(1) in the code, it still draws to the display in portrait.
No, it's not supported.
Anyway the rotation in ILI9341 probably is not what you think.
But I'm not yet 100% sure how it works.
It would be great if someone could do some tests with a real one.

6Simulating Arduino with ILI9341 screen Empty Re: Simulating Arduino with ILI9341 screen Thu Jan 27, 2022 11:28 pm

nr4ps



I recently ordered this LCD module from eBay, which it says is based on ILI9341 (but it is parallel, not SPI). I don't know a lot about it, but I may be able to run a small test for you if you can describe exactly what you want done. I do not have it yet but hopefully it will arrive in February.

https://www.ebay.com/itm/LCD-module-TFT-2-4-inch-TFT-LCD-screen-with-Touch-pen-for-Arduino-/294100299667?mkcid=16&mkevt=1&_trksid=p2349624.m46890.l49286&mkrid=711-127632-2357-0

arcachofo

arcachofo

I recently ordered this LCD module from eBay, which it says is based on ILI9341 (but it is parallel, not SPI). I don't know a lot about it, but I may be able to run a small test for you if you can describe exactly what you want done. I do not have it yet but hopefully it will arrive in Februa
Nice, I will prepare some code.

To have an idea of how hardware rotation works have a look at this post:
https://simulide.forumotion.com/t394-v1-0-0-ili9341-bug-when-re-flashing#1988

Sponsored content



Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum