본문 바로가기

카테고리 없음

Pic16f690 Serial Communication C Code Editor

  1. Pic32 Serial Port Example
  2. Pic16f690 Serial Communication C Code Editor With Templates
  3. Pic16f690 Serial Communication C Code Editor R Control

I got my 7' Nextion display and finally had time to play with it. I downloaded the “compbutton.ino” example program from the ITEADLIBNEXTION library. It compiled OK and I was able to flash it to my Photon OK. The Photon is pulsing cyan. But then nothing happens.

The Nextion display remains stuck on its preloaded demo splash screen. If I do the “slide to unlock” on the display, it moves to the date screen, but that’s it. If I reflash the Photon, it goes back to the initial lock screen.And yes I’m sure I have RX connected to TX and vice-versa. And I’m sending the code to the right target. Is there some obscure magic incantation I’ve overlooked? How do I figure out what’s wrong here?Mystified???

Pic32 Serial Port Example

The display is the “Nextion NX8048T070 - Generic 7.0” HMI TFT LCD Touch Display' The library is what you get from the Community Libraries: #include 'ITEADLIBNextion/ITEADLIBNextion.h'The code is one of the example programs in that library.Honestly, I have no idea where to even begin trying to figure out what’s going on here. For the record, I haven’t used Nextion’s GUI editor (because I can’t figure it out) and there’s no SD card inserted in the display.

Pic16f690 Serial Communication C Code Editor With Templates

I just hooked it up and ran the program. ScruffR:There is a font creation tool in the Nextion Editor menu Tools - Font GeneratorI got the Nextion demo hmi example DemoNextion7.0v032.HMI to load and execute in the editor. I then tried making a new GUI with just one text element in it. I used the font editor to create a new font, Helvetica 48 Bold. It said it created it and saved it. But now how do I use this new font? My text element is set to Font 0 by default.

Pic16f690 Serial Communication C Code Editor R Control

I tried changing it to Font 1 but then got Error: Page:page0 Error:t1.font InputVal Invalid:Invalid Font IDAnd I haven’t found any good tutorial on how to use this editor either. When I click on the Help button, it just opens a browser tab to the Nextion home page. ScruffR:The firmware is created by the Nextion Editor and I usually use the SD card to update the display but you can use an FTDI cable too - but I find the SD update much quicker.I guess I’ll just try the SD card. It’s sort of a pain but it’s a bigger pain to switch the display’s serial pins between the Photon and the PC.

Code

What would be nice is, since the display is already connected to the Photon and the Photon is connected to the PC, would be if you could just update the display via the Photon. Nextion GUI will find the correct port. At least in my computer it does. There is an option in the port select box called “auto search” or something similar.

Baudrate says 115200.fonts are a bit weird. You have to create one, Size is not like in Word or other problems. I think size is in pixel.Once you have a font created, you can reference in your button. It is reference with its id. 0,1,2In ftdi, rx and tx must be switched with the ones in screen. In GUI, you can click over “debug” and debug on computer and also on a real screen.

Also, you can upload the code yo the board witouth an SD card. It takes a while, but it is ok.I haven’t tested examples. But I will try this weekend.