Go Down

Topic: EsploraLedShow example error (Read 944 times) previous topic - next topic

Grumpy_Mike

Just going through the examples and came across this error in the EsploraLedShow. That is part of the 1.0.3 IDE
Code: [Select]

// convert the sensor readings to light levels:
  byte red   = map(xAxis, -512, 512, 0, 255);
  byte green = map(xAxis, -512, 512, 0, 255);
  byte blue  = slider/4;


spot that red and green are mapped to the same axis, it should be:-

Code: [Select]
// convert the sensor readings to light levels:
  byte red   = map(xAxis, -512, 512, 0, 255);
  byte green = map(yAxis, -512, 512, 0, 255);
  byte blue  = slider/4;


It is fine in the library examples however.

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy