Computer Science, asked by geetanarang5232, 1 year ago

What will happen if negative value is applied in pwm?

Answers

Answered by student8248
0
What happens if you analogWrite(-3) or analogWrite(10,000)?

I'm having a strange overflow. I'm driving a panel meter with an analog pin. I have a knob that I can turn that could make the value written to the analog pin anything from -254 to 1024. As I turn the knob, though, I get this thing where the needle will max out and then flop back to zero and start rising again as if the quantity had overflowed. But the numbers are ints, so I wouldn't expect overflow to happen. The only thing I can think is that analogWrite doesn't truncate the values it 'gets', but does a byte type cast on whatever you feed it, and that converted byte value is somehow overflowing.



if my and helped you then plz mark it as a brainliest
Similar questions