Arduino nano 33 BLE, how to turn on builtin bluetooth code?

Hi,

I am new to programming and I am doing a project on an Arduino nano 33 BLE. So far I have found the sample code on the simple accelerometer on the IDE, I am wondering how to proceed with turning on the bluetooth functionality. I do not have the physical device with me because of the pandemic. So far I have included the #include <ArduinoBLE.h>

What I am trying to do is I need the Arduino to turn on once (void setup) and then proceed to other commands in the void loop section. Also I am aware that it would print something, what I intend is for the Arduino to simply communicate with an Android device with readings from other components in the void loop section.

So far I have:
BLEService moduleService

Serial.begin(9600);
while (!Serial);
Serial.println("started")l

if ( !BLE.begin()) {
Serial.println("Failed to initialize BLE!");
while (1);

)

Should I continue basing off this code on the simple accelerometer example?

perhaps you should try reading a tutorial first Get Started with Arduino Nano 33 BLE - OKdo

.

ieee488:
perhaps you should try reading a tutorial first Get Started with Arduino Nano 33 BLE - OKdo

.

when searching for how to do this I never saw that tutorial. Thank you very much for your help!

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.