-
Notifications
You must be signed in to change notification settings - Fork 161
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
Add additional examples as seen on arduino.cc #30
base: master
Are you sure you want to change the base?
Conversation
As a side note, I also noticed that this repo doesn't have CI set up. I think it might be worth having even just a code style formatter. I can create a separate PR with the yml file if you think it would be helpful. |
See arduino-libraries/Arduino_MKRGPS#1 for a lot of discussion that resulted from my attempt to do this. At that time we were using Travis CI, but the switch to using GitHub Actions for our CI system doesn't change the essence of the proposal, only the implementation details. Until such time as that is resolved, I don't think any additional attempts would be productive. In fact, at least one of the code formatting checks I did implement before it became apparent the project was controversial has since been removed: arduino-libraries/ArduinoIoTCloud#91 That said, I think it would be feasible to add a compilation test and spell check (though I am not the one who can make a final decision on that). You can see the current system for this here: The only change on that I would request is to fix the indentation of the .yml files because the 1 space initial indent makes the files really annoying to work with. |
Thanks for the feedback and for pointing me to the ongoing discussions. I can certainly add those workflow .yml files with 2 space indentation, which seems like the standard here. I will wait to do that for once we can get an extra set of eyes / thoughts on this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Despite the redundancy, I recommend using the original sketch names:
- KeyboardLogout
- KeyboardMessage
- KeyboardReprogram
These sketches have been known by these names for years, so this will avoid potential confusion.
To wake: Spacebar. | ||
|
||
Circuit: | ||
- Arduino Leonardo or Micro |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Arduino Leonardo or Micro | |
- native USB Arduino board (e.g., Leonardo, Micro, MKR, Nano 33 IoT) |
/* | ||
Keyboard Message test | ||
|
||
For the Arduino Leonardo and Micro. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the Arduino Leonardo and Micro. | |
For the native USB Arduino boards (e.g., Leonardo, Micro, MKR, Nano 33 IoT). |
|
||
This sketch demonstrates the Keyboard library. | ||
|
||
For Leonardo and Due boards only. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For Leonardo and Due boards only. | |
For native USB Arduino boards (e.g., Leonardo, Micro, MKR, Nano 33 IoT) only. |
currently selected Arduino using a final key combination (CTRL-U). | ||
|
||
Circuit: | ||
- Arduino Leonardo, Micro, Due, LilyPad USB, or Yún |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Arduino Leonardo, Micro, Due, LilyPad USB, or Yún | |
- native USB Arduino board |
As I brought up in arduino-libraries/Mouse#13 (comment): One thing to note is that these sketches already come bundled with the Arduino IDE (and Arduino Web Editor) under File > Examples > 09.USB > Keyboard. It does make sense to bundle the examples with the library since the IDE bundled examples are not available to arduino-cli and Arduino Pro IDE users. I don't like the idea of having duplicate code to maintain, but it also could be problematic to remove the built-in sketches since there are likely tutorials that point people to that menu path. I suppose we could replace the content of the built in sketches with a comment like: // This example has been moved to File > Examples > Keyboard > KeyboardLogout (should be adapted to make sense for Arduino Web Editor users also) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I recommend also adding the layout and schematic files from:
- https://github.com/arduino/Arduino/tree/master/build/shared/examples/09.USB/Keyboard/KeyboardLogout
- https://github.com/arduino/Arduino/tree/master/build/shared/examples/09.USB/Keyboard/KeyboardMessage
- https://github.com/arduino/Arduino/tree/master/build/shared/examples/09.USB/Keyboard/KeyboardReprogram
nnaka1 seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
Following #29, I went ahead and added the rest of the examples that I found on arduino.cc.
Once again, this is not my code, and I am simply making consistent in Github what I see on the official website.
Sources:
I noticed that the website itself contains
[Get Code]
links which are often broken or don't link to the source-code. I think it would be cool if we could change the links there to come to the examples here. I found this, but wasn't able to find the content for the specific example pages for which I could submit a PR. Please let me know if you have any advice on this!