2.4" TFT: does it work with MySensors?
-
I noticed on the store in the Displays section a cheap 2.4" LCD screen. It is a bit tricky to find any details on this thing but one eBay seller who appears to be selling this model states:
Uses digital pins 5-13 and analog 0-3. That means you can use digital pins 2, 3 and analog 4 and 5. Pin 12
That does seem to line up with the pin labels on the shield.
However, the NRF24L01+ radio also uses pins 9-13. It seems to me these two things are incompatible.
I searched the forum but it doesn't appear anyone has used one of these.
Can anyone confirm if you can use one of these and a radio on an Uno? It seems strange to put something in the MySensors store that doesn't work so I am hoping I am just missing something.
-
All screens can be used with enough effort. I got a screen working that needed 20 pins, see https://forum.mysensors.org/topic/3438/physical-mood-light-color-and-brightness-selector-based-on-lcd-touchscreen-with-demo-video/
I think the screen in the MySensors store is an ili9341, which should support spi which means you can use 4 pins to connect it. http://www.aliexpress.com/item/2-4-inch-LCD-module-SPI-serial-module-2-4-inch-TFT-module-ILI9341-only-9/32526066165.html might be a better choice since it says which screen it is.
You can move the radio by using softspi, see https://www.mysensors.org/build/ethernet_gateway for instructions on how to do that.
-
@jsiddall Yes, it does work. However, you may have to spend some time looking for a screen processor and schematics as Chinese are not providing much information.
-
Ask for schematics and have a look - there are four digital pins on your Arduino used for the SD card. Disolder these pins (some screens do not have them). These can be used for nrf24l01+ with Soft SPI (you have to enable it in MyConfig.h and change MISO, MOSO and SCK pins to correspond the pins you use).
-
Please do a bit research on Arduino forum. There is a sketch to help you to define a screen processor, there is a new library etc tons of information available.
-
It may take a while to do the whole research - there are many-many posts.
I have tried recently three different screens 2.8-3.2 (one similar to yours with analogue pins) with MySensors and all of them were working. Abeit one was very difficult - took me a while to
take it work due to lack of documentation.I posted some pictures in "Scene Controller" under "Development" - please have a look
PS @mfalkvidd provided excellent links
-
-
@mfalkvidd said:
All screens can be used with enough effort. I got a screen working that needed 20 pins, see https://forum.mysensors.org/topic/3438/physical-mood-light-color-and-brightness-selector-based-on-lcd-touchscreen-with-demo-video/
I think the screen In the MySensors store is an ili9341, which should support spi which means you can use 4 pins to connect it. http://www.aliexpress.com/item/2-4-inch-LCD-module-SPI-serial-module-2-4-inch-TFT-module-ILI9341-only-9/32526066165.html might be a better choice snce it says which screen it is.
You can move the radio by using softspi, see https://www.mysensors.org/build/ethernet_gateway for instructions on how to do that.
Great info, thanks for pointing me in the right direction.
@alexsh1 said:
@jsiddall Yes, it does work. However, you may have to spend some time looking for a screen processor and schematics as Chinese are not providing much information.
- Ask for schematics and have a look - there are four digital pins on your Arduino used for the SD card. Disolder these pins (some screens do not have them). These can be used for nrf24l01+ with Soft SPI (you have to enable it in MyConfig.h and change MISO, MOSO and SCK pins to correspond the pins you use).
I posted some pictures in "Scene Controller" under "Development" - please have a look
Good point about the SD pins and thanks for the info on reassigning the radio pins. Those are the pieces I was scratching my head about.
-
Yes it will definitely work . I have a mega2560 with such a tft fitted along with the NRF radio and SDCARD connected. Just define softSPI in myconfig.h at the bottom. Remove // from //define soft spires then choose your pins. Don't forget to reasign the CS and CE pins accordingly to. These are set just above the softSPI definitions. Good luck.
-
@mfalkvidd said:
All screens can be used with enough effort. I got a screen working that needed 20 pins, see https://forum.mysensors.org/topic/3438/physical-mood-light-color-and-brightness-selector-based-on-lcd-touchscreen-with-demo-video/
I think the screen in the MySensors store is an ili9341, which should support spi which means you can use 4 pins to connect it. http://www.aliexpress.com/item/2-4-inch-LCD-module-SPI-serial-module-2-4-inch-TFT-module-ILI9341-only-9/32526066165.html might be a better choice since it says which screen it is.
You can move the radio by using softspi, see https://www.mysensors.org/build/ethernet_gateway for instructions on how to do that.
i own one of these 2.4" aliexpress screens and trying to get this work with mysensors.
But at the moment without any result . Could you share the sketch you uses and works ?Got the screen running using : this test lib: https://github.com/Smoke-And-Wires/TFT-Shield-Example-Code/tree/master/SWTFT-Shield
It seems to be that some pin's must be changed , but on the 2.4 inch display this :
- GND GND
- 5V -> Step down -> 3V3 (see buying guide for help finding step-down)
- SCK ??
- MOSI ??
- MISO ??
- CE ??
- CSN ??
are not direct on this display visible , what are these
-
@the-cosmic-gate the sketches are included in the link you quoted.
-
@the-cosmic-gate said:
https://github.com/Smoke-And-Wires/TFT-Shield-Example-Code/tree/master/SWTFT-Shield
You do not need any sketches for now. Did you identify the chip model and number? I would suggest you go on Arduino forum and start reading about it - there are many threads over there depending on your screen make and model. You need to get the correct
pinout diagram and library, which you may need to correct.I did spent a few days trying to make a cheap Aliexpress TFT screen work. It took me hours and hours. That screen was returned and now I have the screen from Itead Studio guys. It works like a charm as all pins are standard, i.e. used by libraries like UTFT.
Additionally, you may want to try this library:
https://forum.arduino.cc/index.php?topic=366304.0There are some example sketches included including a possible screen pinout.
-
@alexsh1 said:
@the-cosmic-gate said:
https://github.com/Smoke-And-Wires/TFT-Shield-Example-Code/tree/master/SWTFT-Shield
You do not need any sketches for now. Did you identify the chip model and number? I would suggest you go on Arduino forum and start reading about it - there are many threads over there depending on your screen make and model. You need to get the correct
pinout diagram and library, which you may need to correct.I did spent a few days trying to make a cheap Aliexpress TFT screen work. It took me hours and hours. That screen was returned and now I have the screen from Itead Studio guys. It works like a charm as all pins are standard, i.e. used by libraries like UTFT.
Additionally, you may want to try this library:
https://forum.arduino.cc/index.php?topic=366304.0There are some example sketches included including a possible screen pinout.
yesterday late in the evening got this lib ( https://github.com/Smoke-And-Wires/TFT-Shield-Example-Code/tree/master/SWTFT-Shield ) running, and displayed the rotation and graphic test ( touch doesn't work :S )
Try to find out the right pin's for this mysensors scene controller
-
@the-cosmic-gate First things first. You need to sort out the problem with touch. Basically, you need to load the 'paint' sketch and be able to draw or paint on your screen. If it does not work, there is no point moving to softSPI/MySensors as you won't have a working scene controller (touch is important). Additionally, I'd suggest you try to stick to UTFT library.
You may spend a lot of time on this as these cheap screens normally have zero documentation. You can contact the seller and ask about schematic - this would help you to identify pinout. My first cheap TFT screen had pins A2-A6 used for touch if I remember correctly
-
Then it should be faster/ easier to order some working/ approved screens for some quick solution, and take some extra time to get this screens team work
-
My first attempt at using a screen like this was on a mega2560! This makes things even more complicated with these cheap screens as the internal port mapping is completely different on the mega2560. However I did eventually get it working using the superb SWtft library which has #defines for the Uno/Mega2560 pinouts . Still takes a lot to get going though!
-
@the-cosmic-gate There are so many manufacturers! Generally, as a rule of thumb the cheaper you pay for the screen the more difficult it is to get it working. Besides, anything to do with Arduino does require some DIY skills
Above I recommended Itead Studio screen, but it does cost more though works out of the box.