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

Make compatible with Due and add boards in boards.h #7

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

XuGuohui
Copy link

  1. Make library compatible with Due except the examples
  2. Add board definition in boards.h and do radio reset on every RedBearLab boards

if (REDBEARLAB_SHIELD_V1_1 == aci_stat->aci_pins.board_name)
if (REDBEARLAB_SHIELD_V1_1 == aci_stat->aci_pins.board_name
|| REDBEARLAB_SHIELD_V2012_07 == aci_stat->aci_pins.board_name
|| REDBEARLAB_SHIELD_V2 == aci_stat->aci_pins.board_name
Copy link
Contributor

Choose a reason for hiding this comment

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

This should not be required for the V2 shield, Blend, and, Blend micro as the nRF8001 Reset pin is not inverted in those boards. This change was required only for the v1.1 Shield and the v2012_07 Shield. Please confirm.

Copy link
Author

Choose a reason for hiding this comment

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

These code is for the radio reset, not for the hareware reset, so it dose not care if the Reset pin is inverted or not. The radio reset is required for all RedBearLab boards, otherwise, if Reset pin is UNUSED, nRF8001 will not work properly, such as can not set local name if re-upload sketch.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think in the V2.0 and later boards, the Arduino RESET line is also being routed to the nRF8001 so even if the radio reset command is not sent, the code will work. The the code above is a work around specific to the v1.1 and v2012_07 shield versions which did not map any Arduino pin to the nRF8001 RESET and only had a POR circuit.
Since the code here is only a work around I am very reluctant to add it for all redbearlab boards that do not have this problem. Please confirm my understanding.

Copy link
Author

Choose a reason for hiding this comment

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

I totally understand what you mean. There is one case I tried that if uploaded sketch and BLE works well,and then I change the BLE Local Name in the sketch and upload again without preesing the Arduino RESET, then the BLE Local Name showed on App will not change. Please help confirm what I tried and tell me the reason if so. Thanks a lot!

@CLAassistant
Copy link

CLAassistant commented Aug 2, 2019

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
0 out of 2 committers have signed the CLA.

❌ guohui
❌ XuGuohui


guohui 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.

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

Successfully merging this pull request may close these issues.

3 participants