BLE Nano V2 read Button or Write to GPIO Pins


#1

I want to connect a Button to the BLE Nano 2. How I can read a state of a GPIO Pin?


#2

Hello
As on an Arduino.

void setup() {
Serial.begin(9600);
pinMode(D0, INPUT);
}

void loop() {
delay(1000);
int val = digitalRead(D0);
Serial.println(val);
}

Best regrads
Christian


#3

Thanks that works :slight_smile: