OzGrant 22 Posted November 1, 2012 Share Posted November 1, 2012 G'day I Quote Link to post Share on other sites
Rei Vilo 695 Posted November 1, 2012 Share Posted November 1, 2012 Bonjour, I've experienced the same problem with an one-wire DHT22 sensor. Maybe this thread could help you: SOLVED! DHT22 Temp & RH% One-Wire Sensor on Energia OzGrant 1 Quote Link to post Share on other sites
OzGrant 22 Posted November 1, 2012 Author Share Posted November 1, 2012 G'Day Rei, Unfortunately that posting is not a Dallas one-wire. I Quote Link to post Share on other sites
boarboar 15 Posted November 2, 2012 Share Posted November 2, 2012 Hi, I hope attached library may help. i've used http://sourceforge.net/projects/msp430-ds18b20/ as a starting point. Br Alexander DS18B20.zip OzGrant and pivden 2 Quote Link to post Share on other sites
OzGrant 22 Posted November 2, 2012 Author Share Posted November 2, 2012 G'Day Alexander, Will have a play with the files you pointed me too over the weekend. With a bit of luck may have it all going by Monday. Tks again, as at least I'm on the right track now. Grant Quote Link to post Share on other sites
OzGrant 22 Posted November 2, 2012 Author Share Posted November 2, 2012 G OneWire.zip Quote Link to post Share on other sites
OzGrant 22 Posted November 4, 2012 Author Share Posted November 4, 2012 G'day, Fixed all but one error now (had to substitute noInterrupts() for cli(), and interrupts() for sei()) The following is the error from the energia IDE ----- C:\ti\Arduino\energia-0101E0008\hardware\msp430\libraries\OneWire\OneWire.cpp: In constructor 'OneWire::OneWire(uint8_t)': C:\ti\Arduino\energia-0101E0008\hardware\msp430\libraries\OneWire\OneWire.cpp:96:12: error: cannot convert 'volatile uint16_t* {aka volatile unsigned int*}' to 'volatile uint8_t* {aka volatile unsigned char*}' in assignment ------ Have to idea what my next step is. Unable to find volatile uint16_t in OneWire.cpp Have attached the latest edited files. Grant OneWireVer2.zip bluehash 1 Quote Link to post Share on other sites
pivden 6 Posted January 24, 2013 Share Posted January 24, 2013 Hi, I hope attached library may help. i've used http://sourceforge.net/projects/msp430-ds18b20/ as a starting point. Br Alexander DS18B20.zip 1.83K Thank you! result <3k !!! who will use the correct "DS18B20.h" in "DS18B20.zip" : class DS18B20{ private: volatile uint8_t * _OWPORTDIR; volatile uint8_t * _OWPORTREN; volatile uint8_t * _OWPORTIN; volatile uint8_t * _OWPORTOUT; how important it is to use noInterrupts()/Interrupts() in library? Quote Link to post Share on other sites
OzGrant 22 Posted January 25, 2013 Author Share Posted January 25, 2013 Tks for all the help. I got the one wire working ok. I am now trying to get it to work on the stellaris so the same library can be used on this platform. There's a better following on this 430 forum when it comes to help, possible due to the time 430 has been around. From what I've experienced one has to be more C++ proficient when playing around with the stellaris, and not be reliant on Energia. My last note on this subject is energia libraries. Without them we can only do basic stuff. So if your a arduino convert like my self, stay with the 430 and the help this forum provides. Grant Quote Link to post Share on other sites
boarboar 15 Posted January 25, 2013 Share Posted January 25, 2013 Thank you! result <3k !!! who will use the correct "DS18B20.h" in "DS18B20.zip" : class DS18B20{ private: volatile uint8_t * _OWPORTDIR; volatile uint8_t * _OWPORTREN; volatile uint8_t * _OWPORTIN; volatile uint8_t * _OWPORTOUT; You are right, these need to be changed to be compartible with the latest version of Energia how important it is to use noInterrupts()/Interrupts() in library? Borrowed it from other implementations. I guess needed to follow the exact timings for bit-banging. Btw, I've posted a port of Arduino OneWire lib in the Energia Libraries section. This one is much more flexible, however for the price of the footprint Quote Link to post Share on other sites
MichelV 4 Posted January 26, 2013 Share Posted January 26, 2013 @OzGrant and others: The OneWire library you are talking about is probably the one from Paul Stoffregen. I've made a port for Energia, and have sent him the changes to see if he is willing to incorporate them to his source. So fingers crossed on that one :-). I'll update here if I have more news. bluehash 1 Quote Link to post Share on other sites
OzGrant 22 Posted January 29, 2013 Author Share Posted January 29, 2013 G'day once again. I now have a working Dallas Library that works on both 430 and Stellaris using Energia IDE. It would be nice if someone could check and test it. Grant Quote Link to post Share on other sites
OzGrant 22 Posted January 29, 2013 Author Share Posted January 29, 2013 Might even help if I added the zip. StellarisDS18B20.zip pivden 1 Quote Link to post Share on other sites
OzGrant 22 Posted February 6, 2013 Author Share Posted February 6, 2013 G'day Latest (and working) zip file now in Energia Library area. Have fun Quote Link to post Share on other sites
MichelV 4 Posted February 7, 2013 Share Posted February 7, 2013 Unfortunately I haven't heard from Paul Stoffregen yet, so I decided to release the modified source here. I still hope he'll respond, and include the changes in his own library, but at least you guys have a chance to play with it now So, attached is the UNOFFICIAL OneWire library, that is compatible with Energia. Regards, Michel. OneWire Energia Compatible.zip bluehash, energia and kennylin0309 3 Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.