Tag

Linux

Browsing

RaspberryPi is a well established tiny-pc which is worldwide used for prototyping as well as mini DYI projects. In this tutorial we will explain step-by-step how to setup the raspberryPI with a touchscreen and install some useful libraries for writing simple and nice GUI applications. PS: For sure there are several other libraries that can be used to write graphical applications such as QT etc.. Requirements: RaspberryPI 3 Model B RaspberryPI 3 7” Touchscreen Display…

TiIf a program requires measuring elapsed time, you will need an individual timer that will be independent even if the user changes the time on the system clock. In Linux there are several different implementations for different cases (https://linux.die.net/man/3/clock_gettime): CLOCK_REALTIME System-wide realtime clock. Setting this clock requires appropriate privileges. CLOCK_MONOTONIC Clock that cannot be set and represents monotonic time since some unspecified starting point. CLOCK_PROCESS_CPUTIME_ID High-resolution per-process timer from the CPU. CLOCK_THREAD_CPUTIME_ID Thread-specific CPU-time clock.…

Linux sockets are always a useful tool for an application. In the simplest terms, a socket is a pseudo-file that represents a network connection. Once a socket has been created (using the proper primitives, and the proper parameters to identify the other host), writes to the socket are turned into network packets that get sent out, and data received from the network can be read from the socket. In one regard, sockets are very similar…