Is there any way to use mbed functions instead of Arduino DigitalWrite?
Just discovered that DigitalWrite function is very unreliable. Writing twice HIGH cause 10us 'spike' of LOW signal. I found it during io check of my board - trying to work with external ADC converter. So I simplified the code to minimum:
#include <ArduinoBLE.h>
void setup() {
Serial.begin(9600); // initialize serial communication
//while (!Serial);
delay(2000);
pinMode(7, OUTPUT); // initialize the built-in LED pin to indicate when a central is connected
digitalWrite( 7, HIGH );
Serial.println("Digital output test");
}
void loop() {
delay(1000);
digitalWrite( 7, HIGH );
digitalWrite( 7, HIGH );
delay(1000);
digitalWrite( 7, LOW );
}
See the result: