Programming the pcDuino

Contributors: SFUptownMaker
Favorited Favorite 2


The pcDuino board

The beauty of the pcDuino lies in its extraordinarily well exposed hardware peripherals. However, using these peripherals is more complex than using them on, say, an Arduino-compatible board.

This tutorial will help you sort out the various peripherals, what they can do, and how to use them.

Before we get started, there are a few things you should be certain you’re familiar with, to get the most out of this tutorial:

  • pcDuino - some familiarity with the basics of the pcDuino is needed before you jump into this. Please review our Getting Started with pcDuino tutorial before going any further.
  • Linux - the biggest thing you should be familiar with it the Linux OS. Remember, pcDuino is not an Arduino–it is a modern microcomputer running a fully-functional, if compact, operating system.
  • SPI - a synchronous (clocked) serial peripheral interface used for communications between chips at a board level. Requires a minimum of four wires (clock, master-out-slave-in data, master-in-slave-out data, and slave chip select), and each additional chip added to the bus requires one extra chip select line.
  • I2C - also known as IIC (inter-integrated circuit), SMBus, or TWI (two-wire interface), I2C uses only two wires (bidirectional data and clock lines) to communicate with multiple devices.
  • Serial Communication - an asynchronous (no transmitted clock) data interface with at least two wires (data transmit and data receive; sometimes, additional signals are added to indicate when a device is ready to send or receive).
  • Pulse Width Modulation - a digital-to-analog conversion technique using a fixed frequency square wave of varying duty cycle, which can be easily converted to an analog signal between 0V and the full amplitude of the digital IC driving the signal.
  • Analog-to-Digital Conversion - measurement of an analog voltage and conversion of that voltage into a digital value.

All of the code in this tutorial can be found online, in our pcDuino Github repository. It’s not a bad idea to check there for any updates to the code since this tutorial was written.