My guess in period and pulseLength are uint64 values, not uint32? This is a classic C printf-style problem.
period
pulseLength
You just need to cast the values to be 32 bit:
jsWarn("duty:%f,period:%d,pulse:%d \n",dutyCycle,(uint32_t)period,(uint32_t)pulseLength); jsWarn("duty:%f,pulse:%d,period:%d \n",dutyCycle,(uint32_t)pulseLength,(uint32_t)period);
@Gordon started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
My guess in
period
andpulseLength
are uint64 values, not uint32? This is a classic C printf-style problem.You just need to cast the values to be 32 bit: