Closed conejoninja closed 7 years ago
The easy way to establish if it is permissions related, is to run your program under sudo.
If it runs correctly, it is permissions related. If not, it is something else.
Please give that a try.
Also, from where did you obtain your Firmata? Try using the Firmata that is uploaded using Gort (http://gort.io/) it was created using ConfigurableFirmata and includes all the needed capabilities.
Same results with sudo and chmod the file, sometime it works, sometime it doesn't. I tried with both, installing firmata from gort and from the IDE.
I will try with a different board, in case something is wrong with this one, since it works at times, it may be the problem. I'm running out of ideas.
Did you try switching to the dev
branch of Gobot? There are some important Firmata/serial related changes in that branch.
Yes, I'm using dev branch, last commit 4e05c7f2c60604ae6f67ac4ae8f69378f6616d32
Even if this is a hardware problem, I think there could be some timeout, or at least some verbose option, that will help sort this out.
I close this issue, I used a different board and so far so good, no problems for now. Looked like a hardware problem.
I have the same problem with Arduino UNO and OSX 10.12.4
2017/05/23 15:51:22 Initializing connections...
2017/05/23 15:51:22 Initializing connection Firmata-A283223A5671633 ...
2017/05/23 15:51:22 Initializing devices...
2017/05/23 15:51:22 Initializing device LED-62505DE4731EE1DF ...
2017/05/23 15:51:22 Robot bot initialized.
2017/05/23 15:51:22 Starting Robot bot ...
2017/05/23 15:51:22 Starting connections...
2017/05/23 15:51:22 Starting connection Firmata-A283223A5671633 on port /dev/cu.usbmodem1421...
It just hangs here, and the program doesn't get loaded onto the Arduino
Hi @half2me did you try the dev
branch as I had suggested?
@deadprogram I'm just starting to learn go, so I'm not sure how I would go about doing that :)
Searching on the net is giving me forums where they say its not possible with go get
... wha?
@half2me go to your GOPATH/src/gobot.io/x/gobot/ and there just change the git branch with
git checkout dev && git pull origin dev
git checkout dev will change the branch to "dev" git pull origin dev will download latest updates of said branch
We will release an update with these fixes once we have confirmation from someone else that this issue and https://github.com/hybridgroup/gobot/issues/376 have been addressed in the dev
branch.
We've tested on OSX El Capitan, just need testing on some more recent OSX versions.
@deadprogram @conejoninja I just tested with dev branch... same problem :(
@half2me did you flash the Arduino with Firmata first?
@deadprogram nope :/ I was under the impression that gobot would handle flashing that, but I'll try now.
https://gobot.io/documentation/platforms/arduino/ first paragraph in "How to install" documents this.
@half2me I added some code to the firmata.Connect()
to some ideas that have emerged from this issue. The new code is much cleaner, and provides a new ConnectTimeout
field that defaults to 15 seconds.
In the case that Gobot is unable to connect, the updated Firmata "blink" example will display any connection errors: https://github.com/hybridgroup/gobot/blob/dev/examples/firmata_blink.go#L32
Also, the error displayed in the case of a timeout, suggests flashing Firmata on your Arduino, for people who might not realize that requirement.
I am going to reopen this issue until the new code makes it into a Gobot release. In the meantime, anyone who can test the dev
branch, your feedback in appreciated.
Nice, I can confirm the timeout is working properly, much better than before. In my case, it was a faulty hardware issue, that sometimes worked, sometimes not.
@deadprogram Awesome work, thank you! I will test the dev branch as much as possible and report any bugs I might find. 👍
Seems to be working for me also, The dev branch let me know I was having a permissions error. After running ln -s /usr/local/go/bin/go /usr/bin/go
I was able to run sudo go run blink.go
without issue.
Version 1.6.0 is now out, and includes all these fixes. Now closing, please reopen if needed. Thank you everyone!
I'm trying to connect to an Arduino Uno with Standard Firmata running on it, tried 3 different USB-cables and two different USB ports. Debian Jesie and user is on dialout group if that helps.
This issue happens most of the time, but not always. It just hangs at
And that's it, it stays there, nothing more.
More information, I'm working on a driver for a sensor, maybe the code crash or exits without closing properly the connection to /dev/ttyUSB0 (as an idea). But If I disconnect/re-connect the arduino, the problem is still there. Arduino IDE is able to flash the board without any problem, it only happens with gobot's code. Also, once it start happening, no matter what I run (my code, or gobot's examples), it's stuck there.
Probably it's a configuration issue of my setup, but not sure how to identify what is wrong