As someone asked for help with CY8CKIT-042, I decided to leave my CY8CKIT-044 version here.
This HC-SR04 sensor module is somewhat affordable and looks simple, but the ICs on the module do nice job!
At first, I set the Timer Clock Frequency to 10MHz, so that the calculation would be simple,
but with the 24MHz source clock, the error is rather large and I ended up to have measurement
errors around 2cm for CY8CKIT-044 and 4cm for CY8CKIT-042.
Then Considering the hint from lukebartol-san, I changed the Timer Clock Frequency to 12MHz
so that the clock error is much smaller, and I got less than 1cm error(s) for both CY8CKIT-044
Last but not least, as the module requires 5V operation, we need to set J9 to 2-3 from 1-2.
本サンプルは CQ出版 インターフェース 12月号に
I contributed this sample project to a Japanese
technical magazine "Interface" Dec. edition.