mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-24 11:16:34 +00:00
Add support for ME007-ULS
Add support for ME007-ULS narrow FoV ultrasonic distance sensor by Mathias Buder (#17376)
This commit is contained in:
parent
fc8039d960
commit
1ad8b7713e
@ -219,6 +219,7 @@ Note: `minimal` variant is not listed as it shouldn't be used outside of the [up
|
||||
| USE_IR_REMOTE_FULL | - | - / - | - | - | x | - | Enable ALL protocols
|
||||
| | | | | | | |
|
||||
| USE_SR04 | - | - / - | - | x | - | - |
|
||||
| USE_ME007 | - | - / - | - | - | - | - |
|
||||
| USE_DYP | - | - / - | - | - | - | - |
|
||||
| USE_TM1638 | - | - / x | - | x | - | - |
|
||||
| USE_HX711 | - | - / x | - | x | - | - |
|
||||
|
@ -8,6 +8,7 @@ All notable changes to this project will be documented in this file.
|
||||
- Serial Modbus transmit enable GPIOs to all modbus energy drivers and modbus bridge (#17247)
|
||||
- Berry crypto module, with AES_GCM by default and EC_CC25519 optional
|
||||
- IPv6 support for Ethernet (ESP32)
|
||||
- Support for ME007-ULS narrow FoV ultrasonic distance sensor by Mathias Buder (#17376)
|
||||
|
||||
### Breaking Changed
|
||||
|
||||
|
@ -111,7 +111,7 @@ In addition to @arendst the following code is mainly owned by:
|
||||
| xsns_20_novasds | Norbert Richter
|
||||
| xsns_21_sgp30 | Gerhard Mutz
|
||||
| xsns_22_sr04 | Nuno Ferreira, @arendst
|
||||
| xsns_23 |
|
||||
| xsns_23_me007 | Mathias Buder
|
||||
| xsns_24_si1145 |
|
||||
| xsns_25 |
|
||||
| xsns_26_lm75ad | Andre Thomas
|
||||
|
@ -127,6 +127,7 @@ The latter links can be used for OTA upgrades too like ``OtaUrl http://ota.tasmo
|
||||
- Support for BP1658CJ RGBCW led bulbs like Orein OS0100411267 by Cossid [#17011](https://github.com/arendst/Tasmota/issues/17011)
|
||||
- Support for Dingtian x595 shift register based relay boards by Barbudor [#17032](https://github.com/arendst/Tasmota/issues/17032)
|
||||
- Support for HMC5883L 3-Axis Digital Compass sensor by Andreas Achtzehn [#17069](https://github.com/arendst/Tasmota/issues/17069)
|
||||
- Support for ME007-ULS narrow FoV ultrasonic distance sensor by Mathias Buder [#17376](https://github.com/arendst/Tasmota/issues/17376)
|
||||
- WS2812 and Light ArtNet DMX control over UDP port 6454 [#17059](https://github.com/arendst/Tasmota/issues/17059)
|
||||
- Teleinfo TEMPO (BBR) contract [#17160](https://github.com/arendst/Tasmota/issues/17160)
|
||||
- Serial Modbus transmit enable GPIOs to all modbus energy drivers and modbus bridge [#17247](https://github.com/arendst/Tasmota/issues/17247)
|
||||
|
@ -177,6 +177,7 @@
|
||||
#define USE_NOVA_SDS // Add support for SDS011 and SDS021 particle concentration sensor (+0k7 code)
|
||||
#define USE_HPMA // Add support for Honeywell HPMA115S0 particle concentration sensor
|
||||
#define USE_SR04 // Add support for HC-SR04 ultrasonic devices (+1k code)
|
||||
//#define USE_ME007 // Add support for ME007 ultrasonic devices (+1k5 code)
|
||||
//#define USE_DYP // Add support for DYP ME-007 ultrasonic distance sensor, serial port version (+0k5 code)
|
||||
#define USE_SERIAL_BRIDGE // Add support for software Serial Bridge (+2k code)
|
||||
//#define USE_MODBUS_BRIDGE // Add support for software Modbus Bridge (+3k code)
|
||||
@ -449,6 +450,7 @@
|
||||
#undef USE_NOVA_SDS // Disable support for SDS011 and SDS021 particle concentration sensor
|
||||
#undef USE_HPMA // Disable support for Honeywell HPMA115S0 particle concentration sensor
|
||||
#undef USE_SR04 // Disable support for HC-SR04 ultrasonic devices (+1k code)
|
||||
#undef USE_ME007 // Disable support for ME007 ultrasonic devices (+1k5 code)
|
||||
#undef USE_DYP // Disable support for DYP ME-007 ultrasonic distance sensor, serial port version (+0k5 code)
|
||||
#undef USE_SERIAL_BRIDGE // Disable support for software Serial Bridge
|
||||
#undef USE_MODBUS_BRIDGE // Disable support for software Modbus Bridge (+3k code)
|
||||
@ -580,6 +582,7 @@
|
||||
#undef USE_NOVA_SDS // Disable support for SDS011 and SDS021 particle concentration sensor
|
||||
#undef USE_HPMA // Disable support for Honeywell HPMA115S0 particle concentration sensor
|
||||
#undef USE_SR04 // Disable support for HC-SR04 ultrasonic devices (+1k code)
|
||||
#undef USE_ME007 // Disable support for ME007 ultrasonic devices (+1k5 code)
|
||||
#undef USE_DYP // Disable support for DYP ME-007 ultrasonic distance sensor, serial port version (+0k5 code)
|
||||
#undef USE_SERIAL_BRIDGE // Disable support for software Serial Bridge
|
||||
#undef USE_MODBUS_BRIDGE // Disable support for software Modbus Bridge (+3k code)
|
||||
@ -728,6 +731,7 @@
|
||||
#undef USE_NOVA_SDS // Disable support for SDS011 and SDS021 particle concentration sensor
|
||||
#undef USE_HPMA // Disable support for Honeywell HPMA115S0 particle concentration sensor
|
||||
#undef USE_SR04 // Disable support for HC-SR04 ultrasonic devices (+1k code)
|
||||
#undef USE_ME007 // Disable support for ME007 ultrasonic devices (+1k5 code)
|
||||
#undef USE_DYP // Disable support for DYP ME-007 ultrasonic distance sensor, serial port version (+0k5 code)
|
||||
#undef USE_SERIAL_BRIDGE // Disable support for software Serial Bridge
|
||||
#undef USE_MODBUS_BRIDGE // Disable support for software Modbus Bridge (+3k code)
|
||||
@ -882,6 +886,7 @@
|
||||
#undef USE_NOVA_SDS // Disable support for SDS011 and SDS021 particle concentration sensor
|
||||
#undef USE_HPMA // Disable support for Honeywell HPMA115S0 particle concentration sensor
|
||||
#undef USE_SR04 // Disable support for HC-SR04 ultrasonic devices (+1k code)
|
||||
#undef USE_ME007 // Disable support for ME007 ultrasonic devices (+1k5 code)
|
||||
#undef USE_DYP // Disable support for DYP ME-007 ultrasonic distance sensor, serial port version (+0k5 code)
|
||||
#undef USE_SERIAL_BRIDGE // Disable support for software Serial Bridge
|
||||
#undef USE_MODBUS_BRIDGE // Disable support for software Modbus Bridge (+3k code)
|
||||
|
@ -113,6 +113,7 @@
|
||||
#undef USE_NOVA_SDS // Disable support for SDS011 and SDS021 particle concentration sensor
|
||||
#undef USE_HPMA // Disable support for Honeywell HPMA115S0 particle concentration sensor
|
||||
#undef USE_SR04 // Disable support for HC-SR04 ultrasonic devices (+1k code)
|
||||
#undef USE_ME007 // Disable support for ME007 ultrasonic devices (+1k5 code)
|
||||
#undef USE_DYP // Disable support for DYP ME-007 ultrasonic distance sensor, serial port version (+0k5 code)
|
||||
#undef USE_SERIAL_BRIDGE // Disable support for software Serial Bridge
|
||||
#undef USE_MODBUS_BRIDGE // Disable support for software Modbus Bridge (+3k code)
|
||||
@ -445,6 +446,7 @@
|
||||
//#define USE_NOVA_SDS // Add support for SDS011 and SDS021 particle concentration sensor (+0k7 code)
|
||||
//#define USE_HPMA // Add support for Honeywell HPMA115S0 particle concentration sensor
|
||||
//#define USE_SR04 // Add support for HC-SR04 ultrasonic devices (+1k code)
|
||||
//#define USE_ME007 // Add support for ME007 ultrasonic devices (+1k5 code)
|
||||
//#define USE_DYP // Add support for DYP ME-007 ultrasonic distance sensor, serial port version (+0k5 code)
|
||||
#define USE_SERIAL_BRIDGE // Add support for software Serial Bridge (+2k code)
|
||||
//#define USE_MODBUS_BRIDGE // Add support for software Modbus Bridge (+3k code)
|
||||
@ -665,6 +667,7 @@
|
||||
#define USE_NOVA_SDS // Add support for SDS011 and SDS021 particle concentration sensor (+0k7 code)
|
||||
#define USE_HPMA // Add support for Honeywell HPMA115S0 particle concentration sensor
|
||||
#define USE_SR04 // Add support for HC-SR04 ultrasonic devices (+1k code)
|
||||
//#define USE_ME007 // Add support for ME007 ultrasonic devices (+1k5 code)
|
||||
//#define USE_DYP // Add support for DYP ME-007 ultrasonic distance sensor, serial port version (+0k5 code)
|
||||
#define USE_SERIAL_BRIDGE // Add support for software Serial Bridge (+2k code)
|
||||
#define USE_MODBUS_BRIDGE // Add support for software Modbus Bridge (+3k code)
|
||||
|
@ -915,8 +915,8 @@
|
||||
#define D_SENSOR_CM11_TX "CM110x - TX"
|
||||
#define D_SENSOR_CM11_RX "CM110x - RX"
|
||||
#define D_SENSOR_FLOWRATEMETER "Portata"
|
||||
#define D_SENSOR_ME007_TRIG "ME007 Tri"
|
||||
#define D_SENSOR_ME007_RX "ME007 Rx"
|
||||
#define D_SENSOR_ME007_TRIG "ME007 - Tri"
|
||||
#define D_SENSOR_ME007_RX "ME007 - RX"
|
||||
|
||||
// Units
|
||||
#define D_UNIT_AMPERE "A"
|
||||
|
@ -773,20 +773,20 @@
|
||||
// -- Serial sensors ------------------------------
|
||||
//#define USE_MHZ19 // Add support for MH-Z19 CO2 sensor (+2k code)
|
||||
//#define USE_SENSEAIR // Add support for SenseAir K30, K70 and S8 CO2 sensor (+2k3 code)
|
||||
//#define USE_CM110x // Add support for CM110x CO2 sensors (+2k7code)
|
||||
//#define USE_CM110x // Add support for CM110x CO2 sensors (+2k7code)
|
||||
#define CO2_LOW 800 // Below this CO2 value show green light (needs PWM or WS2812 RG(B) led and enable with SetOption18 1)
|
||||
#define CO2_HIGH 1200 // Above this CO2 value show red light (needs PWM or WS2812 RG(B) led and enable with SetOption18 1)
|
||||
//#define USE_PMS5003 // Add support for PMS5003 and PMS7003 particle concentration sensor (+1k3 code)
|
||||
//#define PMS_MODEL_PMS3003 // Enable support of PMS3003 instead of PMS5003/PMS7003 (needs the USE_PMS5003 above)
|
||||
//#define PMS_MODEL_PMS5003T // Enable support for PMSx003T models that report temperature and humidity (needs the USE_PMS5003 above)
|
||||
// #define PMS_MODEL_PMS3003 // Enable support of PMS3003 instead of PMS5003/PMS7003 (needs the USE_PMS5003 above)
|
||||
// #define PMS_MODEL_PMS5003T // Enable support for PMSx003T models that report temperature and humidity (needs the USE_PMS5003 above)
|
||||
//#define USE_NOVA_SDS // Add support for SDS011 and SDS021 particle concentration sensor (+1k5 code)
|
||||
#define STARTING_OFFSET 30 // Turn on NovaSDS XX-seconds before tele_period is reached
|
||||
//#define USE_HPMA // Add support for Honeywell HPMA115S0 particle concentration sensor (+1k4)
|
||||
// #define USE_SR04 // Add support for HC-SR04 ultrasonic devices (+1k code)
|
||||
// #define SR04_MAX_SENSOR_DISTANCE 500 // Set sensor max detection distance
|
||||
// #define USE_ME007 // Add support for ME007 ultrasonic devices (+1k5 code)
|
||||
// #define ME007_MAX_SENSOR_DISTANCE 800 // Set sensor max detection distance
|
||||
// #define ME007_ENABLE_MEDIAN_FILTER // Enables that distance measurements are filtered with an median filter of length 5
|
||||
//#define USE_SR04 // Add support for HC-SR04 ultrasonic devices (+1k code)
|
||||
// #define SR04_MAX_SENSOR_DISTANCE 500 // Set sensor max detection distance
|
||||
//#define USE_ME007 // Add support for ME007 ultrasonic devices (+1k5 code)
|
||||
// #define ME007_MAX_SENSOR_DISTANCE 800 // Set sensor max detection distance
|
||||
// #define ME007_ENABLE_MEDIAN_FILTER // Enables that distance measurements are filtered with an median filter of length 5
|
||||
//#define USE_DYP // Add support for DYP ME-007 ultrasonic distance sensor, serial port version (+0k5 code)
|
||||
#define USE_SERIAL_BRIDGE // Add support for software Serial Bridge (+2k code)
|
||||
// #define SERIAL_BRIDGE_BUFFER_SIZE 256 // Serial Bridge receive buffer size (Default ESP8266 = 256, ESP32 = 800)
|
||||
@ -795,7 +795,7 @@
|
||||
//#define USE_TCP_BRIDGE // Add support for Serial to TCP bridge (+1.3k code)
|
||||
//#define USE_MP3_PLAYER // Use of the DFPlayer Mini MP3 Player RB-DFR-562 commands: play, pause, stop, track, volume and reset
|
||||
#define MP3_VOLUME 30 // Set the startup volume on init, the range can be 0..100(max)
|
||||
// #define USE_DY_SV17F // Use of DY-SV17F MP3 Player commands: play, stop, track and volume
|
||||
// #define USE_DY_SV17F // Use of DY-SV17F MP3 Player commands: play, stop, track and volume
|
||||
//#define USE_AZ7798 // Add support for AZ-Instrument 7798 CO2 datalogger (+1k6 code)
|
||||
//#define USE_PN532_HSU // Add support for PN532 using HSU (Serial) interface (+1k7 code, 156 bytes mem)
|
||||
// #define USE_PN532_DATA_FUNCTION // Add sensor40 command support for erase, setting data block content (+3k code, 32 bytes mem)
|
||||
|
@ -385,15 +385,15 @@ void me007_sort_asc( float* const p_list, const uint8_t size_u8 )
|
||||
void me007_read_value( void )
|
||||
{
|
||||
float distance_cm_f32 = 0.0F;
|
||||
#ifdef ME007_ENABLE_MEDIAN_FILTER
|
||||
#ifdef ME007_ENABLE_MEDIAN_FILTER
|
||||
float distance_buffer_vf32[ME007_MEDIAN_FILTER_SIZE] = {0.0F};
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Record some sensor measurements */
|
||||
#ifdef ME007_ENABLE_MEDIAN_FILTER
|
||||
#ifdef ME007_ENABLE_MEDIAN_FILTER
|
||||
for ( uint8_t idx_u8 = 0U; idx_u8 < ME007_MEDIAN_FILTER_SIZE; ++idx_u8 )
|
||||
{
|
||||
#endif
|
||||
#endif
|
||||
ME007_ERROR_TYPE status_e = me007_measure( &distance_cm_f32,
|
||||
&me007_data_s.temperature_deg_f32 );
|
||||
|
||||
@ -401,12 +401,12 @@ void me007_read_value( void )
|
||||
{
|
||||
case ME007_ERROR_TYPE_NONE:
|
||||
|
||||
#ifdef ME007_ENABLE_MEDIAN_FILTER
|
||||
#ifdef ME007_ENABLE_MEDIAN_FILTER
|
||||
/* Store valid distance measurement into histogram buffer */
|
||||
distance_buffer_vf32[idx_u8] = distance_cm_f32;
|
||||
#else
|
||||
#else
|
||||
me007_data_s.distance_cm_f32 = distance_cm_f32;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if ( 0U < me007_data_s.error_cnt_current_u8 )
|
||||
{
|
||||
@ -438,12 +438,12 @@ void me007_read_value( void )
|
||||
me007_data_s.error_cnt_current_u8,
|
||||
me007_data_s.error_cnt_total_u16 );
|
||||
|
||||
#ifdef ME007_ENABLE_MEDIAN_FILTER
|
||||
/* Add small delay between measurement */
|
||||
if ( ( ME007_MEDIAN_FILTER_SIZE - 1U ) > idx_u8 )
|
||||
{
|
||||
delay( ME007_MEDIAN_FILTER_MEASURE_DELAY );
|
||||
}
|
||||
#ifdef ME007_ENABLE_MEDIAN_FILTER
|
||||
}
|
||||
|
||||
/* Sort median filter buffer and assign median value to current distance measurement */
|
||||
@ -451,7 +451,7 @@ void me007_read_value( void )
|
||||
|
||||
/* Update distance measurement */
|
||||
me007_data_s.distance_cm_f32 = distance_buffer_vf32[ME007_MEDIAN_FILTER_MEDIAN_IDX];
|
||||
#endif
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user