How do you rename an ID using an arduino nano?

userHead Tristanlmao16 2023-01-16 20:20:29 616 Views2 Replies

So I am trying to change the name of an ID but when I try to put the code, nothing happens and it's still an ID

 

Here's my code:

#include "HUSKYLENS.h"


 

HUSKYLENS huskylens;


 

void setup()

{

    Serial.begin(115200);

    Wire.begin();

    while (!huskylens.begin(Wire))

    {

        Serial.println(F("Begin failed!"));

        delay(100);

    }

    while (!huskylens.setCustomName("Jack",1))  // bool setCustomName(String name,uint8_t id)

    {

      Serial.println(F("ID1 customname failed!"));

      delay(100);

    }

}


 

void loop()

{


 

}

2023-01-17 14:01:55

Hi!

pls try this code.

https://github.com/HuskyLens/HUSKYLENSArduino/blob/master/HUSKYLENS/examples/HUSKYLENS_UTILITIES/HUSKYLENS_UTILITIES.ino

userHeadPic jenna
Tristanlmao16 wrote:

Hello! Just tried the code you provided and it works! Thanks.

2023-01-17 16:49:26
1 Replies