Hello -
The following code runs as expected on the Artemis Module. That is, pin 40 (Artemis pad 5) goes high for 3 seconds every 16 seconds.
#include <ArduinoBLE.h>
const pin_size_t blinkPin = 40;
void setup() {
pinMode(blinkPin, OUTPUT);
//BLE.begin();
}
void loop() {
blinkNTimes(1);
delay(10’000);
}
void blinkNTimes (uint8_t numBlinks){
for(int i = 0; i < numBlinks; i++) {
digitalWrite(blinkPin, HIGH);
delay(3000);
digitalWrite(blinkPin, LOW);
delay(3000);
}
}
If BLE.begin() is uncommented, the program compiles but fails to run correctly - pin 40 never goes high.
I’m running this on an Artemis Module with wires soldered to 4 grounds, Vcc, SWDIO, SWDCK, SW0 (pad 30), RST, and pad 5. It is connected to a Segger jlink mini edu through a breadboard, and is powered at 3.3 V with a power supply. It does not have an external crystal.
I’m aware of the issue being discussed previously (viewtopic.php?f=172&t=55228&p=223690&hi … or#p223690), but the solution was to revert to Arduino IDE 1.1.3. That was for the RedBoard and almost 2 years ago. I don’t see this problem on my RedBoard ATP, or Artemis Dev Kit.
What am I doing wrong? Surely the BLE function on the module is well-honed by now.