8/1/2023 0 Comments Nextion lcd font wizardYou probably have a USB-to-Serial adapter that provides 5v that you can use to run the Nextion directly from your computer while working on HMI development. There are two ways to get code into the Nextion: though a serial link, or with a microSD card. By working through some examples together, you'll get the hang of it. It's a simplification, which means for some things we have to do a bit of work. The scripting language used looks a bit like C, but doesn't follow all of C's rules nor syntax. Like any other coding, though, planning is really important. The Nextion requires a bit of programming, but it's not difficult. That said, by big ego thinks that once you've sat through my session, you'll understand how to lift good ideas from projects using other processors for your own. There are a few folks out there providing reasonable information about using the Nextion, but most online tutorials are for the Schmarschmino, not the Propeller. My goal for the first session is to save you hours of watching videos on YouTube (unless you want to). It would be useful to have essential prototyping parts, too - things like pots, resistors, buttons, LEDs, etc. Ken is creating kits to simplify ordering. Week 3: Bringing it all together with a simple touch-screen lighting controller Week 2: Reviewing protocols: Async Serial, I2C, "Smart" LEDs Week 1: The Nextion HMI - Programming the 9th Cog Information and registration link can be found here:Ī: No worries! We'll move slowly and make sure that nobody is left behind. This will be a review of P2 programming in Spin, and we'll work with the some specific hardware. You've probably seen the announcements, but we're going to do this over a 3-week period in December. Nextion.Life has been very busy lately, but I was happy when Ken reached out and asked if I would jump back to do P2 presentations. text( 50, 280, 200, 50, 1, WHITE, BLUE, CENTER, MIDDLE, SOLID, "Hello Nextion ") NextionComponent checkbox(nextion, 0, 9) NextionComponent toggleButton(nextion, 0, 4) NextionComponent momentaryButton(nextion, 0, 2) The example use the SoftwareSerial libray, so the example can run on an Arduino UNO. The Nextionx2.ino shows the advantages of the library. This file file was created for an 3.5 Nextion Enhanced display but can simply modified with the Nextion editor. In examples you will find a NextionX2.hmi file. The library is written without the use of dynamic memory allocation functions like String to avoid defragmentation of the heap. On an Arduino UNO, you might use either the Nextion on Serial and no debugging or the Nextion on a SoftwareSerial port and use Serial for debugging. On an Arduino MEGA, you could for example use the Serial1, Serial2 and Serial3 ports to connect up to 3 Nextion HMIs, while keeping the default Serial port free for debugging in the Serial Monitor of the Arduino IDE. To be most universal, this library allows (in opposite to the official library) the use of multiple Nextion HMI displays connected to the same MCU under the condition to have enough hardware or software emulated serial ports (UARTs). The library is mainly based on Thierry's NextionX library and the EasyNextionLibrary from Seithan (return methods). A new, alternative and universal library to interact with Nextion HMI displays from Arduino and compatible MCUs.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |