{"action":"created","issue":{"url":"https://api.github.com/repos/hybridgroup/gobot/issues/241","labels_url":"https://api.github.com/repos/hybridgroup/gobot/issues/241/labels{/name}","comments_url":"https://api.github.com/repos/hybridgroup/gobot/issues/241/comments","events_url":"https://api.github.com/repos/hybridgroup/gobot/issues/241/events","html_url":"https://github.com/hybridgroup/gobot/issues/241","id":114120787,"number":241,"title":"Reading from Arduino analog pin A5 ","user":{"login":"fjukstad","id":1394111,"avatar_url":"https://avatars.githubusercontent.com/u/1394111?v=3","gravatar_id":"","url":"https://api.github.com/users/fjukstad","html_url":"https://github.com/fjukstad","followers_url":"https://api.github.com/users/fjukstad/followers","following_url":"https://api.github.com/users/fjukstad/following{/other_user}","gists_url":"https://api.github.com/users/fjukstad/gists{/gist_id}","starred_url":"https://api.github.com/users/fjukstad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fjukstad/subscriptions","organizations_url":"https://api.github.com/users/fjukstad/orgs","repos_url":"https://api.github.com/users/fjukstad/repos","events_url":"https://api.github.com/users/fjukstad/events{/privacy}","received_events_url":"https://api.github.com/users/fjukstad/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-29T18:48:04Z","updated_at":"2015-10-30T11:07:20Z","closed_at":null,"body":"Hey,\r\n\r\nI'm trying to read some input on analog pin A5 from an Arduino Uno, but it fails with a `index out of bounds` at `github.com/hybridgroup/gobot/platforms/firmata/firmata_adaptor.go:206`. This is how I get things going: \r\n\r\n```\r\ngbot := gobot.NewGobot()\r\nfirmataAdaptor := firmata.NewFirmataAdaptor(\"firmata\", \"/dev/cu.wchusbserial1420\")\r\nsensor := gpio.NewAnalogSensorDriver(firmataAdaptor, \"sensor\", \"5\")\r\nwork := func() {\r\n\t\tgobot.On(sensor.Event(\"data\"), func(data interface{}) {\r\n\t\t\tfmt.Println(data) \r\n\t\t})\r\n}\r\nrobot := gobot.NewRobot(\"myrobot\",\r\n\t\t[]gobot.Connection{firmataAdaptor},\r\n\t\t[]gobot.Device{sensor},\r\n\t\twork,\r\n\t)\r\ngbot.AddRobot(robot)\r\ngbot.Start()\r\n```\r\n\r\nAny idea of what might be wrong? It works fine to read analog input from pin A0 and A1. \r\n\r\nCheers! \r\n\r\n"},"comment":{"url":"https://api.github.com/repos/hybridgroup/gobot/issues/comments/152497194","html_url":"https://github.com/hybridgroup/gobot/issues/241#issuecomment-152497194","issue_url":"https://api.github.com/repos/hybridgroup/gobot/issues/241","id":152497194,"user":{"login":"sgilani","id":14346765,"avatar_url":"https://avatars.githubusercontent.com/u/14346765?v=3","gravatar_id":"","url":"https://api.github.com/users/sgilani","html_url":"https://github.com/sgilani","followers_url":"https://api.github.com/users/sgilani/followers","following_url":"https://api.github.com/users/sgilani/following{/other_user}","gists_url":"https://api.github.com/users/sgilani/gists{/gist_id}","starred_url":"https://api.github.com/users/sgilani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sgilani/subscriptions","organizations_url":"https://api.github.com/users/sgilani/orgs","repos_url":"https://api.github.com/users/sgilani/repos","events_url":"https://api.github.com/users/sgilani/events{/privacy}","received_events_url":"https://api.github.com/users/sgilani/received_events","type":"User","site_admin":false},"created_at":"2015-10-30T11:07:20Z","updated_at":"2015-10-30T11:07:20Z","body":"You are using firmata and A4 & A5 is by default for I2C, open the StandardFirmata.ino and disable I2C, then all must be fine i think."}}