August 2020

Today, after 5 weeks of blogging about our beloved Nextion HMIs doing advanced mathematics, you have learnt about doing calculations with binary fractional numbers, drawing curves and patterns, iterating through sine and cosine functions, thus creating circles, ellipses, and finally complex Lissajous patterns while combining two rotary movements, represented by two sin/cos pairs. More isn’t needed to move a visual step further and to transform your Nextion HMI into a Spirograph, only using the Nextion programming language! I’ll give you more details below.

The reward(s)

Since all Sunday Blog projects, be they simple or complex, are designed and run on the very popular NX4024T032 3.2″ Standard series HMI, it will be part of the reward. But that is not enough, we add a Foca Max USB to TTL serial converter board with 5.5V2A output. Both together allow quick developing and debugging (if needed) with a steady hi-speed USB connection between your PC and the Nextion HMI. No more fiddling with SD cards!


The challenge

Take last week’s example code HMI file ( which can be downloaded in the Nextion forums, keep the background graphics and modify just the code to have your Nextion HMI drawing Spirograph patterns like in this video:

Use the vertical slider to adjust the size of the inner drawing wheel and the horizontal slider to adjust the distance of the drawing hole from the center of the wheel. If you are done, archive your HMI file as a .zip and send it together with your full name and shipping address (in case you win) by email to nextion-contest(at)itead(dot)cc before August 31st, 2020 23:59 GMT.

Our jury will look at your code, at the drawing speed, at the graphical result and will select the winner with the most efficient code, the highest drawing speed and the most beautiful result on the screen. The name of the winner and his rewarded code will be published in this Sunday Blog on Sunday, September 6th.

Some helpful stuff

If you don’t know how a Spirograph works, everything, all the maths including, is on Wikipedia!

If not yet done, read the previous blog articles:

The legal stuff

  • Employees of Itead, Nextion and Sonoff are excluded from participating in the competition.
  • Entries received after the closing date will not be considered.
  • The entry email must contain the full name and address of the entrant. The code should be attached as a zipped HMI file.
  • By submitting a solution, you agree that your full name and code will be published in the Sunday blog.
  • The submitted code must be public domain.
  • Legal action is excluded.

And now, “Bon courage !” as we say in France 🙂