docs: improve godocs formatting

Signed-off-by: Ron Evans <ron@hybridgroup.com>
This commit is contained in:
Ron Evans
2019-04-22 11:10:11 +02:00
parent 1895c84912
commit 7006a675ad
+22 -22
View File
@@ -3,35 +3,35 @@
// //
// Here is an example in TinyGo that uses the BMP180 digital barometer: // Here is an example in TinyGo that uses the BMP180 digital barometer:
// //
// package main // package main
// //
// import ( // import (
// "time" // "time"
// "machine" // "machine"
// //
// "github.com/tinygo-org/drivers/bmp180" // "github.com/tinygo-org/drivers/bmp180"
// ) // )
// //
// 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)
// } // }
// } // }
// //