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

Add additional examples as seen on arduino.cc #30

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nnaka
Copy link

@nnaka nnaka commented Mar 7, 2020

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!

@nnaka
Copy link
Author

nnaka commented Mar 8, 2020

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.

@per1234
Copy link
Contributor

per1234 commented Mar 8, 2020

I think it might be worth having even just a code style formatter

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:
https://github.com/arduino-libraries/Arduino_LSM6DS3/tree/master/.github/workflows

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.

@nnaka
Copy link
Author

nnaka commented Mar 8, 2020

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.

Copy link
Contributor

@per1234 per1234 left a 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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- 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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Arduino Leonardo, Micro, Due, LilyPad USB, or Yún
- native USB Arduino board

@per1234
Copy link
Contributor

per1234 commented Mar 14, 2020

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)

Copy link
Contributor

@per1234 per1234 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


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.

@per1234 per1234 added topic: documentation Related to documentation for the project type: enhancement Proposed improvement labels Mar 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: documentation Related to documentation for the project type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants