PWM: Read square wave signal


hello everyone,
i want use pwm pin generate square wave signal duty cycle of 50%.
simply, wrote:
analogwrite(pwm pin,128);

i want read output value find when signal change 0 1.
i have tried use digitalread function, doesn't work because value 0.
i want this:
0,0,............0,1,1,...............,1,0,0,etc.

the case digitalread works when duty cycle 100% or 0%, namely constant signal.
thanks in advance help.

where aim see 0,0,............0,1,1,...............,1,0,0,etc. ?


Arduino Forum > Using Arduino > Programming Questions > PWM: Read square wave signal


arduino

Comments

Popular posts from this blog

Error compiling for board Arduino/Genuino Uno.

Installation database is corrupt

esp8266 (nodemcu 0.9) client.write très lent ???