Blog2020-02-28T14:41:54+08:00

Our Blog

1809, 2023

The Nextion MEGA IO project – Part 2

By |September 18th, 2023|

After we "invented" an extremely compact and efficient protocol in The Nextion MEGA IO project – Part 1, allowing to control up to 8 MCUs with their up to 12 PWM pins, 32 GPIO pins, and 16 ADC pins each (in case of the Arduino Mega) with only 3 bytes, it's now time to move from theory to practice! Our first goal was and is to make things better than in this project, where we used only 3 PWM channels and only a slightly reduced PWM resolution (7 instead of the theoretically possible 8 bits) for the sake of simplicity. Controlling a RGB LED this way limited the color resolution to 2 millions of colors instead of 16 millions as some attentive readers had noticed and reported back. Thus, we start a huge demo project today, with 12 sliders for the 12 PWM channels of the Arduino Mega, distributed over 2 screen pages, PWM1, and PWM2, having all the full 8bit range supported by the Arduino Mega.

409, 2023

The Nextion MEGA IO project – Part 1

By |September 4th, 2023|

As announced in my last Sunday's blog post, we'll start from this week with the Nextion MEGA IO project which will allow us from a simple Nextion HMI without onboard GPIO, to write all the 12 PWM pins, to read and write all the 32 digital IO pins, and to read all the 16 analog pins of an Arduino Mega! Later, we will even add the option to control the full IO not only of one single MEGA, but several of these. We will also get a downsized version for the Arduino Uno. With the knowledge and tools given successively in this blog post series, you should become a master when it comes to using any MCU for connecting various sensors, LEDs, motors, fans, pumps, relays, or whatever you might imagine!

2808, 2023

Summer Sales reminder and the Mega I/O project

By |August 28th, 2023|

I have already blogged (for example here) about controlling Arduino's (or any other microcontroller's) I/O from a Nextion HMI with a simple and easy to understand custom protocol, not requiring a complex library. I had imagined that from the basic examples I gave, people would extend them for more functionalities. But from the feedback I received (you'll fin my email address at the end of this article), I learned that you, my dear readers, prefer apparently getting more elaborated ready-to-use solutions. Thus, instead of the previous approach which was bottom-up, we'll try now the top-down. That's why I started developing a huge new project, which explains my relative silence during the last two weeks. Curios? Please continue reading!

708, 2023

Nextion Summer Sales with huge discounts and a nifty HMI animation project

By |August 7th, 2023|

Blogging about the Nextion Summer Sales and the generous discounts alone did not seem to me to be enough to satisfy my dear readers. Thus, I thought this could be a nice occasion to do a simple animated demo project which would run on all series and not only on the Intelligent series with their extended animation support. I decided for the NX4832F035 from the Discovery series, but the HMI file (you'll find it as usual at the end of this article) can be compiled and uploaded on any Nextion HMI display having a 480x320 resolution, like the NX4832T035 or the NX4832K035, without any modification! Choosing a different screen size or resolution would require to rework the picture resources just a little.

3107, 2023

Arduino PWM control from simple Nextion HMI

By |July 31st, 2023|

Three weeks ago, I published an article about simple serial communication from a Nextion HMI towards an Arduino, so that the latter could handle 25 buttons on a screen with only a handful of code lines. This was intended to show that for many simple use cases, there is often no need for using a complex library and the Nextion protocol with its variable message lengths and the famous 3 x 0xFF terminator. The week after, I went on, this time showing a simple event handler for the Arduino, so that it could process events auto-generated by the Nextion, just by enabling the "Send Component ID" case for all components. Since then, we were bound to the Nextion return data format, the Arduino side code was somewhat more complex but still shorter and simpler than using a library. Nevertheless, it seems that did not so much trigger the interest of you, my dear readers, the click rate was only about 60% of the article before. From which I conclude that you prefer simpler solutions... Lets get back to a more basic approach, allowing to simplify things by sending only two bytes, a command byte and a data byte, and make it fool- and accident-proof without a terminator sequence.

1707, 2023

Arduino handles Nextion touch events universally – with simple code

By |July 17th, 2023|

After we saw last week that we could make the Arduino handle simple button touch/press events (but many of these) with a few lines of code on both sides, but without any complex library, it's time to move on! Today, no coding on the Nextion side will be required, and though, your Arduino will register every single TouchPress and TouchRelease event which happens on the Nextion. Afterwards, it will be up to your Arduino code to decide on which event (press or release or both) of which component and on which page it will react and how (or not). And still no library needed!

Go to Top