SparkFun Forums 

Where electronics enthusiasts find answers.

Hardware or product specific questions are best asked here.
User avatar
By Mjaffee72
#222796
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
You do not have the required permissions to view the files attached to this post.
User avatar
By artis
#228762
Hi Mjaffee72

Did you manage to get OneWire working with Artemis?
I tried your code with a DS18B20 Temperature Sensor but no luck.
 Topic permissions

You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum