From 0e373241a38e75225153667766283bd8855896b9 Mon Sep 17 00:00:00 2001 From: Karan Misra Date: Mon, 19 May 2014 11:29:16 +0530 Subject: [PATCH] doc: import all in code examples --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 2c825c5..d91b932 100644 --- a/README.md +++ b/README.md @@ -102,6 +102,7 @@ Use the **LED** driver to toggle LEDs on the BBB: ```go import "github.com/kidoman/embd" +import _ "github.com/kidoman/embd/host/all" ... embd.InitLED() defer embd.CloseLED() @@ -115,6 +116,7 @@ Even shorter when quickly trying things out: ```go import "github.com/kidoman/embd" +import _ "github.com/kidoman/embd/host/all" ... embd.InitLED() defer embd.CloseLED() @@ -128,6 +130,7 @@ BBB + **PWM**: ```go import "github.com/kidoman/embd" +import _ "github.com/kidoman/embd/host/all" ... embd.InitGPIO() defer embd.CloseGPIO() @@ -142,6 +145,7 @@ Control **GPIO** pins on the RaspberryPi / BeagleBone Black: ```go import "github.com/kidoman/embd" +import _ "github.com/kidoman/embd/host/all" ... embd.InitGPIO() defer embd.CloseGPIO() @@ -154,6 +158,7 @@ Could also do: ```go import "github.com/kidoman/embd" +import _ "github.com/kidoman/embd/host/all" ... embd.InitGPIO() defer embd.CloseGPIO() @@ -169,6 +174,7 @@ Or read data from the **Bosch BMP085** barometric sensor: ```go import "github.com/kidoman/embd" import "github.com/kidoman/embd/sensor/bmp085" +import _ "github.com/kidoman/embd/host/all" ... bus := embd.NewI2CBus(1) ... @@ -183,6 +189,7 @@ Even find out the heading from the **LSM303** magnetometer: ```go import "github.com/kidoman/embd" import "github.com/kidoman/embd/sensor/lsm303" +import _ "github.com/kidoman/embd/host/all" ... bus := embd.NewI2CBus(1) ...