-
Notifications
You must be signed in to change notification settings - Fork 7.6k
ADD: heltec wsl v3 pinout information #7883
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
#ifndef Pins_Arduino_h | ||
#define Pins_Arduino_h | ||
|
||
#include <stdint.h> | ||
|
||
#define Wireless_Stick_Lite true | ||
#define DISPLAY_HEIGHT 0 | ||
#define DISPLAY_WIDTH 0 | ||
|
||
#define EXTERNAL_NUM_INTERRUPTS 16 | ||
#define NUM_DIGITAL_PINS 40 | ||
#define NUM_ANALOG_INPUTS 15 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed |
||
|
||
#define analogInputToDigitalPin(p) (((p)<20)?(analogChannelToDigitalPin(p)):-1) | ||
#define digitalPinToInterrupt(p) (((p)<40)?(p):-1) | ||
#define digitalPinHasPWM(p) (p < 34) | ||
|
||
static const uint8_t LED_BUILTIN = 35; | ||
#define BUILTIN_LED LED_BUILTIN // backward compatibility | ||
#define LED_BUILTIN LED_BUILTIN | ||
|
||
static const uint8_t TX = 44; | ||
static const uint8_t RX = 43; | ||
gguerreromx marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
static const uint8_t SDA = 2; | ||
static const uint8_t SCL = 3; | ||
|
||
static const uint8_t SS = 34; | ||
static const uint8_t MOSI = 35; | ||
static const uint8_t SCK = 36; | ||
static const uint8_t MISO = 37; | ||
|
||
static const uint8_t A0 = 1; | ||
static const uint8_t A1 = 2; | ||
static const uint8_t A2 = 3; | ||
static const uint8_t A3 = 4; | ||
static const uint8_t A4 = 5; | ||
static const uint8_t A5 = 6; | ||
static const uint8_t A6 = 7; | ||
static const uint8_t A10 = 12; | ||
static const uint8_t A12 = 14; | ||
static const uint8_t A13 = 15; | ||
static const uint8_t A14 = 16; | ||
static const uint8_t A15 = 17; | ||
static const uint8_t A16 = 18; | ||
static const uint8_t A17 = 19; | ||
static const uint8_t A18 = 20; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should be analog ADC See also the Heltec Wifi Lora V3 pins: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same comment as above about which pins to include. Either way works. However, why do your GPIO pins change from being A+1 to A+2 starting at A10? That doesn't seem right? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed, it didn't make sense (see above) |
||
|
||
static const uint8_t T0 = 1; | ||
static const uint8_t T1 = 2; | ||
static const uint8_t T2 = 3; | ||
static const uint8_t T3 = 4; | ||
static const uint8_t T4 = 5; | ||
static const uint8_t T5 = 6; | ||
static const uint8_t T6 = 7; | ||
Comment on lines
+49
to
+55
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should be touch See also the Heltec Wifi Lora V3 pins: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I didn't placed them since they do not exist as an available pin in the board itself (https://resource.heltec.cn/download/Wireless_Stick_Lite_V3/HTIT-WSL_V3.png). They can be placed if required? Should I place them? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's a totally fair point. I added all of them because that's how it was here. I kind of agree with your point that we should only include pins which are actually available. But all the other heltec v3 pin files include all of them. Either way seems fine. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am hardly a tinkerer when it comes to electronics and for that reason I find it easier to think about what i can create/modify if there is a correlation between what I see in hardware and in code. That is why I believe showing only available pins is the right way to go. If there is no issue I would like to be kept as is. In the other it didn't make much sense my logic of separating them by ADC#_ and Ax and A1x so I did fix the numeration to be continuous. |
||
|
||
static const uint8_t Vext = 36; | ||
static const uint8_t LED = 35; | ||
|
||
#endif /* Pins_Arduino_h */ |
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.
Please use a different macro name so we can distinguish this from V1. I would suggest
#define Wireless_Stick_Lite_V3 true
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.
To my understanding, four main variants of the esp32/lora heltec boards exist, with I believe, three revisions each. While I understand the reasoning behind placing the version in the definition, this attribute is mainly used with their library (https://github.com/HelTecAutomation/Heltec_ESP32).
This definition allows the library to know what features are available in the board (big screen, small screen, no screen), allow external voltage, etc. (See code: https://github.com/HelTecAutomation/Heltec_ESP32/blob/master/src/heltec.cpp).
Since there is no "board hardware difference" between versions 1,2,3, placing this definition allows the library to work as expected and without depending on that library to update (since it hasn't updated for some revisions).
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.
The
Wireless_Stick_Lite
and theWireless_Stick_Lite_V3
are extremely different board hardware. The only thing similar is the form factor. The V3 uses a new ESP32-S3 cpu, different lora module, totally different pin numbers, and even different numbers of pins.I understand you're trying to make this work with the heltec library, but please don't use a duplicate board macro here just to make an external library work. I have a PR open in that repo to support newer boards. You can also fork that repo and use your own version of the heltec library. Until they merge my PR there, I've been pointing PlatformIO at my own fork:
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 do agree in your point since editing the repo is the actual solution and not doing it half way as I was attempting.
I just saw you PR and I believe it is a great idea to actually separate the features from the boards. Solves current issues and make it easier to add new boards in the future.
I hope it is accepted promptly.