Welcome in the forum.
The original project uses an LCD module which you in your project connected to port0. Some of the port0 pins have got bypass caps for analog and CapSense handling. When using am LCD, better connect to Port2.
You are using Sprintf(). This requires some modifications:
In .cydwr view, "System" tab: change the heap size to 0x0200
in "Project->Build Settings->Linker": Set "use newlib nano float formatting" to true.
In the case you haven't got an LCD connected you should use an UART connected to P12_7 (Tx) and P12_6 (Rx). A Terminal program as PuTTY can be used to show the values on your computer screen using the com port that shows up in device manager when you connect your -059 board to USB
Thanks so much for the help, I was able to get it to work following the instructions you gave me.
The next part of the project involves importing the PSoC distance data into labview through serial communication and graphing the distance result, So I am trying to get that to work now.
You are always welcome, Sam.
Some hints: Probably quite cold in Down Under right now (we had here 35°C yesterday, SUMMER). Sonic speed is mostly dependent of environment temperature which you might take into consideration.
Sonic speed in air C[m/s] = 331,5 + 0.6*T[°C]
I ported this code to my psoc 3 CY8CKIT-030 by downloading and using the device selector to change the chip. I upgraded the user modules to the latest version and changed the pins: the trigger is on P3 and the Echo on P3. I see RANGE =, but it doesn't do anything until I unplug the echo pin wire and plug it back in. Kind of strange I think. Why is the setup using a timer instead of a counter? Wouldn't they do the same thing? Any ideas how I can get this to trigger without having to remove the wire?
error on my part. I had the board set to run at 3.3V. The HC-SR05 is happier at 5V. I put the power pin on the HC-SR04 to V5.0 on the board and the device started working. When plugged in to V3.3 it stopps working. I had read that the sensor could do up to 5 V, but apparently it must be AT 5V.