Page 4 of 5

Re: Nextion 3.2" LCD Display + Teensy 3.2 + Megasquirt CAN D

Posted: Thu Sep 01, 2016 7:42 am
by Raymond_B
Joeli0 wrote:I am starting this project next week. Can anyone screen shot their settings in TS for how the CAN is broadcast or is it as simple as enabling it. This is my first go round but has me excited with the possibilities. Thanks.
Check out the CAN info in the manuals, that's what I did and played around with all the different settings.

Re: Nextion 3.2" LCD Display + Teensy 3.2 + Megasquirt CAN D

Posted: Mon Oct 17, 2016 6:09 pm
by Joeli0
Ok I have played with the Nextion display for about a month. Im getting the hang of it. Got some programming in for touch screen relay operation and such. Really cool stuff. I am bench testing my MS3X and trying to get it to talk to the waveshare transceiver. I have canH (spr1) to canH of transceiver and canL (spr2) to canL of transceiver. I have ground and 3.3v to transceiver verified by my volt meter. I have rx of transceiver to tx of pin 3 of teensy and tx to pin 4. I enabled master enable in CAN Parameters in TS and have dash enable on under dash broadcasting.... Im not getting anything according to CAN listen sketch in the teensy. Any steps to troubleshoot would be appreciated. Thanks!

Sent from my SM-N920P using Tapatalk

Re: Nextion 3.2" LCD Display + Teensy 3.2 + Megasquirt CAN D

Posted: Mon Oct 17, 2016 6:10 pm
by Joeli0
Image

Sent from my SM-N920P using Tapatalk

Re: Nextion 3.2" LCD Display + Teensy 3.2 + Megasquirt CAN D

Posted: Thu Oct 20, 2016 10:08 pm
by Alfagta
Have you put the wires internally from spr1/2 to the js pins under the ms3 card?

Re: Nextion 3.2" LCD Display + Teensy 3.2 + Megasquirt CAN D

Posted: Fri Oct 21, 2016 8:48 am
by Raymond_B
Also do you have the jumper setup on the CAN transceiver to terminate the bus?

Re: Nextion 3.2" LCD Display + Teensy 3.2 + Megasquirt CAN D

Posted: Fri Oct 21, 2016 5:15 pm
by Joeli0
Alf no I havent. I wasnt aware I had to do that being that it was purchased already assembled. That may be the missing link.

Raymond I have canH to what I assume was Canh on stim board. I have 3.3v and ground verified to transceiver and I have the tx and rx of transceiver to tx and rx of can bus 3 and 4 pins on teensy.

Sent from my SM-N920P using Tapatalk

Re: Nextion 3.2" LCD Display + Teensy 3.2 + Megasquirt CAN D

Posted: Mon Oct 24, 2016 7:16 am
by Raymond_B
I cannot remember the default state of the Waveshare board, but go over the doc real quick. Devices on a CAN bus need to be configured in one of two ways so it's not really that the device is not fully assembled it just depends on how it's used. Anyway it's just a little jumper to set.

Re: Nextion 3.2" LCD Display + Teensy 3.2 + Megasquirt CAN D

Posted: Mon Oct 24, 2016 7:27 am
by Joeli0
After more research I think the internal jumpers in the MS3 are not there from JS6 and JS8 to the SPR1 and 2. I bought a pre assembled board and assumed it was in place.

Sent from my SM-N920P using Tapatalk

Re: Nextion 3.2" LCD Display + Teensy 3.2 + Megasquirt CAN D

Posted: Tue Nov 01, 2016 7:18 pm
by Joeli0
Is anyone willing to share their .hmi and .ino files for me so I can reverse engineer how I want mine to work? I can see the CAN data with my scope. I try to serial print to the monitor but all I get are a stream of 0s that are there whether the CAN communication is present or not. I have communication between the processor and display and have had other successful projects between the two. I feel like I just need to get over this last hump lol. Thanks so far...

Sent from my SM-N920P using Tapatalk

Re: Nextion 3.2" LCD Display + Teensy 3.2 + Megasquirt CAN D

Posted: Tue Nov 01, 2016 7:26 pm
by Raymond_B
Joeli0 wrote:Is anyone willing to share their .hmi and .ino files for me so I can reverse engineer how I want mine to work? I can see the CAN data with my scope. I try to serial print to the monitor but all I get are a stream of 0s that are there whether the CAN communication is present or not. I have communication between the processor and display and have had other successful projects between the two. I feel like I just need to get over this last hump lol. Thanks so far...

Sent from my SM-N920P using Tapatalk
I posted my Arduino code about 1/2 way down on the 1st page. Also remember that the Nextion is a Serial device, I think I ended up outputting to Serial 2 to have the monitor fire up in the IDE.

