First compilation error problem solved - maple library (STM32duino) use keyword "Timer" and that provide conflict with "Timer" from NodeManager.
I just changed ALL "Timer" and "timer" to "Tajmer" and "tajmer" (polish speel of "timer" ) in NodeManager files - (also Timer.h and Timer.ccp to Tajmer.h and Tajmer.ccp)
Second problem is with analog reference for ADC converter. In STM32 we have no choice to select external or internal Vref and DEFAULT in Node.h (NodeManager) need to be modified:
184 uint8_t _analog_reference = DEFAULT;
184 #if defined(ARDUINO_ARCH_STM32F1) 185 uint8_t _analog_reference = -1; 186 #else 187 uint8_t _analog_reference = DEFAULT; 188 #endif
and in the file SensorAnalogInput.h we need to modify:
33 int _range_max = 1024;
33 #if defined(ARDUINO_ARCH_STM32F1) 34 int _range_max = 4096; 35 #else 36 int _range_max = 1024; 37 #endif
ADC in STM32 is 12bit with range 0-4096.
Another thing is that presence of gateway need to by delayed because of USB reset and presence to controller. Without delay, controller (in my situation Domoticz on RaspberryPi) need few seconds to manage "virtual maple com port" on USB, gateway presence message from STM32 is already sent but not received by Domoticz. Simple fixed by uncomment (and modified from 5000 to 2000) :
define MY_TRANSPORT_WAIT_READY_MS 2000
But still problem when using sensors with interrupts eg. SensorDoor, SensorMotion, SensorInterrupt - also compilation problem with STM32 because of different interrupts constructions as by AVR - need to be solved.
best regards -
PS. I'm not programmer - more CTRL-C CTRL-V
Please feel free to correct and modify.
why bluepile -
- USB on board - very simple programming over STM32duino bootloader - hardware serial port,
- second hardware serial port for RS485
- many pins with 5V compatibility.