3 votes

Declaration of global variables in separate file: compiler conflict

When you have a header/implementation pair of files, the general rule is that the implementation defines everything that the header declares. Thus, you keep the definition of rescale_power in src.cpp. ...
Edgar Bonet's user avatar
2 votes

Multiple definition error in STM32CubeIDE

If you want global variable accessible from everywhere you include global.h, you'll need declaration of that variable in header (declatation only): // globals.h: extern uint8_t vol[8]; Anywhere else ...
KIIV's user avatar
  • 4,742
2 votes

converting comma delimited Serial message to 7 Unsigned Long variables

First of all, it is worth noting that the third number in you example message (100000000000, i.e. 1011) is too large to fit in an unsigned long. On AVR-based Arduinos, and most non-64-bit platforms, ...
Edgar Bonet's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible