Nextion 3.2" LCD Display + Teensy 3.2 + Megasquirt CAN Data

This forum is for the discussion of other projects on Megasquirt/Microsquirt hardware that don't fit into any of the other forums

Moderators: jsmcortina, muythaibxr

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

Postby matthunter1448 » Sun Apr 03, 2016 9:07 pm

Right, understand all above.
What is the (0x22) for that's in your code? I understand the 0xff 3 times.
Thanks again you've been very beneficial to my car project I'm working on
matthunter1448
Helpful MS/Extra'er
 
Posts: 140
Joined: Fri Jun 06, 2008 11:15 pm
Location: Spanaway, Wa

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

Postby Laminar » Mon Apr 04, 2016 6:55 am

Would it be possible for one Arduino to drive two of these? At 95mm x 48mm, two of these would fit nicely side-by-side in a 180mmx50mm single DIN slot.
Laminar
Experienced MS/Extra'er
 
Posts: 287
Joined: Wed Aug 06, 2014 7:45 am

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

Postby Raymond_B » Mon Apr 04, 2016 8:24 am

matthunter1448 wrote:Right, understand all above.
What is the (0x22) for that's in your code? I understand the 0xff 3 times.
Thanks again you've been very beneficial to my car project I'm working on


Gotcha, I need to remember why, it was text field specific, but for the life of me I cannot remember at the moment. I've been so focused on engine assembly and install I put the CAN stuff away for the moment. For now I'd just use it before any data is sent, when I remember I'll post it :)
1995 Ford Lightning. Dart based 427 Windsor, Novi 2000, full sequential, E-85, etc. MS3/3X
Friends don't let friends share tunes...
http://www.buildpics.org/
Raymond_B
Master MS/Extra'er
 
Posts: 583
Joined: Thu Mar 06, 2014 2:17 pm
Location: Texas

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

Postby Raymond_B » Mon Apr 04, 2016 8:29 am

Laminar wrote:Would it be possible for one Arduino to drive two of these? At 95mm x 48mm, two of these would fit nicely side-by-side in a 180mmx50mm single DIN slot.


I can speak for the Teensy 3.2, it has 3 serial interfaces and I believe it will run 2 displays (up to 3 I suppose) no problem. **But I have not tested it. Originally I had planned to use one large 7" Nextion, but the way my dash is I do not think I can, so just like you I have been thinking of a pair of smaller displays.

Here is the Teensy 3.2 pinout

https://www.pjrc.com/teensy/teensy32_front_pinout.png
1995 Ford Lightning. Dart based 427 Windsor, Novi 2000, full sequential, E-85, etc. MS3/3X
Friends don't let friends share tunes...
http://www.buildpics.org/
Raymond_B
Master MS/Extra'er
 
Posts: 583
Joined: Thu Mar 06, 2014 2:17 pm
Location: Texas

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

Postby matthunter1448 » Mon Apr 04, 2016 9:30 am

I will try two soon when I get home from deployment . running teensy 3.2 and 2 2.4 screens
matthunter1448
Helpful MS/Extra'er
 
Posts: 140
Joined: Fri Jun 06, 2008 11:15 pm
Location: Spanaway, Wa

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

Postby Laminar » Mon Apr 04, 2016 10:08 am

Raymond_B wrote:
Laminar wrote:Would it be possible for one Arduino to drive two of these? At 95mm x 48mm, two of these would fit nicely side-by-side in a 180mmx50mm single DIN slot.


I can speak for the Teensy 3.2, it has 3 serial interfaces and I believe it will run 2 displays (up to 3 I suppose) no problem. **But I have not tested it. Originally I had planned to use one large 7" Nextion, but the way my dash is I do not think I can, so just like you I have been thinking of a pair of smaller displays.


Thanks for the info! I was considering relocating my HVAC controls to open up a spot for a 7" display or Android tablet, but going with two of these screens would be much easier!
Laminar
Experienced MS/Extra'er
 
Posts: 287
Joined: Wed Aug 06, 2014 7:45 am

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

Postby Laminar » Mon Apr 04, 2016 11:51 am

Raymond_B wrote:
matthunter1448 wrote:Microsquirt V3
Nextion 3.2" TFT Display http://wiki.iteadstudio.com/Nextion_HMI_Solution
Waveshare CAN transceiver http://www.amazon.com/WaveShare-SN65HVD ... B00KM6XMXO
Teensy 3.2 Arduino compatible micro-controller http://www.pjrc.com/store/teensy32.html


