OpenWire.h library — Arduino download & installation
If you are trying to connect a 1-Wire temperature sensor or similar device, you need the OneWire library.
#include <OpenWire.h>// Create an OpenWire object on Serial (UART) OpenWire wire(&Serial); openwire.h library download arduino
int sensorValue = 0;
void setup() Serial.begin(115200); // High baudrate for binary data wire.begin(); // Initialize OpenWire Title OpenWire
void loop() sensorValue = analogRead(A0);
// Send as a 16-bit integer (command ID 0x01) wire.write(0x01, (uint8_t*)&sensorValue, sizeof(sensorValue)); GitHub repository: https://github
delay(100);
Arduino PLC IDE (based on CODESYS) does not support arbitrary Arduino libraries. Use OpenWire only with standard Arduino IDE or PlatformIO.