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 <ron@hybridgroup.com>
This commit is contained in:
Ron Evans
2019-04-22 11:07:43 +02:00
parent 3c68510cbc
commit 1895c84912
+16 -16
View File
@@ -13,27 +13,27 @@
// ) // )
// //
// func main() { // func main() {
// machine.I2C0.Configure(machine.I2CConfig{}) // machine.I2C0.Configure(machine.I2CConfig{})
// sensor := bmp180.New(machine.I2C0) // sensor := bmp180.New(machine.I2C0)
// sensor.Configure() // sensor.Configure()
// //
// connected := sensor.Connected() // connected := sensor.Connected()
// if !connected { // if !connected {
// println("BMP180 not detected") // println("BMP180 not detected")
// return // return
// } // }
// println("BMP180 detected") // println("BMP180 detected")
// //
// for { // for {
// temp, _ := sensor.Temperature() // temp, _ := sensor.Temperature()
// println("Temperature:", float32(temp)/1000, "ºC") // println("Temperature:", float32(temp)/1000, "ºC")
// //
// pressure, _ := sensor.Pressure() // pressure, _ := sensor.Pressure()
// println("Pressure", float32(pressure)/100000, "hPa") // 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 // 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 // there are no interdependencies in order to minimize the final size of compiled code that