Re: Nextion 3.2" LCD Display + Teensy 3.2 + Megasquirt CAN D

Posted: Tue Nov 01, 2016 7:28 pm
by Joeli0
Yes Raymond I went through it. I have the general idea of what it is doing but since I cant seem to get communication i was trying to go in steps. I wanted to see if I could verify CAN data through the serial monitor but I cant figure it out.

Sent from my SM-N920P using Tapatalk

Re: Nextion 3.2" LCD Display + Teensy 3.2 + Megasquirt CAN D

Posted: Tue Nov 01, 2016 7:39 pm
by Raymond_B
Understood.

OK so let's try to pare down the setup.

Just connect the MS to the CAN transceiver and then to the Arduino. Leave the Nextion out for now. I attached a basic CAN listen program, I picked it up off the Teensey forums. Using this you should see some sort of data stream in serial monitor in the IDE.

If still no joy please post your MSQ and .ino file renamed to .txt

Re: Nextion 3.2" LCD Display + Teensy 3.2 + Megasquirt CAN D

Posted: Fri Nov 04, 2016 8:43 pm
by Joeli0
Ok so I found my problem and now have CAN data displaying on serial monitor. I thought CAN rx had to go to CAN TX on Teensy but in this instance CAN rx goes to rx and tx to tx. So now I attempted to connect the Nextion to the Teensy with a basic box made up of "t0" to "t8" test boxes. When I powered it up it changed some of the boxes to 0 but did not change values. DO I have to use nextext to declare the text boxes on the screen so the Teensy know where to sent values? I feel like I am close? Also in the Nextion editor how do I change baud rate to 115200? I change it in the ino to 9600 because I wasnt sure. Thanks Raymond!

Re: Nextion 3.2" LCD Display + Teensy 3.2 + Megasquirt CAN D

Posted: Mon Nov 07, 2016 8:23 pm
by Raymond_B
I'll have to go back and remember how I changed the baud rate, but you do have the Nextion on Serial2 of the Teensy right?

Re: Nextion 3.2" LCD Display + Teensy 3.2 + Megasquirt CAN D

Posted: Tue Nov 08, 2016 2:03 pm
by Joeli0
I think its a problem with the CAN ids on the new firmware. In your code they are 1520+ and on the new MS3 firmware they are 1512+. Probably why when I turn it on it prints zeros.

Sent from my SM-N920P using Tapatalk

Re: Nextion 3.2" LCD Display + Teensy 3.2 + Megasquirt CAN D

Posted: Wed Nov 09, 2016 7:21 pm
by Raymond_B
You can edit the starting point for the CAN ID's. But again, just to make sure you're Nextion is on Serial2 right? Or do you mean you're getting all 0's in Serial monitor when connecting to Serial 1 of the Teensy?

Re: Nextion 3.2" LCD Display + Teensy 3.2 + Megasquirt CAN D

Posted: Thu Nov 10, 2016 4:46 am
by Joeli0
Hi Raymond. I was getting all zeros on the display. The problem ended up being how the CAN broadcast was enabled in my MS3. I was referencing an old manual for the firmware I had. Now the values are being displayed correctly but its just slow. My next step is increasing baud rate on Nextion.

Sent from my SM-N920P using Tapatalk

Re: Nextion 3.2" LCD Display + Teensy 3.2 + Megasquirt CAN D

Posted: Tue Dec 20, 2016 8:08 pm
by frdstang93
Huge thanks to Raymond_B for putting the info out there to help with this on various forums and a huge thanks to Joeli0 for nudging me in the right direction to get this thing going.

Re: Nextion 3.2" LCD Display + Teensy 3.2 + Megasquirt CAN D

Posted: Fri Jan 06, 2017 5:21 am
by robinpipirs
I see that you're using rx tx with the tensy how is that compared to using a mcp2515 interface? Pros cons ? Anyway the lcd looks really interesting. :)

Skickat från min SM-G935F via Tapatalk

Re: Nextion 3.2" LCD Display + Teensy 3.2 + Megasquirt CAN D

Posted: Mon Jan 09, 2017 8:21 am
by Raymond_B
robinpipirs wrote:I see that you're using rx tx with the tensy how is that compared to using a mcp2515 interface? Pros cons ? Anyway the lcd looks really interesting. :)

Skickat från min SM-G935F via Tapatalk
I used this project as a way to get started with CAN and micro-controllers so it's the only one I have experience with. Next up is to try a Teensy 3.6 that has 2 CAN buses. I hope to use it to drive an OEM CAN dash display from the MS.

Thanks!