Hello, this is my first time posting on these forums so please excuse me if I've duplicate posted or if I'm posting in the wrong place.
I am creating a weather station with 2 units.
The outside unit is setup and working fine on it's solar power and batteries while sending many, many sensor values with an RF module to an arduino Uno on the inside unit.
With the inside unit I am using one uno to manage receiving all the data from the outside unit while also updating some RGB leds in the box that are coloured in accordance to the temperature.
This uno I would like to connect to another uno that has just my LCD shield (Plus the shields built in SD) via i2c so that I can forward the data from the receiver and then store and display it.
I uploaded the i2c master code to the first uno from: https://www.arduino.cc/en/Tutorial/MasterWriter
When I upload the slave code from the same website to the second uno they both function perfectly.
Only when I add the code for the LCD to display the received values over i2c do I encounter problems.
The screen initialises and the setup code runs fine.
As soon as the code hits loop() the screen blanks to white and stops responding while the uno continues to function because it is using Serial.println() to forward the data from the master to my computer. As soon as I remove the i2c connection the screen begins to function and I am not sure why.
Note any other time without using i2c I have no problems at all with the screen or it's touch input.
Also, I have already moved the LCD reset pin from A4 to the reset pin of the uno as I have found through my hours of searching this has helped a lot of people. Therefore there is nothing connected to SDA, SCL or A4 and A5 (Except when I connect the other uno obviously).
Thanks in advance if anyone has any suggestions
Please post a link to your actual display.
Most 2.2" TFT displays are 3.3V SPI. You must look after 5V to 3.3V logic levels if you are using a Uno.
There should be no problem with I2C because it uses different pins to the SPI TFT.
David.
The display is this exact one:
It's definitely 5V, only the SD uses the 3.3V.
As I mentioned, it works perfectly all other times except when I use i2c devices of any kind, I've tried and RTC, a 16x2 LCD and a pressure sensor that are all i2c and have varying voltage inputs but they still make the screen go white when connected.
Your link shows a Blue 2.8" Mcufriend Uno Shield.
The pins are all clearly marked with printed legends.
If your board has a modern controller like ILI9341, you can rely on a "Software Reset" command.
You must snip off the LCD_RST pin and solder a 10k pullup resistor to the 5V pin. (or the Uno Reset pin)
Connect your I2C devices to the SDA, SCL pins on the 10-way header. Angle pins can fit without interfering with the Blue Shield. (these pins are the same as A4, A5 on a Uno)
In setup() call tft.begin(ID) before Wire.begin(). Then the I2C bus will work fine.
David.
1 Like
Ok so I realise now I got the size wrong, it was late at night and I had been looking for hours to see if there was a way to fix this and I guess I got confused.
I have attached photos of the screen. It is a different brand to the one mentioned above. As for the controllers I myself am not sure what the ICs are but I know they aren't the ones also mentioned above, I included a photo of the two only ICs on the shield and neither appear to be connected to the micro SD and both are identical. I tried using both A4+A5 and also SDA+SCL and it didn't change anything. I rearranged the code and also the same thing still occurred.
I am forever gobsmacked.
tchapple1:
The display is this exact one:
https://www.jaycar.com.au/240x320-lcd-touch-screen-for-arduino/p/XC4630
The link shows a BLUE pcb.
Your photo shows a WHITE pcb.
Did you not notice the different colour?
Yes, it is an "Mcufriend-style" Shield. The good news is that it uses the correct 74LVC245A buffers. Most of these Shields use 74HC245 chips.
You can not see the TFT controller chip. The MCUFRIEND_kbv library will identify it. I can't vouch for any other library until you tell me what MCUFRIEND_kbv says which controller it is.
David.
Thank you David.
I realise now that link isn't helpful as the company sells varying coloured pcbs with their TFT screens.
Anyway, I am not sure why or how but it has instantly started working this morning. I think that maybe it was your resistor suggestion but I'm not sure why it didn't work at first. Either way it is no longer an issue so I want to thank you for your time.
Go on. Most humans would notice the size of a display and the colour of the pcb.
A link is ALWAYS useful. Especially if it has photos. You just need to compare what the world sees and what you see on your desk.
e.g. "looks exactly like blue pcb but my pcb is white"
e.g. "printed legends are different. My pcb has ..."
Seriously, carefully worded and accurate questions take you an extra 5 minutes.
However, you probably get the solution in the first reply.
Meanwhile, please edit your thread title to say: White pcb 2.8 inch tft
David.