Get it moving with PWM!

This time, we’ll know how to get our devices in motion using servos and motors. This is easy to control them thanks to the PWM signals of the Raspberry Pi, Beaglebone and many other single-board computers and micro-controllers.

Additionally we’ll see how to control the speed and direction of wheel motors using the DRV8835 Dual Motor controller. This is the base driving system of our open-source robotic project, Bot1, in which you all are invited to collaborate.

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.