wassy310 / ultrasonic-sensor-lib

Available in mbed, self-made library for Ultrasonic-sensor

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ultrasonic-sensor-lib

Overview

Available in mbed, self-made library for Ultrasonic-sensor.

Getting Started

  • Add files to your working dir.

    • ultrasonic.cpp
    • ultrasonic.h
  • Pin:

    • Ultrasonic variable(triggerPin, echoPin);
  • Read value

    • variable.getDistance();

    variable: Users can rewrite the name as they like.

Features

Reduce the amount of code to use ultrasonic sensors. This makes code refactoring and bug fixing easier.

Directory

.
├── main.cpp
├── ultrasonic.cpp
├── ultrasonic.h
├── LICENSE
└── README.md

main.cpp

Test script.

ultrasonic.cpp

This file contains compiled functions and data, which are linked with main.cpp to create an executable program.

ultrasonic.h

This file contains various definitions needed to use library functions, mainly class definitions.

LICENSE

Apache-2.0 license

README.md

This file.

Environments

OS Windows 10 Pro
IDE Arm Keil Studio, Visual Studio Code
HARD STM32(test: F446RE), HC-SR04
LANG C++
OTHERS -

Author

Wassy | Ryoga Washizawa

LICENSE

Apache-2.0 license

Contact

Bugs and feature requests please visit GitHub Issues.
For less important matters, please contact us through the following means.

About

Available in mbed, self-made library for Ultrasonic-sensor

License:Apache License 2.0


Languages

Language:C++ 100.0%