💬 Touch Display Scene Controller


  • Admin

    This thread contains comments for the article "Touch Display Scene Controller" posted on MySensors.org.



  • Is there a simple way how to port it to ESP 8266?


  • Mod

    @tlustoch I don't think the esp8266 has enough available pins to connect both the radio and the display but it should be possible if you can get them to share spi pins.



  • @mfalkvidd
    See http://nailbuster.com/?page_id=341
    resp. https://www.mysensors.org/build/esp8266_gateway
    As far as I know SPI pins MOSI, MISO, SCK may be shared, just CS must be independent for each device (we need 3 CS - display, touch screen and radio ) so we will use just 6 data pins.
    Of course further testing is needed (my hw not arrived yet so I cannot do it now).

    On the other hand, radio may be omitted as the scene controller may be attached over WiFi. Moreover, running esp8266 + TFT display on batteries is not too practical.
    Thus, radio is no needed unless we want to use scene controller as a gateway.



  • Hi, I have an arduino mega and TFT touch display + shield. Seems very similar to your example, but the shield has less pins connected to arduino.
    I've configured MISO, MOSI and SCLK to pins 50,51,62 and it seems to work, but the display freezes and radio is working only sometimes (seems like if radio and tft are fighting for the SPI channel).
    So I tried using SOFT_SPI as you do, but I have problems with radio:

    Starting sensor (RNNNA-, 2.0.0)
    TSM:INIT
    TSM:RADIO:OK
    TSP:ASSIGNID:OK (ID=5)
    TSM:FPAR
    TSP:MSG:SEND 5-5-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
    TSP:MSG:READ 0-0-0 s=0,c=0,t=0,pt=0,l=0,sg=0:
    !TSP:MSG:PVER mismatch
    TSP:MSG:READ 0-0-0 s=0,c=0,t=0,pt=0,l=0,sg=0:
    !TSP:MSG:PVER mismatch
    ... [too many messages like this appears in a few seconds]
    TSP:MSG:READ 80-85-0 s=0,c=0,t=0,pt=0,l=0,sg=0:
    !TSP:MSG:PVER mismatch
    TSP:MSG:READ 80-85-0 s=0,c=0,t=0,pt=0,l=0,sg=0:
    !TSP:MSG:PVER mismatch
    TSP:MSG:READ 80-85-0 s=0,c=0,t=0,pt=0,l=0,sg=0:
    !TSP:MSG:PVER mismatch
    TSP:MSG:READ 80-85-0 s=0,c=0,t=0,pt=0,l=0,sg=0:
    !TSP:MSG:PVER mismatch
    !TSM:FPAR:FAIL
    !TSM:FAILURE
    TSM:PDT

    I have checked it with NRF24 external powered and with a base NRF24 module (with 5v to 3.3v regulator and capacitor). Also tried with NRF24 basic module and high range module, and always the same errors. Can you help me please?



  • Hello,

    how long will the battery hold? Any tests?



  • Hi Everyone, seems Im late to the party. Only just stumbled upon this site tonight as Ive been struggling to get a mention display to work as a remote transmitter from one arduino nano and a NRF24L01 radio with a nextion basic 2.4" display, to another arduino either nano or uno clone board-nrf24l01 radio, and a l298 motor shield.
    It seems what you guys have been doing is very similar, only with standard tft panel and not nextion.
    Has anyone had any success with boards other than a mega? Im trying to keep the "remote control" part of the project as small as possible, even use a pro mini if I can...
    Looking forward to any sort of advice/code you can offer...?
    Thanks



  • With regards to powering the remotes, has anyone ever notice that the pins on a cr2032 coin battery holder fit straight into the VIN and GND pins of a Nano, works a charm you just have to cut a small piece of the plastic away from the battery holder to allow for the reset button. I used a dremel for this, but was the only mod I had to do , the battery holder is almost designed for it otherwise. Not sure how long it will last though, depends what you load its up with as always.


  • Mod

    Big welcome to the MySensors forum @spacewombat !

    Cool observation about the battery holder.

    Using a Pro Mini with tft screens works, I have done it myself. The biggest limitation is the small ram and flash. Fonts, images, etc take up a lot of space. But if you only draw simple stuff on the screen it can definitely be done.



  • Thanks for the speedy response mate, its good to be on board with the my sensors crew, certainly helps to have like minded IOT tinkerers to bounce off.
    Good to know its possible with a pro mini too, very encouraging. I have a couple of standard tft screens available to try out, one is a 1.8" V1.0 SPI 128*160, it has a single row of pins down one side, blue pcb and takes a normal size sd card also.Pins are labeled on the screen, how did you go about hooking it up to the pro mini?
    The other is a red board 2.4" TFT LCD Shield for an uno, again, not sure how to go about connecting to the pro.
    Any advice mate?
    Also, Did you have to do much with the code, other than the pin assignments?
    I was actually starting to doubt whether it was possible to run nrf24lo1 as well as a display also with SPI, side by side on the smaller arduinos.


  • Mod

    @spacewombat https://forum.mysensors.org/post/34738 describes how I did. But it is not a way I would recommend 🙂



  • thanks for the link, I'm on my way to have a look.



  • Hi All,

    Does anyone know how to get the text to wrap on the buttons (or have multiple lines of text on the buttons)? UTFT_Buttons doesn't automatically word wrap, is there a way to put a CR/LF or something in the button string?

    So using Hek's original exmaple sketch, having:
    Good
    Morning

    Instead of:

    Good Morning



  • To make this sketch works, you need to define: #define MY_RF24_CE_PIN 17 and #define MY_RF24_CS_PIN 18 or it'll not work.



  • This post is deleted!

Log in to reply
 

Suggested Topics

  • 3
  • 347
  • 584
  • 2
  • 109
  • 10

22
Online

11.4k
Users

11.1k
Topics

112.7k
Posts