How do I activate the Spresense pin in ArduinoIDE?

Asked 2 years ago, Updated 2 years ago, 42 views

I am very sorry to ask you a basic question, but could you tell me how to control the D05 pin of the Spresense with ArduinoIDE?
I am troubled by the error that was not declared in the code below.PWM1 instead of D05 has the same error.

void setup(){
  pinMode (D05, OUTPUT);
  digitalWrite (D05, LOW);
}

Below is an error.

"D05" was not decoded in this scope

Thank you for your cooperation.

spresense

2022-09-30 10:19

1 Answers

I solved myself.
Arduino did not understand the manners of defining with pin numbers.It worked as follows.

#define D055

void setup() {
    pinMode (D05, OUTPUT);
    digitalWrite (D05, LOW);
}


2022-09-30 10:19

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.