• to me, the setInterval is redundant to the setAdvertising

    This is your problem.

    Try the code I gave you or the code in the example, and see if it works.

    If you call setAdvertising once then advertising data will be set, but it'll be set just once so the value will not change until you call it again. Hence the need for setInterval to update the advertising with new light values.

About

Avatar for Gordon @Gordon started