Skip to content

Latest commit

 

History

History
114 lines (82 loc) · 2.48 KB

File metadata and controls

114 lines (82 loc) · 2.48 KB

NAME

Module for GPIO, LED, PWM, SPI, I2C, MMIO, and Serial Linux peripheral I/O interfaces.

SYNOPSIS

local periphery = require('periphery')

-- Module Version
periphery.version   <string>

-- Submodules
periphery.GPIO
periphery.LED
periphery.PWM
periphery.SPI
periphery.I2C
periphery.MMIO
periphery.Serial

-- Helper Functions
periphery.sleep(seconds <number>)
periphery.sleep_ms(milliseconds <number>)
periphery.sleep_us(microseconds <number>)

DESCRIPTION

Property periphery.version  immutable <string>

Version of periphery module as a string (e.g. "1.0.0").


periphery.GPIO

GPIO module. See GPIO documentation for more information.


periphery.LED

LED module. See LED documentation for more information.


periphery.PWM

PWM module. See PWM documentation for more information.


periphery.SPI

SPI module. See SPI documentation for more information.


periphery.I2C

I2C module. See I2C documentation for more information.


periphery.MMIO

MMIO module. See MMIO documentation for more information.


periphery.Serial

Serial module. See Serial documentation for more information.


periphery.sleep(seconds <number>)

Sleep for the specified number of seconds.


periphery.sleep_ms(milliseconds <number>)

Sleep for the specified number of milliseconds.


periphery.sleep_us(microseconds <number>)

Sleep for the specified number of microseconds.

EXAMPLE

local periphery = require('periphery')

print("Hello World!")
periphery.sleep_ms(500)
print("Hello World 500ms later!")