Unofficial Nextion/TJC User Forum

Displaying a picture on screen in an angle. using the pic command?

I’m using the the “pic 640,150,29” command to display a picture on screen. Is it possible to display the picture in an angle?

I want to print the picture of a small boat. But the boat can go into each directions. So turning the picture into a certain degree would be useful.

Alternatively I need to add many pictures (300+) of the boat each one pointing into a different direction. That is not really handy and difficult to maintain.

I’m using the NX1060P101-011R-I Intelligent 10 Inch display

Hi @rgroothuis

I’ve created two layouts for RC Tug boats (ASD) and I always use the animation option.
See here two video’s:
https://youtu.be/mkvrcW3nNpk
And here the first one:
https://youtu.be/wRwpu9qlU1k

The new one is created for a 7" Intelligent Nextion and the older one, was created for a 5" Enhanced Nextion.
For both I’m using more pictures for the animation look.
I still need to create a serial communication between my transmitter and the Nextion screens.

I hope this is the right info.

BTW: are you from the Netherlands ?

Hi MdG_NL, those video’s are looking good. Indeed, that is something i want to build. From where did you got those pictures (the compare circle)? And how did you displayed the course/wind direction?

Do you have the same picture in your library in different angles? And you print the picture on screen that is applicable for that angle? How are you printing the pictures on screen? And also how do you delete/remove them again? I would like to get a better understanding on how you are doing this. Thanks.

Correct, I’m from the Netherlands indeed :-).

Thanks @rgroothuis

Yes, I use many pictures for the animation.
For the 360° I use 180 samples, all imported in the Picture restore pane.
All have a unique picture number, which I can use to get the right picture.
So for position 0° it’s in my case the first picture
With the Arduino you can easily change the picture number, via the Picture tool.

The same way I’ve used for the Balancing animation on the next page.
These are 35 pictures.

In the video I’ve used two timers and some variables, to generate the look like animation.
Next step is the communication between the Arduino and the transmitter > Nextion.
So I can in real live sent the right info for the angles.

About the idea of this design, please check Damen Shipyard HMI interface.
I used some parts from them, with some editing to give it a better look for RC.
The second video is a basic older look and is most time a mechanical unit.

Please check my website: ASD Tugboats and more…

Thanks for the feedback. It is clear I need a lot of pictures in different angles to generate the animation, that is clear.
Which commands are you using to display and remove the pictures?
2nd question, a displayed picture, how are you removing it from the screen again?

And what is your purpose with the reference to: “Damen Shipyard HMI interface”? I can see they made a nice design. But how does this help my project?

Damen Shipyard was a answer to your question, from where I get my pictures :wink:

And here you will find the Arduino setup, with the default Itead Nextion library:
CompPicture

In line 50 you will see how you can set/change your picture number.
(variable “number” can be linkt to your sensor to get the position)
If you have installed the Itead library, you will find the .hmi file in documenten/arduino library folder, so you can change it for your Nextion type.

Thanks for your feedback again. I was expecting indeed Damen … was an answer to my question, but I was searching and could find it (yet). I will do some more searching on this. Or do you have a link?

Thanks for the reference on which command you are using. That is clear.

The problem I’m struggling with is that I don’t know where the picture will come, so I dynamically need to print the picture at a location on screen. Also I don’t know up front how many pictures I need to print on screen. So that is the challenge.
I want to build an AIS ship overview, this will display the ships around my ship. There can be many ships around and all going into different directions. See example screenshot.


This forum is in no way affiliated with NEXTION®, ITEAD STUDIO®, TJC®, or anyone else really. All product names, logos, and brands are property of their respective owners. All company, product, and service names used in this website are for identification purposes only. Use of these names, logos, and brands does not imply endorsement from the respective rights holder(s).