Sensirion
Shining Ivy
Posts: 5
Hello I am new to the world of microcontrollers and this is my first posting on the forums. I am trying to make a environmental control system using the propeller chip, sensirion sensor, and a modified SensirionDemo to monitor then toggle an I/O pin to flip a relay, but I can't seen to understand the code that holds the value of humidity (or temp for that matter). I was thinking that if i declared a global variable and ran another cog to monitor that variable I could then have an "if" statement read the value and act accordingly, but apparently I don't know what I am doing. I have modified the display driver to work with the FullDuplexSerial because I dont have a TV. The code is attached. Any help would be very great.
Thanks
P.S. I have worked my way through the PE kit Lab and I am going back through it because obviously I need to.
Thanks
P.S. I have worked my way through the PE kit Lab and I am going back through it because obviously I need to.
Comments
Has nothing for a comment. However, here's my note for this line of code:
rawTemp equals the value returned by the readTemperature routine in the SHT (sensirion.spin) object after being formatted by the FFloat routine in the f (Float32.spin) object
That's really long winded for a comment, but that's my note I created after I analyzed that single line of code over and over again. Even though I have a few propeller projects on my completed list already, I haven't finished the PE kit. You should be able to do exactly what you are asking about and I would suggest doing what I did with the Sensirion code and then find a PE Kit lesson that digs deeper into sharing variables between methods/cogs. I think the Result variable explanation, page 74,may be a start. Once you have each of those down, just join them together. (This is how I have completed projects; I can mash up demo programs very well to make "my" desired program).
also, look here: http://forums.parallax.com/showthread.php?p=574524 Example 5 on the first page.
I am sure some seasoned "SPIN"ners will have more to say (and maybe even correct me)
Welcome to the forums!!!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Andrew Williams
WBA Consulting
WBA-TH1M Sensirion SHT11 Module
Special Olympics Polar Bear Plunge, Mar 20, 2010
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen