Ultrasonic Sensor HC-SR04 not working

Solved
amenta's picture
amenta
Junior(0)

I am able to get the HC-SR04 sensor working by itself. When I add the sensor code to the 'WNCInterface_M2Xdemo'. The sensor stops working.

Any compatibity issues with this sensor?

 

LightCollector's picture
LightCollector
Moderator(20)

Hi,  When you say working by itself what do you mean?  Are you making it work with the K64F board without the shield?  If so then the issue may be a GPIO conflict with the shield.  The M14A2A uses a handful of various GPIO, those GPIO are setup in the application and where the pin list is instantiated it shows which pins it is using.

 

If you are sure it is not a GPIO then you may have a bug in the way you are interfacing the code for the WncInterface to the sensor code.

 

Best Regards

amenta's picture
amenta
Junior(0)

You are correct. I moved the pins around and it started to work. Can you please let me know as to which PINs are available for direct connectivity to sensors on the LTE shield? If you can break it down by analog and digital, it will be greatly appreciated.

Thank You.

LightCollector's picture
LightCollector
Moderator(20)

Hi, The schematics are the best reference to look at.  The list of shield pins directly used by the 14A2A is in the source code, either the original out of the box demo code or an application that uses WncInterface will have the list of pins.  The pins are mbed objects.  Additional pins are used for SPI, I2C and other UARTs etc., you will need to also review the K64F cpu.  The link to all of the code is here:  https://developer.mbed.org/teams/Avnet/

 

Best Regards

gefipev's picture
gefipev
Junior(0)

Ultrasonics sensor was not working on the formation of having these access or taking the parts to get on it. I have to get through these so I need to take online assignment help this used to get data or portion to alternate the data and services on it.

williamvriley's picture
williamvriley
Junior(0)

HC-SR04 ultrasonic distance sensor. This economical sensor provides non-contact measurement from 2cm to 400cm, with a range accuracy of up to 3mm. I am a professional writer provide UK law essay writing service for college students.

jonathanalex's picture
jonathanalex
Junior(0)

HC SRO4 is very economical sensor which do function at operating voltage 5v and measuring distance about 2 to 40cm aproxmately. I have some interest about it because I am writer at assignment experts UK so for this purpose I am researching about diferent ultrasonic sensors.  

mariawilson's picture
mariawilson
Junior(0)

Ultrasonic sensor have a variety of functions but after some changes it is not working I can't understand beacsue it has a distance measuring value about 2-80cm and operating current about 15ma I am a dissertation helper and doing research about this type of topic.

 This economical sensor provides non-contact measurement from 2cm to 400cm, with a range accuracy of up to 3mm... Bozeman, Montana

The M14A2A uses a handful of various GPIO, those GPIO are setup in the application and where the pin list is instantiated it shows which pins it is using. Richland, WA