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

RGB Led in example isn't working #19

Open
TomYeoman opened this issue May 8, 2017 · 2 comments
Open

RGB Led in example isn't working #19

TomYeoman opened this issue May 8, 2017 · 2 comments

Comments

@TomYeoman
Copy link

TomYeoman commented May 8, 2017

Hi nice library you've created

I'm running into an issue where i'm able to run examples found in the 02_leds folder, but the 03_rgbleds is erroring in the client (Falling over in the p5bots.js file)

Client Code:

var b = p5.board('COM9', 'arduino');

function setup() {
  var rgb = b.pin({ r: 20, g: 20, b: 20, common: 'anode' }, 'RGBLED');
  var c = color(0, 255, 0);
  rgb.write(c);
  fill(c);
  noStroke();
  ellipse(80, 80, 40, 40);
}

Errors:

image

The code appears like it's trying to read this.color.rgba which doesn't look like it's ever set (this.color only has a similar "levels" array but no rgba)

image

@naimenz
Copy link

naimenz commented Jun 15, 2017

Replacing 'rgba' with 'levels' fixes this. I think there must have been an update to p5 changing the color object.

@sarahghp
Copy link
Owner

Yes, I think so, too. I've updated master to use the accessor functions since the internal representation appears to keep changing, but I'll need to test it before I deploy a new version to NPM.

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

3 participants