How to reverse Serial Data?

I am using the Dimmer code (https://www.arduino.cc/en/Tutorial/Dimmer) I want to increase the brightness of LED instead of dimming it. The code here will fetch the highest serial data and the LED at start is always fully bright. I want to negate this. I want the reverse version of this code!

I am not sure to edit the arduino code or the processing code.

i = 255 - i;
    // or
i -= 255;
    // or
i = ~i;

You have to reverse the for loop of the processing code.

Let it start from 256 instead of 0 and go down till 0 with i–.

Best regards
MajorProb

Start at 255, not 256, 256 isn’t an 8-bit value.

If you're counting down to 0 (inclusive), use an signed variable to hold the count (int8_t or int). This has bitten me a time or two.

best, Michael