-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
BB Blink demo is misleading and its problems poorly documented - fix included #505
Comments
Hi @eric-s-raymond thanks for looking at this. A couple comments:
|
I am aware that you have a separate example for usr1. Part of what I am trying to convey is that the "main" demo blinking P9_12 is poorly written as is and should be replaced with an example that blinks a visible LED and provides an indication in its output of when the LED should be blinking. What is the point of a demo that doesn't demo without special attached equipment when you have one that works with the bare board? Yes, I was running under a development account I created. I am aware that the debian account is in group gpio. It is good practice to inform the user up front of preconditions like that. The comment I added was as important as the minor code modification. I don't think restoring the default LED binding is very important as long as warning that it will be left unbound until the next reboot is added to the header comment. Again, if you do not inform users of these things they are likely to be surprised, confused, and have unnecessary problems I chose usr1 because in normal operation on the BB (as opposed to reflashing) the SD is only accessed if the user does so explicitly. It is thus the least ambiguous pin to use as a success indicator The incoming merge request addresses all these issues. I don't know how to change the doc page in the repository; if I did, I'd replace the beaglebone_blink_usr_led.go with a link to the improved version. |
Fully agree, that a brief description for all examples will improve the usability. For me - I mostly add a "Println("now on")" or whatever if the example is not working for the first time, just to start investigating a wiring mistake. IMO this is also a good experience for new users, to learn how to investigate such problems. So I would not add additional output to console by default for simple examples like LED or buzzer. But more important for me would be an output in case of internal errors - most examples just drop it. @eric-s-raymond what do you think about? Your provided change do not check the result of |
Sorry, that was 5 years ago now and I've forgotten the context. |
Yes, a quite long delay 😄 . Anyway thanks for the fast response! @deadprogram what do you think about:
Thanks Thomas |
I'm going to close this issue, because newer examples contains some wiring information, so the user can have a look and will see how it works in general. |
I modified the blink demo to be clear about what it''s toggling and when, and what its prerequisites are.
This solves several specific problems:
As is, the demo has no visible result unless you happen to have an LED hooked to the P9_12 pin.
It can silently fail due to the permissions issue.
User doesn't know where to look or what success looks like.
Not mentioned in the comment: Whatever library code this demo is using fails to restore the default behavior of blinking on mmc0 access - instead it's not triggerred by anything, That's a bug.
The text was updated successfully, but these errors were encountered: