SINTEF-9012 / JArduino

Program your Arduino in Java
https://github.com/SINTEF-9012/JArduino/wiki
177 stars 63 forks source link

AnalogInOutSerialFix #51

Closed lobsteroh closed 8 years ago

lobsteroh commented 8 years ago

turns out analogWrite(pin, value) runs into an unsigned/signed byte issue. values between 127 and 0 fade from ON to OFF. But forcing int 128 to byte makes a cast to -128, while int 255 becomes -1