Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SpanPoint not able to send RGB values #841

Open
xradeon opened this issue Apr 24, 2024 · 1 comment
Open

SpanPoint not able to send RGB values #841

xradeon opened this issue Apr 24, 2024 · 1 comment

Comments

@xradeon
Copy link

xradeon commented Apr 24, 2024

Hi I just implemented the example in the SpanPointLightSwitch Repository and just changed the type of value to send.

I first tried with

typedef struct {
  int red = 0;
  int green = 0;
  int blue = 0;
} LightBulbData;

but I was only getting the red value when using the

LightBulbData data; 
mainDevice->get(&lightBulbData);
Serial.printf("Received LightBulbData. R:%d G:%d B: %d\n", data.red, data.green, data.blue);

Then I trying using an int array[3] with the same result of only receiving array[0]. Also tried using a uint32_t manually encoding the 3 integers but still I'm only getting a max value of 255 (beyond that I receive 0).

Of course I replaced

mainDevice = new SpanPoint(MAIN_DEVICE_MAC, sizeof(uint32_t), sizeof(boolean));
&
remoteDevice = new SpanPoint(macAddress, sizeof(boolean), sizeof(uint32_t), 1, false);

with the correct type of value for each try...

Anything I'm doing wrong?

@HomeSpan
Copy link
Owner

Can you send the full sketch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants