OneWire with Artemis Thing Plus

Because Artemis uses RTOS, the interrupts in OneWire.cpp are not defined for the Artemis. This causes errors wherever interrupts() and noInterrupts() are declared.

I replaced noInterrupts() with detachInterrupt(…) and interrupts() with attachInterrupt(…) and it compiles but I have no idea if what I wrote is technically equivalent to what the interrupts in OneWire were doing (there is a difference between external and internal interrupts). The implementations of detachInterrupt() and AttachInterrupt() are based on the code examples in Apollo3.

I haven’t tested the code with a OneWire device yet but I wanted to know if there have been any efforts to make OneWire compatible with Artemis.

The revised OneWire.cpp is attached.

OneWire.cpp (18.3 KB)

Hi Mjaffee72

Did you manage to get OneWire working with Artemis?

I tried your code with a DS18B20 Temperature Sensor but no luck.