Tell us about yourself!

  • What exactly are you doing with this, if you don't mind me asking? In the code you provided in your last comment, it looks like you have the potentiometer connected to pin A0? How does the result of your calculations affect the RGB values?I also wanted to point out that it is good practice to avoid using pin numbers like this. Instead, try assigning the values to a variable before using them in a calculation. This way your arduino doesn't need to read the value multiple times to complete the calculation, as it will already be stored in memory as a variable. Additionally, in order to make the value fit within the 0 - 255 PWM range, you can use the built-in "map" function provided by the arduino IDE. This way, it also prevents any negative values being returned.

    View Instructable »