-
Notifications
You must be signed in to change notification settings - Fork 3
Hardware IO
This section explains the architecture implemented by Scarlet to use different communication buses on the BeagleBone Black and Raspberry Pi.
Scarlet essentially gives you two layers of abstraction.
Layer 1: I/O Systems
The first one is (mostly) platform independent I/O, through use of interfaces like IDigitalOut
, IAnalogueIn
, and the systems that implement them. This allows you to talk to hardware while allowing your code to be easy to port between different platforms, like between the Raspberry Pi and BeagleBone Black. Other devices that allow for these communications can also be created and used interchangably. For example, the PCA9685 is a external device that has PWM outputs exposed via IPWMOutput
inheriting objects.
Layer 2: Components
The second layer is component classes. These are completely platform-independent helpers that allow you to talk to a certain kind of device, for example a sensor. These use the Scarlet hardware interfaces mentioned above for you to provide a simple way to communicate with external devices, like sensors, motors, etc. To use these, you do not need to understand or know how the device communicates. Just connect the device, do any relevant hardware setup, provide necessary configuration information, and you can use the devices at a high level. This allows you to quickly implement capabilities into your project.
For example, you'd like to sense temperature. To do this, simply select a sensor from the Supported Sensors list, interface it appropriately, set up the I/O systems (e.g. the I2C bus), then initialize an instance of the sensor using that information. You can now read temperature without ever touching device registers or communication patterns.
Quick Links:
NuGet
Pin Diagrams: RPi | BBB
Developers: CaiB, Baldstrom
General Info:
Home
Common Issues
Getting Started
Supported Devices
Sections:
Logging
DataLog
Filters
Hardware I/O:
- BeagleBone Black
- Raspberry Pi
- Pin Diagrams: RPi | BBB
- GPIO: Using | For Beginners
- PWM: Using | For Beginners
- ADC: Using | For Beginners
- I2C: Using | For Beginners
- SPI: Using | For Beginners
- UART: Using | For Beginners
- CAN: Using | For Beginners
Networking
Sensors
StateStore
Other: Interesting Case Studies