I have a TinyIOx talking with my MS3 on CAN right now. Would it be a problem to add this CAN board into the CAN loop? I'm under the impression that MS can only do one type of CAN data at a time (11-bit or 29-bit, I think), does this come into play?
Laminar
Experienced MS/Extra'er
 
Posts: 287
Joined: Wed Aug 06, 2014 7:45 am

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

Postby Raymond_B » Mon Apr 04, 2016 12:23 pm

I do not believe it's an issue as your TinyIOx has a specific CAN ID and the MS is setup for that two way communication. For the display you would simply turn on one of the CAN broadcasting options, which is just that, broadcasting data to the CAN bus to whomever is listening. You would have to make sure your CAN transceiver is in the appropriate mode (terminating resistor on or off) for it's position in the CAN bus. From there your Arduino code would filter the broadcast messages as you look for specific IDs.

I'd bet James or others can explain better, but I believe what I have written is essentially correct.
1995 Ford Lightning. Dart based 427 Windsor, Novi 2000, full sequential, E-85, etc. MS3/3X
Friends don't let friends share tunes...
http://www.buildpics.org/
Raymond_B
Master MS/Extra'er
 
Posts: 583
Joined: Thu Mar 06, 2014 2:17 pm
Location: Texas

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

Postby Laminar » Mon Apr 04, 2016 12:30 pm

Okay, that makes sense to me. I remember a thread where someone couldn't use two CAN devices together because they each used a different protocol, but it may have been two devices sending data to the MS.
Laminar
Experienced MS/Extra'er
 
Posts: 287
Joined: Wed Aug 06, 2014 7:45 am

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

Postby matthunter1448 » Sat Apr 09, 2016 4:33 pm

Another quick question. How do u get it to change brightness like in your video ? I know how to change pages is it something in that area or in the actual code?

Sent from my SM-N920T using Tapatalk
matthunter1448
Helpful MS/Extra'er
 
Posts: 140
Joined: Fri Jun 06, 2008 11:15 pm
Location: Spanaway, Wa

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

Postby Raymond_B » Sat Apr 09, 2016 9:39 pm

matthunter1448 wrote:Another quick question. How do u get it to change brightness like in your video ? I know how to change pages is it something in that area or in the actual code?

Sent from my SM-N920T using Tapatalk


That was done with two buttons and all the setup is in the Nextion editor. Basically each button responds to a touch event, so when you touch + it executes dim=dim+20, and when you touch - it does dim=dim-20

I found those in the Nextion command reference, there's tons of goodies in there like that :)
1995 Ford Lightning. Dart based 427 Windsor, Novi 2000, full sequential, E-85, etc. MS3/3X
Friends don't let friends share tunes...
http://www.buildpics.org/
Raymond_B
Master MS/Extra'er
 
Posts: 583
Joined: Thu Mar 06, 2014 2:17 pm
Location: Texas

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

Postby matthunter1448 » Sat Apr 09, 2016 9:42 pm

Got it I figured it out thanks

Sent from my SM-N920T using Tapatalk
matthunter1448
Helpful MS/Extra'er
 
Posts: 140
Joined: Fri Jun 06, 2008 11:15 pm
Location: Spanaway, Wa

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

Postby tbaggins » Fri Apr 15, 2016 7:47 pm

I have a boost controller project that I made using one of these displays and an arduino mini. I was just wondering if anyone had used them for custom displays for the megasquirt, glad to see they have. I just picked up the megasquirt and put it together, so it will be interesting to see how the ecu makes all of my other arduino car projects obsolete.

Here is a link to a youtube video of it running in the car. https://www.youtube.com/watch?v=f38OL2Qn1KU There is a project link on the page that explains all of the details.

If anyone has questions on how to use the serial commands in the editor, send me a PM. It took a bit of reading, but it is pretty easy now.
2003 Mustang 2V stock harness splice, MS3X v3.0 parallel install, full sequential, HPX MAF, Ford Ev6 47lb injectors, COP, custom 8 BIP373 box, E85 pump, teflon lined return style fuel system, 39 lb base fuel pressure, Twin Turbo @ 7lbs boost, Dual 4 port boost solenoids, Dual 14point7 widebands
tbaggins
Helpful MS/Extra'er
 
