Core Denko functionality for mruby, aiming for an interface as close to the CRuby gem as possible.
Implements 5 low-level GPIO features:
- Digital Input / Output
- Analog Input / Output
- PWM Ouput
As well as:
- Peripherals which depend on only these features
- Shared peripheral functionality, in
Denko::Behaviors
- Version
- Behaviors
- State
- Component
- Callbacks
- Reader
- SinglePin
- InputPin
- OutputPin
- MultiPin
- DigitalIO
- Input (only
#read
, no#poll
or#listen
yet) - Output
- Button
- Input (only
- AnalogIO
- Input (only
#read
, no#poll
or#listen
yet) - Output
- Input (only
- PulseIO
- PWMOutput
- Buzzer
- LED
- Base (
LED#new
aliases toLED::Base.new
) - RGB
- SevenSegment
- Base (
- Motor
- L298 (or other full-bridge driver with same interface)
- Stepper (EasyDriver or other driver with compatible interface)
- Display
- HD44780 -
mruby-denko-hd44780
- Link
- HD44780 -
- DigitalIO
- RotaryEncoder
- Motor
- Servo / ESC
See mruby-denko for templates.
- No multithreading, so no polling or listening in a separate thread.
- No mutexes
Component#new
defaults to$board
ifboard:
not given.- Board gems should define
$board
as an instance after loading.
This gem is pure mruby, and requires a compatible mruby implementation of Denko::Board
for your microcontroller. Currently the only implementation is for the ESP32, mruby-denko-board-esp32.
This gem also specifies many mruby dependencies, needed to get similar functionality to CRuby. They will automatically be included in the build. See mrbgem.rake
.