INTRODUCTION TO THE RASPBERRY PI +
ARDUINO APPROACH
Raspberry Pi and Arduino are both popular and inexpensive
boards for learning programming and allowing
user code to interact with real-world systems through various sensors and actuators. While Raspberry Pi and
Arduino are alike in size and cost, they are quite
different in what they are and how they are used.
An Arduino is a microcontroller programmed in C.
The primary way to interact with an Arduino is through
a serial-to-USB cable that sends ASCII characters. The
Arduino is a microcontroller and not truly a computer
and that leads to several advantages and limitations.
One of the primary advantages of a microcontroller
is that it can easily execute tasks at hard real-time
intervals based on a timer interrupt. An Arduino is also
capable of interacting with many sensors and actuators
directly through on-board analog-to-digital converters,
PWM generators, and pin interrupts for fast encoder
reading. An Arduino Uno has an 8-bit microprocessor
running at 16 MHz with 32 KB of flash memory and
2 KB of SRAM