Unified all Java examples to *match* <LIBRARY>[_otherstuf]_Example.java.
Note, a handful of the examples have a pseudo-random string for the
first component (see FlexSensor_Example.java, ideally this would be
Flex_Example.java).
This commit allows for quick development on a single sensor library
since a -DMODULE_LIST=mysensorlib now works with Java examples
(previously Java examples would fail generation when using
MODULE_LIST).
* Renamed examples
* Updated class names
* Updated library descriptor .json files
* Updated sample mapping file
TODO: Make this work like the C/C++ examples - grab the target library
name from the filename and grab all dependencies from that target
library. Fix the handful of example names which don't conform.
Signed-off-by: Noel Eck <noel.eck@intel.com>
39 lines
1.3 KiB
JSON
39 lines
1.3 KiB
JSON
{
|
|
"Library": "hcsr04",
|
|
"Description": "HC-SR04 Ultrasonic Sensor Library",
|
|
"Sensor Class":
|
|
{
|
|
"HCSR04":
|
|
{
|
|
"Name": "HC-SR04 Ultrasonic Distance Measuring Sensor",
|
|
"Description": "This module defines the HC-SR04 interface for libhcsr04.",
|
|
"Aliases": ["hcsr04"],
|
|
"Categories": ["ultrasonic", "distance"],
|
|
"Connections": ["gpio"],
|
|
"Project Type": ["robotics", "safety", "prototyping"],
|
|
"Manufacturers": ["sparkfun"],
|
|
"Kits": [],
|
|
"Examples":
|
|
{
|
|
"Java": ["HCSR04_Example.java"],
|
|
"Python": ["hcsr04.py"],
|
|
"Node.js": ["hcsr04.js"],
|
|
"C++": ["hcsr04.cxx"],
|
|
"C": ["hcsr04.c"]
|
|
},
|
|
"Specifications":
|
|
{
|
|
"Operating Voltage": {"unit": "V", "typ": 5},
|
|
"Operating Current": {"unit": "mA", "typ": 15},
|
|
"Measurement Range": {"unit": "cm", "low": 2, "high": 400}
|
|
},
|
|
"Urls" :
|
|
{
|
|
"Product Pages": ["https://www.sparkfun.com/products/13959"],
|
|
"Datasheets": ["https://cdn.sparkfun.com/datasheets/Sensors/Proximity/HCSR04.pdf"],
|
|
"Schematics": []
|
|
}
|
|
}
|
|
}
|
|
}
|