Posts: 49
Joined: Fri Apr 15, 2016 7:41 pm

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

Postby gui67 » Fri Apr 29, 2016 11:51 am

Hello,
I purchased all the material to build the same LCD screen: NExtion 3,2", teensy and waveform Can transiever.
I am triing to test everything, but I don't manage to do anything.
The transciever is connected to CANL and CANH from MS3.
Transciever GND and 3,3V are connected on teensy and get 3,3V.
Transciever CANTX goes to pin 4 from Teensy (CANRX)
Transciever CANRX goes to pin 3 from Teensy (CANTX)
TX from NExtion goes to teensy pin 9 (RX2)
RX from NExtion goes to teensy pin10 (TX2)

MS3: CAN broadcasting is set to ON.

I don't even manage to get any text displayed from Teensy on Nextion.
And I also don't know how I could test the Can communication between MS and Teensy.
If you have any idea, please let me know. (NExtion configuration, MS configuration, libraries to use...)

Thanks in advance
Guillaume
gui67
Experienced MS/Extra'er
 
Posts: 155
Joined: Tue Mar 23, 2010 12:10 pm
Location: Strasbourg, France

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

Postby grom_e30 » Fri Apr 29, 2016 2:58 pm

can you not use the serial monitor to print text to the computer to confirm if the can is getting data.
1990 bmw 320i daily driver with m20b25 ms3 sequential fuel, 380cc injectors, d585 coil near plug, home made cam sync, launch control, fan control, vss, homebrew egt logging what's next????
grom_e30
Super MS/Extra'er
 
Posts: 4004
Joined: Thu Mar 08, 2012 12:44 pm
Location: UK

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

Postby gui67 » Fri Apr 29, 2016 10:34 pm

So you mean connecting the teensy to the PC and getting data from it with Hyperterminal?
Is there a way to communicate directly from the PC to Can transciever? I connected the serial port to the transciever, what message could I send with hyperterminal to get an answer?

I don't know a lot in electronics and programming, forgive me.

I tried to change the teensy soft to switch on the led (at least this output is working and does not rely on an other unknown communication) when TPS>50, just to know if the communication between MS and arduino is OK, but I don't manage to get that working.
gui67
Experienced MS/Extra'er
 
Posts: 155
Joined: Tue Mar 23, 2010 12:10 pm
Location: Strasbourg, France

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

Postby slow_hemi6 » Fri Apr 29, 2016 11:36 pm

Is the teensy blank or did you load the code onto it?
Find the Manuals up top under Quick links: Manuals. :RTFM:
Cheers Luke
User avatar
slow_hemi6
Super MS/Extra'er
 
Posts: 4120
Joined: Fri May 07, 2004 3:33 am
Location: Australia

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

Postby gui67 » Sat Apr 30, 2016 4:05 am

I loaded the code, :-)
this step is OK
gui67
Experienced MS/Extra'er
 
Posts: 155
Joined: Tue Mar 23, 2010 12:10 pm
Location: Strasbourg, France

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

Postby grom_e30 » Sat Apr 30, 2016 6:57 am

What code have you loaded on to it?
1990 bmw 320i daily driver with m20b25 ms3 sequential fuel, 380cc injectors, d585 coil near plug, home made cam sync, launch control, fan control, vss, homebrew egt logging what's next????
grom_e30
Super MS/Extra'er
 
Posts: 4004
Joined: Thu Mar 08, 2012 12:44 pm
Location: UK

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

Postby gui67 » Sat Apr 30, 2016 8:53 am

The code from Raymond, that I downloaded on the first page.
I changed some parts to only display TPS for the moment for testing on a very simple screen.
(I don't have the HMI file from Raymond that goes with the code) So I try for testing to only Display TPS in a txt field. But nothing is displayed.
I then tryed to display a fixed value and then a text, but I don't even manage to get that done on the Nextion, the screen does not display any information from Arduino (I is certainly very easy, but I miss something)
If anyone has a simple example of a HMI code and .ino file that just displays simple text, that would certainly help me to troubleshoot and find the problem on my codes.
Thanks
Guillaume
gui67
Experienced MS/Extra'er
 
Posts: 155
Joined: Tue Mar 23, 2010 12:10 pm
Location: Strasbourg, France

PreviousNext

Return to Other Development

Who is online

Users browsing this forum: No registered users and 1 guest