Multigeiger too many arguments to function 'hw_timer_t*

Hi,
I´ve tried to setup multigeiger according to Setup — MultiGeiger V1.17.0-dev Dokumentation
Arduino-IDE verifying multigeiger.ino (MultiGeiger-1.16.0) gives me 112 lines of error-messages
Ist this usual process or did I miss something reading the docs?

E:\MultiGeiger-1.16.0\multigeiger\timers.cpp: In function ‘hw_timer_t* setup_timer(int, void ()(), int)':
E:\MultiGeiger-1.16.0\multigeiger\timers.cpp:10:33: error: too many arguments to function 'hw_timer_t
timerBegin(uint32_t)’
10 | hw_timer_t timer = timerBegin(timer_no, 80, true); // prescaler: 80MHz / 80 == 1MHz
| ^~~~~~~~~~
In file included from C:\Users\User01\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.0-rc3\cores\esp32/esp32-hal.h:84,
from C:\Users\User01\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.0-rc3\cores\esp32/Arduino.h:36,
from E:\MultiGeiger-1.16.0\multigeiger\timers.cpp:1:
C:\Users\User01\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.0-rc3\cores\esp32/esp32-hal-timer.h:35:13: note: declared here
35 | hw_timer_t timerBegin(uint32_t frequency);
| ^~~~~~~~~~
E:\MultiGeiger-1.16.0\multigeiger\timers.cpp:11:23: error: too many arguments to function 'void timerAttachInterrupt(hw_timer_t
, void (
)())’
11 | timerAttachInterrupt(timer, isr, true); // set ISR
| ^~
C:\Users\User01\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.0-rc3\cores\esp32/esp32-hal-timer.h:50:6: note: declared here
50 | void timerAttachInterrupt(hw_timer_t *timer, void (*userFunc)(void));
| ^
~~~~~~~~~~~~~~~
E:\MultiGeiger-1.16.0\multigeiger\timers.cpp:12:3: error: ‘timerAlarmWrite’ was not declared in this scope; did you mean ‘timerWrite’?
12 | timerAlarmWrite(timer, period_us, true); // set alarm after period, do repeat
| ^~~~~~~~~~~~~~~
| timerWrite
E:\MultiGeiger-1.16.0\multigeiger\timers.cpp:14:3: error: ‘timerAlarmEnable’ was not declared in this scope; did you mean ‘timerAlarm’?
14 | timerAlarmEnable(timer);
| ^~~~~~~~~~~~~~~~
| timerAlarm
In file included from e:\MultiGeiger-1.16.0\multigeiger\libraries\MCCI_LoRaWAN_LMIC_library\src/arduino_lmic.h:26,
from e:\MultiGeiger-1.16.0\multigeiger\libraries\MCCI_LoRaWAN_LMIC_library\src/lmic.h:28,
from E:\MultiGeiger-1.16.0\multigeiger\loraWan.cpp:42:
E:\MultiGeiger-1.16.0\multigeiger\loraWan.cpp: In function ‘void setup_lorawan()’:
E:\MultiGeiger-1.16.0\multigeiger\loraWan.cpp:203:48: error: ‘DR_SF12’ was not declared in this scope; did you mean ‘DR_SF10’?
203 | LMIC_setupChannel(0, 868100000, DR_RANGE_MAP(DR_SF12, DR_SF7), BAND_CENTI); // g-band
| ^~~~~~~
e:\MultiGeiger-1.16.0\multigeiger\libraries\MCCI_LoRaWAN_LMIC_library\src/lmic/lmic.h:680:50: note: in definition of macro ‘DR_RANGE_MAP’
680 | #define DR_RANGE_MAP(drlo,drhi) (((u2_t)0xFFFF<<(drlo)) & ((u2_t)0xFFFF>>(15-(drhi))))
| ^~~~
E:\MultiGeiger-1.16.0\multigeiger\loraWan.cpp:203:67: error: ‘BAND_CENTI’ was not declared in this scope
203 | LMIC_setupChannel(0, 868100000, DR_RANGE_MAP(DR_SF12, DR_SF7), BAND_CENTI); // g-band
| ^~~~~~~~~~
E:\MultiGeiger-1.16.0\multigeiger\loraWan.cpp:204:57: error: ‘DR_SF7B’ was not declared in this scope; did you mean ‘DR_SF7’?
204 | LMIC_setupChannel(1, 868300000, DR_RANGE_MAP(DR_SF12, DR_SF7B), BAND_CENTI); // g-band
| ^~~~~~~
e:\MultiGeiger-1.16.0\multigeiger\libraries\MCCI_LoRaWAN_LMIC_library\src/lmic/lmic.h:680:79: note: in definition of macro ‘DR_RANGE_MAP’
680 | #define DR_RANGE_MAP(drlo,drhi) (((u2_t)0xFFFF<<(drlo)) & ((u2_t)0xFFFF>>(15-(drhi))))
| ^~~~
E:\MultiGeiger-1.16.0\multigeiger\loraWan.cpp:211:48: error: ‘DR_FSK’ was not declared in this scope; did you mean ‘DR_SF9’?
211 | LMIC_setupChannel(8, 868800000, DR_RANGE_MAP(DR_FSK, DR_FSK), BAND_MILLI); // g2-band
| ^~~~~~
e:\MultiGeiger-1.16.0\multigeiger\libraries\MCCI_LoRaWAN_LMIC_library\src/lmic/lmic.h:680:50: note: in definition of macro ‘DR_RANGE_MAP’
680 | #define DR_RANGE_MAP(drlo,drhi) (((u2_t)0xFFFF<<(drlo)) & ((u2_t)0xFFFF>>(15-(drhi))))
| ^~~~
E:\MultiGeiger-1.16.0\multigeiger\loraWan.cpp:211:67: error: ‘BAND_MILLI’ was not declared in this scope
211 | LMIC_setupChannel(8, 868800000, DR_RANGE_MAP(DR_FSK, DR_FSK), BAND_MILLI); // g2-band
| ^~~~~~~~~~
In file included from e:\MultiGeiger-1.16.0\multigeiger\libraries\IotWebConf\src/IotWebConfTParameter.h:949,
from E:\MultiGeiger-1.16.0\multigeiger\webconf.cpp:8:
e:\MultiGeiger-1.16.0\multigeiger\libraries\IotWebConf\src/IotWebConfTParameterBuilder.h:65:42: error: expected unqualified-id before ‘const’
65 | PrimitiveBuilder<ValueType, ParamType>(const char* id) :
| ^~~~~
e:\MultiGeiger-1.16.0\multigeiger\libraries\IotWebConf\src/IotWebConfTParameterBuilder.h:65:42: error: expected ‘)’ before ‘const’
65 | PrimitiveBuilder<ValueType, ParamType>(const char* id) :
| ~^~~~~
| )
e:\MultiGeiger-1.16.0\multigeiger\libraries\IotWebConf\src/IotWebConfTParameterBuilder.h:102:43: error: expected unqualified-id before ‘const’
102 | Builder<IntTParameter<ValueType, base>>(const char* id) :
| ^~~~~
e:\MultiGeiger-1.16.0\multigeiger\libraries\IotWebConf\src/IotWebConfTParameterBuilder.h:102:43: error: expected ‘)’ before ‘const’
102 | Builder<IntTParameter<ValueType, base>>(const char* id) :
| ~^~~~~
| )
e:\MultiGeiger-1.16.0\multigeiger\libraries\IotWebConf\src/IotWebConfTParameterBuilder.h:111:44: error: expected unqualified-id before ‘const’
111 | Builder<UIntTParameter<ValueType, base>>(const char* id) :
| ^~~~~
e:\MultiGeiger-1.16.0\multigeiger\libraries\IotWebConf\src/IotWebConfTParameterBuilder.h:111:44: error: expected ‘)’ before ‘const’
111 | Builder<UIntTParameter<ValueType, base>>(const char* id) :
| ~^~~~~
| )
e:\MultiGeiger-1.16.0\multigeiger\libraries\IotWebConf\src/IotWebConfTParameterBuilder.h:120:28: error: expected unqualified-id before ‘const’
120 | Builder(const char* id) :
| ^~~~~
e:\MultiGeiger-1.16.0\multigeiger\libraries\IotWebConf\src/IotWebConfTParameterBuilder.h:120:28: error: expected ‘)’ before ‘const’
120 | Builder(const char* id) :
| ~^~~~~
| )
e:\MultiGeiger-1.16.0\multigeiger\libraries\IotWebConf\src/IotWebConfTParameterBuilder.h:130:34: error: expected unqualified-id before ‘const’
130 | Builder<SelectTParameter>(const char* id) :
| ^~~~~
e:\MultiGeiger-1.16.0\multigeiger\libraries\IotWebConf\src/IotWebConfTParameterBuilder.h:130:34: error: expected ‘)’ before ‘const’
130 | Builder<SelectTParameter>(const char* id) :
| ~^~~~~
| )
E:\MultiGeiger-1.16.0\multigeiger\webconf.cpp:63:73: error: no matching function for call to ‘iotwebconf::Builderiotwebconf::FloatTParameter::Builder(const char [20])’
63 | iotwebconf::Builderiotwebconf::FloatTParameter(“localAlarmThreshold”).
| ^
e:\MultiGeiger-1.16.0\multigeiger\libraries\IotWebConf\src/IotWebConfTParameterBuilder.h:116:7: note: candidate: ‘constexpr iotwebconf::Builderiotwebconf::FloatTParameter::Builder(const iotwebconf::Builderiotwebconf::FloatTParameter&)’
116 | class Builder :
| ^~~~~~~~~~~~~~~~~~~~~~~~
e:\MultiGeiger-1.16.0\multigeiger\libraries\IotWebConf\src/IotWebConfTParameterBuilder.h:116:7: note: no known conversion for argument 1 from ‘const char [20]’ to ‘const iotwebconf::Builderiotwebconf::FloatTParameter&’
e:\MultiGeiger-1.16.0\multigeiger\libraries\IotWebConf\src/IotWebConfTParameterBuilder.h:116:7: note: candidate: ‘constexpr iotwebconf::Builderiotwebconf::FloatTParameter::Builder(iotwebconf::Builderiotwebconf::FloatTParameter&&)’
e:\MultiGeiger-1.16.0\multigeiger\libraries\IotWebConf\src/IotWebConfTParameterBuilder.h:116:7: note: no known conversion for argument 1 from ‘const char [20]’ to ‘iotwebconf::Builderiotwebconf::FloatTParameter&&’
E:\MultiGeiger-1.16.0\multigeiger\webconf.cpp:68:77: error: no matching function for call to ‘iotwebconf::Builder<iotwebconf::IntTParameter >::Builder(const char [17])’
68 | iotwebconf::Builder<iotwebconf::IntTParameter<int16_t>>(“localAlarmFactor”).
| ^
e:\MultiGeiger-1.16.0\multigeiger\libraries\IotWebConf\src/IotWebConfTParameterBuilder.h:98:7: note: candidate: ‘constexpr iotwebconf::Builder<iotwebconf::IntTParameter >::Builder(const iotwebconf::Builder<iotwebconf::IntTParameter >&)’
98 | class Builder<IntTParameter<ValueType, base>> :
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
e:\MultiGeiger-1.16.0\multigeiger\libraries\IotWebConf\src/IotWebConfTParameterBuilder.h:98:7: note: no known conversion for argument 1 from ‘const char [17]’ to ‘const iotwebconf::Builder<iotwebconf::IntTParameter >&’
e:\MultiGeiger-1.16.0\multigeiger\libraries\IotWebConf\src/IotWebConfTParameterBuilder.h:98:7: note: candidate: ‘constexpr iotwebconf::Builder<iotwebconf::IntTParameter >::Builder(iotwebconf::Builder<iotwebconf::IntTParameter >&&)’
e:\MultiGeiger-1.16.0\multigeiger\libraries\IotWebConf\src/IotWebConfTParameterBuilder.h:98:7: note: no known conversion for argument 1 from ‘const char [17]’ to ‘iotwebconf::Builder<iotwebconf::IntTParameter >&&’

