From 1895c84912f23ec132232418ce6f18396e54ae82 Mon Sep 17 00:00:00 2001 From: Ron Evans Date: Mon, 22 Apr 2019 11:07:43 +0200 Subject: [PATCH] docs: improve godocs info used by main package to explain what the package is and how to use it properly Signed-off-by: Ron Evans --- drivers.go | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers.go b/drivers.go index 75c84a0..932f9c8 100644 --- a/drivers.go +++ b/drivers.go @@ -13,27 +13,27 @@ // ) // // func main() { -// machine.I2C0.Configure(machine.I2CConfig{}) -// sensor := bmp180.New(machine.I2C0) -// sensor.Configure() +// machine.I2C0.Configure(machine.I2CConfig{}) +// sensor := bmp180.New(machine.I2C0) +// sensor.Configure() // -// connected := sensor.Connected() -// if !connected { -// println("BMP180 not detected") -// return -// } +// connected := sensor.Connected() +// if !connected { +// println("BMP180 not detected") +// return +// } // println("BMP180 detected") // -// for { -// temp, _ := sensor.Temperature() -// println("Temperature:", float32(temp)/1000, "ºC") +// for { +// temp, _ := sensor.Temperature() +// println("Temperature:", float32(temp)/1000, "ºC") // -// pressure, _ := sensor.Pressure() -// println("Pressure", float32(pressure)/100000, "hPa") +// pressure, _ := sensor.Pressure() +// println("Pressure", float32(pressure)/100000, "hPa") // -// time.Sleep(2 * time.Second) -// } -// } +// time.Sleep(2 * time.Second) +// } +// } // // Each individual driver is contained within its own sub-package within this package and // there are no interdependencies in order to minimize the final size of compiled code that