-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Add ESP-C3-M1-I-Kit board #6938
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 3 commits
8e0f9d6
a402615
e512bdd
4c6d23a
f8fdb5e
d9c508e
8ee7285
ddaa4f5
15155af
461702b
f22b49b
13a3def
8b5302e
62ed322
fb00d6e
ebd27cd
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,40 @@ | ||
#ifndef Pins_Arduino_h | ||
#define Pins_Arduino_h | ||
|
||
#include <stdint.h> | ||
|
||
#define EXTERNAL_NUM_INTERRUPTS 30 | ||
#define NUM_DIGITAL_PINS 30 | ||
#define NUM_ANALOG_INPUTS 6 | ||
|
||
#define analogInputToDigitalPin(p) (((p)<NUM_ANALOG_INPUTS)?(analogChannelToDigitalPin(p)):-1) | ||
#define digitalPinToInterrupt(p) (((p)<NUM_DIGITAL_PINS)?(p):-1) | ||
#define digitalPinHasPWM(p) (p < EXTERNAL_NUM_INTERRUPTS) | ||
|
||
static const uint8_t LED_BUILTIN = 18; | ||
static const uint8_t LED_BUILTIN = 19; | ||
#define BUILTIN_LED LED_BUILTIN // backward compatibility | ||
|
||
static const uint8_t LED_GREEN = 4; | ||
static const uint8_t LED_RED = 3; | ||
static const uint8_t LED_BLUE = 5; | ||
|
||
static const uint8_t TX = 18; | ||
static const uint8_t RX = 19; | ||
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. This is the correct pins used in this boards. GPIO18 and 19 are LEDs and USB JTAG/CDC.
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 |
||
|
||
static const uint8_t SDA = 4; | ||
static const uint8_t SCL = 5; | ||
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. My suggestion based on the boards layout would be:
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 with standard ESP32-C3 definition. |
||
|
||
static const uint8_t SS = 23; | ||
static const uint8_t MOSI = 21; | ||
static const uint8_t MISO = 22; | ||
static const uint8_t SCK = 28; | ||
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. the above four pins are not recommended for use or do not exist on the ESP32-C3. These should be remapped to valid 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. @wmjohnanderson - suggestion:
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. |
||
|
||
static const uint8_t A0 = 1; | ||
static const uint8_t A1 = 2; | ||
static const uint8_t A2 = 4; | ||
static const uint8_t A3 = 5; | ||
static const uint8_t A4 = 6; | ||
static const uint8_t A5 = 13; | ||
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. GPIO 0 - 5 are the only ADC pins, GPIO 13 does not exist. 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. @wmjohnanderson - suggestion:
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. |
||
|
||
#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.
Duplicate pin define... which is it?
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.
@wmjohnanderson - suggestion:
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.
Fixed.