Is there some documentation somewhere on the code / libraries needed to change any of A0 to A5 (analog input) into D14 to D19 to be used as a digital outputs?
I tried to define something as D18, and it didn't recognize 'D18'. But D14-D19 is labelled as GPIO digital external on the pinout.
I need way more digital outs than analog ins. According to the Renesas doc'n it should be possible to define them as outs.
pinMode(An, OUTPUT);
where n is 0..5
or
pinMode(n, OUTPUT);
where n is 14..19
You can use the Ax notation for digital input/output.
I saw references to AVR boards. Is the pinMode command valid for Renesas boards?
What do you think?
I'm sorry if this seems like a dumb question to you. I have only worked with Leonardo style boards prior to this. The micro on this board has very daunting documentation, and it didn't seem like it would be as straightforward to change. I just wanted some assurance that the code I am not seeing behind the scenes, handles this board as well.
You asked a question.
You were given an answer.
You expressed doubt at the answer.
You continue to question what you've been told.
You've now let 2 hours go by, in which time you could have taken 5 minutes, tried a simple sketch and verified for yourself, that the initial answer you received was in fact truthful.
I don't think your question is dumb. I think you're displaying a complete lack of initiative. You're just wasting time. And I'm done doing likewise. Why ask questions if you don't believe the answers and won't try them out? Good-bye.
Not that you need or, I'm sure, want an explanation, but I am changing my layout from a Leonardo board to an Uno Board, to add some new capabilities, with OTA.
I do not have the Uno board yet, as purchasing has yet not been approved , but I am starting to work through how to modify my leonardo code for different pins and different arduino board ahead of time.
I cannot make a simple sketch to test at this time or take any more initiative than I have.
Sorry for wasting your time.
- You can easily test by just compiling a sketch like blink.
- If in doubt, consult the reference: https://docs.arduino.cc/language-reference/.
And FYI, Arduino has implemented a hardware abstraction layer so all Arduino specific functions will be available for all Arduino boards.
This is a bit odd... There are definitions for D0 to D15, but not for D16 to D19.
Thank you for this! This is very helpful. The info i need is further down in that file.
/****** WIRE CORE DEFINES ******/
#define WIRE_HOWMANY 2
#define WIRE_SDA_PIN 18 /* A4 */
#define WIRE_SCL_PIN 19 /* A5 */
#define WIRE1_SDA_PIN 27
#define WIRE1_SCL_PIN 26
static const uint8_t SDA = WIRE_SDA_PIN;
static const uint8_t SCL = WIRE_SCL_PIN;