Code Monkey home page Code Monkey logo

Comments (16)

Bazmundi avatar Bazmundi commented on May 14, 2024

Never mind, I found the mapping in the BBB manual. So it appears the demo expects you to add an LED does it? It doesn't appear to be using the USER LED so why wasn't the need to add an LED mentioned? What change does one make to get one of the USER LED to blink?

Looks like the "offending" code is in beaglebone.go. It doesn't appear to break out the USER LED. So question is the pin numbers are numeric in the code, the ball numbers on the chips are alphanumeric (A1 etc.). Do the numeric pin numbers in var pins = map[string]int{} map to the alphanumeric ball numbers with some simple algorithm?

from gobot.

zankich avatar zankich commented on May 14, 2024

@Bazmundi I added support for blinking usr leds in the dev branch. Here is an example
https://github.com/hybridgroup/gobot/blob/39d3795f5a5397ffc24c2278a0e8ae45c1a03f4f/examples/beaglebone_blink_usr_led.go

valid usr leds are usr0, usr1, usr2 and usr3

Can you please pull down the dev branch and verify?

from gobot.

Bazmundi avatar Bazmundi commented on May 14, 2024

@zankich thanks, first week of my Master's Dissertation so I will take a break this coming weekend to try the changes out and get back to you.

Thanks again.

Cheers,
B

from gobot.

Bazmundi avatar Bazmundi commented on May 14, 2024

Smoke'm if you've got'em.

I got a "panic: Not a valid pin result"

However, I am new to go and go building and I think I am still picking up the original install.

So, leave it with me, I need to muddle through this new build approach anyway.

Cheers,
Ray

from gobot.

Bazmundi avatar Bazmundi commented on May 14, 2024

Not sure this helps.

Still vague on the building side.

"go get" et all seemed not to want to pull from the /tree/dev from git source on web so I downloaded the zip copied the dev directory contents over the gobot directory under GOPATH.

Ran:

go get github.com/hybridgroup/gobot && go install github.com/hybridgroup/gobot/platforms/beaglebone

The second line I modified because it wasn't working and I assumed this would pick up the platform changes you added to dev (which was copied over gobot in GOPATH).

Then built.

Installed on bbb and got:

open /sys/devices/ocp.3/gpio-leds.8/leds/beaglebone:green:usr0/brightness: no such file or directory

That is better than panic? grimace

I think I have a bit of work to develop an understanding of the building so if you're happy to muddle through with me great. Otherwise I may actually hinder :(

Cheers,
Ray

from gobot.

Bazmundi avatar Bazmundi commented on May 14, 2024

Cold trail?

Anyone else?

What is the best way to go about this? Should I clean out all of the gobot installations and start clean with the dev branch? I am assuming the go caching mechanism was stopping me from picking up the dev (somehow)?

If so, how would I modify the following line?:
go get github.com/hybridgroup/gobot && go install github.com/hybridgroup/platforms/beaglebone

Will it be as straight forward as?:
go get github.com/hybridgroup/gobot/tree/dev && go install github.com/hybridgroup/platforms/beaglebone

Cheers,
Ray

from gobot.

deadprogram avatar deadprogram commented on May 14, 2024

@zankich can you please help out here?

from gobot.

zankich avatar zankich commented on May 14, 2024

@Bazmundi Sorry for the delayed response!

You should be able to switch to the dev branch with something like this

$ go get -u github.com/hybridgroup/gobot
$ cd $GOPATH/src/github.com/hybridgroup/gobot
$ git checkout dev
$ git pull origin dev
$ go install github.com/hybridgroup/gobot/platforms/beaglebone

As far as this error

Installed on bbb and got:

open /sys/devices/ocp.3/gpio-leds.8/leds/beaglebone:green:usr0/brightness: no such file or directory

Which operating system are you running on your beaglebone?

from gobot.

Bazmundi avatar Bazmundi commented on May 14, 2024

Yes of course I will help. Though I might be slow responding as ferociously working on Dissertation.

I will try the steps out this coming weekend here in sunny Adelaide Oz.

In the meantime. The software I am running is the out of the box Angstrom.

Happy to sort another linux so don't be afraid to ask if that is the problem.

from gobot.

zankich avatar zankich commented on May 14, 2024

@Bazmundi I tested the built in USR LED code on the new debian Image, so it appears that angstrom has a different USR LED location. I'll have to look at where the USR LED is on angstrom and get it resolved on that OS....

from gobot.

Bazmundi avatar Bazmundi commented on May 14, 2024

@zankich Great! Thanks. I am happy that my muddling may have helped. Thanks for the insight into the go getting aspect. I am with my morning coffee and will walk through your suggestion to double check in any event - just to make sure my back door antics wasn't the cause any glitches.

from gobot.

Bazmundi avatar Bazmundi commented on May 14, 2024

@zankich All good. I have caffeine, improved knowledge of go building and cross compiling for bbb, and also confirmed no hidden glitches. Same issue with:
open /sys/devices/ocp.3/gpio-leds.8/leds/beaglebone:green:usr0/brightness: no such file or directory

from gobot.

Bazmundi avatar Bazmundi commented on May 14, 2024

Yep, so I created a Debian SD card and, go figure, having trouble with SCP sending the blink executable from windoze host to BBB. Will update once I have sorted that problem.

Update. Yep. I took out the SD card and fell back to angstrom and I can scp the blinking file but once I run from Debian on SD card scp doesn't seem happy. Some "bug" reports on the issue on web so still sorting that :(

from gobot.

Bazmundi avatar Bazmundi commented on May 14, 2024

Yep. Sorted upload to BBB running Debian. I can't, for some dang reason, use scp from cygwin shell - which is coincidentally what I do for the Angstrom.

However, if I use my Tera Term I can SSH SCP transfer fine to the Debian (running off SD) and when I run the file the user LED is blinkingwell blinking!

I really should re-bomb my BBB with Debian but I will leave it as Angstrom if you like while you sort the Angstrom patch.

cheers
B

from gobot.

zankich avatar zankich commented on May 14, 2024

@Bazmundi that's great that it's working! I need to set up an angstrom environment and on my BBB to test the built in LED, but it should be a similar process as the Debian image.

from gobot.

Bazmundi avatar Bazmundi commented on May 14, 2024

@zankich Well, thanks for your good work.

from gobot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.