Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Microbit OSX signal:killed #404

Open
willis7 opened this issue Apr 7, 2017 · 10 comments
Open

Microbit OSX signal:killed #404

willis7 opened this issue Apr 7, 2017 · 10 comments

Comments

@willis7
Copy link

willis7 commented Apr 7, 2017

I can't seem to get the ubit to work with gobot. I did the firmware install with gort:

gort microbit download
gort microbit install /Volumes/MICROBIT

but when I run (with the example):

GODEBUG=cgocheck=0 go run main.go "BBC micro:bit [tupov]"

I get signal: killed.

I used LightBlue to discover the Bluetooth name on the mac, but the ubit isn't doing anything.

Happy to make a PR with doc updates if I can fix it.

@deadprogram
Copy link
Member

Hi @willis7 I think your problem is probably the same as #401

@deadprogram deadprogram added the bug label Apr 8, 2017
@willis7
Copy link
Author

willis7 commented Apr 9, 2017

Thanks for getting back to me. If I add the flags as suggested then the application gets a little further, but there's still no output on the device:

wills7:pomodoro-bit/ $ GODEBUG=cgocheck=0 go run -ldflags -s main.go "BBC micro:bit [tupov]"                                                                                                                                                                         [17:05:00]
2017/04/09 17:05:07 Initializing connections...
2017/04/09 17:05:07 Initializing connection BLEClient-666C9345B9D5A4E4 ...
2017/04/09 17:05:07 Initializing devices...
2017/04/09 17:05:07 Initializing device Microbit LED-583534B99F62E730 ...
2017/04/09 17:05:07 Robot blinkBot initialized.
2017/04/09 17:05:07 Starting Robot blinkBot ...
2017/04/09 17:05:07 Starting connections...
2017/04/09 17:05:07 Starting connection BLEClient-666C9345B9D5A4E4...
2017/04/09 17:05:10 Starting devices...
2017/04/09 17:05:10 Starting device Microbit LED-583534B99F62E730...
2017/04/09 17:05:10 Starting work...

Currently just using the following:

func main() {
        bleAdaptor := ble.NewClientAdaptor(os.Args[1])
        ubit := microbit.NewLEDDriver(bleAdaptor)

        work := func() {
                ubit.Blank()
                gobot.After(1*time.Second, func() {
                        ubit.WriteText("Hello")
                })
                gobot.After(7*time.Second, func() {
                        ubit.Smile()
                })
        }

        robot := gobot.NewRobot("blinkBot",
                []gobot.Connection{bleAdaptor},
                []gobot.Device{ubit},
                work,
        )

        robot.Start()
}

@deadprogram
Copy link
Member

Hi @willis7 try connecting by ID instead of name, that might help you out.

@deadprogram
Copy link
Member

This might sound silly, but did you rotate the Microbit in a circle first after flashing the firmware, but before trying to connect?

Step 4 from here:
https://github.com/sandeepmistry/node-bbc-microbit#flashing-microbit-firmware

We absolutely need to add this to the Gobot docs.

deadprogram added a commit that referenced this issue Apr 12, 2017
…ibration step to README

Signed-off-by: deadprogram <[email protected]>
@deadprogram
Copy link
Member

The docs have now been updated. @willis7 did that solve your problem?

@willis7
Copy link
Author

willis7 commented Apr 12, 2017

Hi @deadprogram,

I stupidly took the ubit into work and haven't been able to test it. I will test it tomorrow and get back to you.

If it helps I had actually performed the calibration step. I haven't tried connecting by ID, so I shall give that a go.

@deadprogram
Copy link
Member

Hi @willis7 any update on testing this? Thanks!

@willis7
Copy link
Author

willis7 commented May 2, 2017

Apologies for the delay.

I had performed the rotation and got the smiley face.

I tried using the UUID of the device, but it didn't even reach the Starting work... line in the logs.

Are there any restrictions on versions? I'm fairly certain I had one of the pre-release devices.

@deadprogram
Copy link
Member

No restrictions I am aware of. That said, I do almost all of my work on Linux.

The ble package that Gobot uses is different for Linux vs. OSX, in that the OSX code uses the Mac's API. I will need to setup to do some further testing.

@willis7
Copy link
Author

willis7 commented May 3, 2017

Is there anything I can do my end to support the debugging?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants