i'm currently building a library to help simplify the way in which led's and switches are controlled. it started off as a little project to make my first library but has escalated into buttons led's and pwm Led's
my problem is this: i want to have a function that you can pass a float in as a fraction
Pwmled led1; led1.pin(6); led1.on(2/5);
but this doesn't work, to get it to work i have to use (float):
and then it works.
is there any way in which i can make the function work without this unnecessary (float)?
sorce code: BasicFn Library