exit status 1

Compilation error: too many arguments to function ‘hw_timer_t* timerBegin(uint32_t)’

Thanks Juggler for the hint! Always thought newer version ist better version, but seems like I still have to gain experience - I will try out an older version…

Same issue after upgrading Arduino core. Some changes were made in API. Migration from 2.x to 3.0 - - — Arduino ESP32 latest documentation

So I changed setup_timers function in timers.cpp and the timers seem not to repeat anymore - without errors on compiling.

After debugging I can say, new timers do repeat.

hw_timer_t *setup_timer(int timer_no, void (*isr)(), int period_us) {
hw_timer_t *timer = timerBegin(1000000);
timerAttachInterrupt(timer, isr);
timerAlarm(timer, period_us, true, 0);

return timer;
}

On submitting data the second time, I get an -2 error in this transmission.cpp line: int httpResponseCode = client->hc->POST(body); , which was responsible for not receiving data continuously. Thereis some changes in WiFi too after upgrade.

If you are successful and still have the nerve to add a user-defined MQTT, I would be interested in the compiled firmware files.

I run a (LoRa,Bluetooth,Sound) stripped sketch (based on V1.16.0) on a ESP32 and send JSON to a php script. I know not much in MQTT. To this moment I could not solve the -2 response issue. Maybe later this week, I can show you, what I have.

…thanks hero! Your changes of setup_timers function in timers.cpp stopped the ‘hw_timer_t’ - error.

I tried to compile multigeigerV1.16.0. with older Ardiuino-V1.6.3.
I had to add a list of libraries manually:

  • lotWebConf by Balazs Kelemen Vers. 3.21
  • NimBLE-Arduino by h2zero Vers. 1.4.1
  • U8g2 by oliver olikraus Vers. 2.34.22
  • Adafruit Unified Sensor by Adafruit Vers: 1.1.14
  • Adafruit BME280 Library by Adafruit Vers. 2.2.4
  • Adafruit BME680 Library by Adafruit vers. 2.0.4
  • I2CDevice Adafruit BuslO by Adafruit
  • lmic MCCI_LoRaWAN_LMIC_library

With that setting I ran into the next errors, which made the compiler to exit:

exit status 1
no matching function for call to 'iotwebconf::Builderiotwebconf::FloatTParameter::Builder(const char [20])

I had the same issue when using version 3.0.11 of the “esp32 by Espressif Systems” in the Boards Manager. I reverted to version 2.0.11 and the problem was solved.