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 BananaPi-BIT Development Board Support #1810

Merged
merged 3 commits into from Sep 17, 2018
Merged

Add BananaPi-BIT Development Board Support #1810

merged 3 commits into from Sep 17, 2018

Conversation

yelvlab
Copy link
Contributor

@yelvlab yelvlab commented Aug 28, 2018

No description provided.

@lbernstone
Copy link
Contributor

Why not include the ADC pins (A0-A19) or the touch pins (T0-T9)?

@yelvlab
Copy link
Contributor Author

yelvlab commented Aug 28, 2018

ADC pin is included in P0-P19.Such as P1 is IO32(ADC1_CH4) P2 is IO33(ADC1_CH5) and so on

@stickbreaker
Copy link
Contributor

@yelvlab so if I want to do an analogRead(A0); it will automagically know to use the correct pin? Or will it generate a compiler error?

Chuck.

@lbernstone
Copy link
Contributor

The A## is a specific designation, that means ADCX_CHANNEL_Y. Making up labels just causes portability problems.

@yelvlab
Copy link
Contributor Author

yelvlab commented Aug 29, 2018

@stickbreaker Because our board uses a special shape and connector design, we changed the pin name to a unified Px, and because the intended use of the board is the primary user, we will unify the pin names. Avoid the same IO with multiple names, causing users to worry.
And you can see this page about our used conector .https://github.com/yelvlab/BPI-BIT/blob/master/pic/Interface_EN.JPG

@yelvlab
Copy link
Contributor Author

yelvlab commented Aug 29, 2018

@lbernstone I know it ,but the user of our board definition is relatively primitive. We are considering avoiding the user's doubts (the same IO multiple definitions A0 and P0), and unifying the pin name definition, then the Analog function or the Digital function of each pin will have The document is written.Later, we will also release a less customized development board, continuing the ESP32 Ax or Dx definition method and Arduino UNO appearance, but we are not ready yet, you can preview it first, the following is github https://github.com/yelvlab/BPI-UNO32

#define NUM_DIGITAL_PINS 40
#define NUM_ANALOG_INPUTS 16

#define analogInputToDigitalPin(p) (((p) < 20) ? (esp32_adc2gpio[(p)]) : -1)
Copy link
Contributor

Choose a reason for hiding this comment

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

This define is used to convert from A[n] to gpio pin. Since you are choosing not to define analog input pins should you change both NUM_ANALOG_INPUTS and analogInputtoDigitalPin() to reflect this choice?

#define NUM_ANALOG_INPUTS 0
#define analogInputToDigitalPin(p) -1

Chuck.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think the definition here can be retained, because we not only have to consider the primary users, but also the people with certain Arduino and ESP32 programming development foundations, they can not use our prepared P(n) in their own code , from the line definition A (n) such a pin, and, our board does not give up the ADC function.

@me-no-dev me-no-dev merged commit 3028ec4 into espressif:master Sep 17, 2018
@me-no-dev
Copy link
Member

Done! Where can I get one of those boards? I collect all kinds of ESP based things (not TTGOs and similar though). Your board seems to follow the MicroBIT thing :) don't have such yet

@yelvlab
Copy link
Contributor Author

yelvlab commented Sep 18, 2018

Hi ,@me-no-dev

You can find it on AliExpress.AliExpress Banana pi bit

@me-no-dev
Copy link
Member

thanks @yelvlab will get one :)

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.

None yet

4 participants