From 8d0291ab55339ec4fafda096b50789e8ff9b421d Mon Sep 17 00:00:00 2001 From: Avik Sengupta Date: Mon, 15 Jul 2019 00:15:20 +0100 Subject: [PATCH] Update README.md --- README.md | 45 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 78a5802..95a7953 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,46 @@ # JuliaBerry -[![Build Status](https://travis-ci.org/aviks/JuliaBerry.jl.svg?branch=master)](https://travis-ci.org/aviks/JuliaBerry.jl) +An omnibus package with a high level API for controlling peripherals on the Raspberry Pi computer. Currently has support for the GPIO pins on the Pi, and the ExplorerHat. -An omnibus package with a high level API for controlling peripherals on the Raspberry Pi computer. +## GPIO + +### Generic Pins + +``` +x = OutputPin(17) +on(x) +off(x) +``` + +### LED + +``` +x = LED(17) +on(x) +off(x) +``` + +### Motors + +``` +x = Motor(17, 23) +forward(x, 50) +stop(x) +backward(x, 50) +stop(x) +``` + +## Explorer Hat + +``` +using JuliaBerry.ExplorerHat + +on(ExplorerHat.led[1]) +on.(ExplorerHat.led) +off.(ExplorerHat.led) + +on(ExploerHat.output[1]) + +forward(ExplorerHat.motor[1], 75) +stop(ExplorerHat.motor[1]) +```