Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 7 of 7

Thread: Teensy 4.0 with Nextion 10.1" Intelligent Series - Teensy HWSERIAL Rx Trouble

  1. #1
    Junior Member
    Join Date
    Aug 2020
    Posts
    3

    Teensy 4.0 with Nextion 10.1" Intelligent Series - Teensy HWSERIAL Rx Trouble

    Hi all,

    I am using a Teensy 4.0 with a Nextion 10.1" Intelligent Series touch screen. I originally created the project on an Arduino Uno and switched to the Teensy. Everything is working as expected (after some fixes) except for the Teensy receiving data from the Nextion display. I put my scope on the output of the Nextion and I am getting the expected signals when a press/release event happen. I have tried Serial1 and Serial2. Both work sending data to the Teensy, but nothing seems to work to receive data from the Nextion.

    I feel as though I am missing something... obviously; my suspicion is that the problem is in this function.

    nexLoop(nex_listen_list);

    I have never told nexLoop which pin to listen on, I assume that is buried somewhere in a library that I have not been able to locate. The Rx pin by default is pin 0 on the Uno.

    I am using https://github.com/itead/ITEADLIB_Arduino_Nextion library.

    Has anyone else come across this issue? My Code is attached. 8_Thermocoup..... is the main, others are functions. Please ignore any other errors you might see.

    Thanks
    Jason

    hmi_update.ino8_Thermocouple_Tracker_Nextion_HMI_8_5_2020_teensy40.inoMaxAveMin.inoread_TCs.ino

  2. #2
    Junior Member
    Join Date
    Aug 2020
    Posts
    3
    Hi again everyone,

    Even though I had spent all day yesterday searching, I could not find the answer. Of course, as soon as I post my question... I figure it out.

    The problem is in nexConfig.h

    The line that reads "#define nexSerial Serial" is the issue. I tried using Serial1 and it still did not work. When I switched it to Serial2, it started working.

    Hope this helps someone somewhere sometime.

    Thanks
    Jason

  3. #3
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    22,465
    Glad you figured it out. I'm a little surprised Serial1 wouldn't work, but Serial2 did.

  4. #4
    Junior Member
    Join Date
    Aug 2020
    Posts
    3
    My thinking is that it really should have worked on Serial1 all along as it defines the same pins as Serial does. Is my thinking correct?

  5. #5
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    22,465
    Yes, that's what I would have thought. Maybe there's already some conflicting use of Serial1 somewhere?

  6. #6
    Senior Member+ manitou's Avatar
    Join Date
    Jan 2013
    Posts
    2,574
    careful, it looks like Nextions are 5v devices. Teensy 4 is NOT 5v tolerant, you may need level shifters? Maybe OK if you don't hook up Nextion Tx to T4.

    edit: at least on some Nextions, the serial port logic is 3.3v
    Last edited by manitou; 08-07-2020 at 11:40 PM.

  7. #7
    Member
    Join Date
    Apr 2014
    Location
    Cheltenham, UK
    Posts
    55
    The Nextion Intelligent Series is 5v i/0, the enhanced, which only goes up to 7", is 3.3v i/o. Both need 5v power to drive them. The 10" needs 5v at 2A. Rather a greedy device!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •