This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
comfilepi:codesys:codesys7 [2021/07/01 14:12] COMFILE Technology [Let's Make a ComfilePi HMI] |
comfilepi:codesys:codesys7 [2022/04/20 11:37] (current) COMFILE Technology [Hide Cursor] |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Let's Make a ComfilePi HMI ====== | ||
+ | |||
+ | When the ComfilePi is turned on, the web browser is automatically executed, and when WebVISU is displayed in full screen, it operates like an HMI. | ||
+ | |||
+ | 1. The CODESYS executable file can be started automatically on power off and on. | ||
+ | |||
+ | {{ :comfilepi:codesys:autostart.png?nolink |}} | ||
+ | |||
+ | or | ||
+ | |||
+ | {{ :comfilepi:codesys:autostart2.png?nolink |}} | ||
+ | |||
+ | 2. Edit autostart file. | ||
+ | |||
+ | ''sudo nano .config/lxsession/LXDE-pi/autostart'' | ||
+ | |||
+ | {{ :comfilepi:codesys:editautostart.png?nolink |}} | ||
+ | {{ :comfilepi:codesys:editautostart2.png?nolink |}} | ||
+ | |||
+ | <code> | ||
+ | @xset s off | ||
+ | @xset -dpms | ||
+ | @xset s noblank | ||
+ | @apropos chromium | ||
+ | @chromium-browser -kiosk --start-fullscreen http://localhost:8080/webvisu.htm | ||
+ | </code> | ||
+ | |||
+ | Type this to save it: ctrl+X, Y, Enter | ||
+ | |||
+ | The result demonstrated in the video below | ||
+ | |||
+ | <html><center> | ||
+ | <iframe width="560" height="315" src="https://www.youtube.com/embed/eGe-jU_aY2A" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> | ||
+ | </center></html> | ||
+ | |||
+ | ===== Hide Cursor ===== | ||
+ | |||
+ | Hiding the cursor will make it appear more professional. | ||
+ | |||
+ | 1. Install unclutter. | ||
+ | <code> | ||
+ | sudo apt-get install unclutter | ||
+ | </code> | ||
+ | |||
+ | 2. Edit Autostart file. | ||
+ | <code> | ||
+ | sudo nano .config/lxsession/LXDE-pi/autostart | ||
+ | </code> | ||
+ | |||
+ | {{ :comfilepi:codesys:hidecursor.jpg?nolink |}} | ||
+ | |||
+ | Add this. | ||
+ | <code> | ||
+ | @unclutter -idle 0.1 | ||
+ | </code> | ||
+ | |||
+ | Check result | ||
+ | |||
+ | <html><center> | ||
+ | <iframe width="560" height="315" src="https://www.youtube.com/embed/54TKCJ47Fm8" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> | ||
+ | </center></html> | ||
+ | |||
+ | It is also possible to hide the mouse cursor permanently by adding using [[comfilepi:hide_the_mouse_cursor:index|this method]]. | ||
+ | |||
+ | [[comfilepi:codesys:index|CODESYS with the ComfilePi]] | ||