I am trying to test a DS18B20 temperature sensor through the OneWire interface - using Particle and a Raspberry Pi Zero.
I am consistently getting the following compilation errors when trying to use the the OneWire example (“DS18x20_Temperature”) from the community libraries.
/workspace/lib/OneWire/src/OneWire.h:96:5: error: ‘STM32_Pin_Info’ does not name a type
STM32_Pin_Info* PIN_MAP = HAL_Pin_Map(); // Pointer required for highest access speed
/workspace/lib/OneWire/src/OneWire.h:99:7: error: ‘PIN_MAP’ was not declared in this scope
PIN_MAP[_pin].gpio_peripheral->BSRRH = PIN_MAP[_pin].gpio_pin;
/workspace/lib/OneWire/src/OneWire.h:103:7: error: ‘PIN_MAP’ was not declared in this scope
PIN_MAP[_pin].gpio_peripheral->BSRRL = PIN_MAP[_pin].gpio_pin;
Physical device : Raspberry Pi Zero W
Particle-agent version : 0.2.4
Developing using the web-based IDE on https://build.particle.io/build
Note that I can successfully include, and use other community libraries (eg. #include “LiquidCrystal_I2C_Spark.h”) However I am not having any luck with OneWire.
Any help would be appreciated.