From 90b7ee68d88bf1fafa77ce0320c6c13439984a39 Mon Sep 17 00:00:00 2001 From: npotts Date: Sun, 10 Jan 2016 00:50:15 -0700 Subject: [PATCH] Dont panic due to potential issues (especially in light of error #24) Signed-off-by: npotts --- samples/mcp3208.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/mcp3208.go b/samples/mcp3208.go index 497e56e..4d2184b 100644 --- a/samples/mcp3208.go +++ b/samples/mcp3208.go @@ -41,7 +41,7 @@ func main() { time.Sleep(1 * time.Second) val, err := adc.AnalogValueAt(0) if err != nil { - panic(err) + fmt.Println("Error: ", err) } fmt.Printf("analog value is: %v\n", val) }