Lesson 21: Change Andee Bluetooth Device Name

 

Written by Jonathan Sim

You can find this lesson and more in the Arduino IDE (File -> Examples -> Andee). If you are unable to find them, you will need to install the Andee Library for Arduino IDE.

Works on iOS and Android
You'll only need to run this code once to change the Annikken Andee's Bluetooth device name.

Here's how it's done:

Top of the Code

#include <Andee.h> // Don't forget the necessary libraries
#include <SPI.h>

// This is where you change your device name:
char newBluetoothName[] = "Hello New Device Name"; // New device name
char cmdReply[64]; // String buffer
char commandString[100]; // String to store the new device name and device command into one

setup()

void setup()
{
  Andee.begin();
  Andee.clear();

  // We need to combine the new device name with the device command
  sprintf(commandString, "SET BT NAME %s", newBluetoothName);
  // Send command to change device name
  Andee.sendCommand(commandString, cmdReply);
}

loop()

void loop()
{
  // Disconnect user - there's nothing to do here anyway
  if(Andee.isConnected()) 
    Andee.disconnect();
}
comments powered by Disqus