GPIO using sysfs

The sysfs is the virtual data system of Linux’s kernel. It exports features of several kernel subsystems , hardware and related device drivers, through pseudo-files. Furthermore. Anyone can use it from any programming language as any other file system. Thus it’s very easy to use the sysfs for a basic communication  with external devices.

As an example using GPIO for communications, we’ll talk how to deal with a ultrasound sensor for distance measuring.