PropBasic: Weather Thingy
skynugget
Posts: 172
hey all, here is some PropBasic code that will interface with the SHT11, SCP1000, and parse time/date from a standard gps GPRMC sentance.
you might want to double check my math in the SHT and SCP tasks, i tend to overlook some things. they are also not full featured drivers, i had trouble setting the option codes on the SCP1000 and gave up, but its a start!
special thanks to Bean and JonnyMac for all their efforts.
if ya make it better please share
you might want to double check my math in the SHT and SCP tasks, i tend to overlook some things. they are also not full featured drivers, i had trouble setting the option codes on the SCP1000 and gave up, but its a start!
special thanks to Bean and JonnyMac for all their efforts.
if ya make it better please share
Comments
I had a quick scan of your code... Your WAIT_STR function might be improved:
Note: I am giving an unlikely example to highlight the problem... a more likely example might exist!
At the moment, consider what will happen if "GPGPRMC" arrives on the SERIN, and you are waiting for "GPRMC"
As I can see, you will miss the GPRMC as you would reset at the second G, then be left trying to match "GPRMC" to "PRMC", which of course wouldn't !
Hope that makes sense !
T o n y
I see what your saying Max, and i think you are correct. I don't think it could ever happen in this application, but if you wanted to use it for human input, it would have to be tightened up.
once i can find/afford a decent anemometer, vain, and tipping bucket this thing will be complete station!
these xbees are great, i plan to make a bunch of things to put on a pan. the first being a receiver to display my new found weather data. i just need to come up with a pritty display that's wife approved also i can see it being the time sync for clocks around the house.
So when the family is running late, it will be all your fault ! Proceed with caution !!
i had a 4x20 chracter lcd laying around, so im using that for now, but id really like to find something that will look a little prettier.
can anyone recommend a large graphic lcd that's easy to work with?
ill post the code once i clean/comment it up, i just had to share the excitement!
Great work skynugget:freaked:
'
One ?; Do you have some more info on the GPS. I don't see the GPS unit in the 2 pics.
'
I am thinking of adding GPS to my Prop-R/C Brushhog/mower.:idea:
'
P.S. I think you should autograph the code and add a MIT to it.;)
https://buy.garmin.com/shop/shop.do?pID=223&ra=true
its a bit overkill for this application, but its what i had in the basement. you should be able to use any serial gps that spits out a gprmc sentence..
skynugget
'
Thanks for the GPS-info and code above!
'
I'm looking forward to seeing the added LCD in your neat little project.
Here is some pics and the updated code!
My reason for building this was two fold, 1) force myself to unpack my "electronic stuff" from a recent move, 2) force myself to get better acquainted with the nuances of PropBasic. Reason 2 is mainly the reason i used these oddball digital sensors, its too easy to read a2d's!
I have some pretty grand ideas for receiver, ive been eyeballing one of rayman's boards . who knows if ill ever get around to adding features, but so far its been fun!
thanks everyone!
..about the power supply to the transmitter.. I can see you have a 9v batt clip attached at the moment. Is that just for testing? I mean, I am curious how long one battery will last powering the protoboard and xbee.
there is actually a wallwart plugged in to the other side of the clip.
Excellent work skynugget!
'
I really like the new Parallax clear box you used.
'
I think this should easily make project of the month!
'
I really like your code lay-out.It gives us wannabees something to live up to.
'
Thanks again for sharing your project. Well Done!!!!
i wouldn't have been able to do any of this without the help of this forum over the years, so i try to share everything i can, in the hopes i can return the favor.
i actually made that enclosure out of homedepot lexan on my micky-mouse mill. i did, however; use the parallax dxf as the basis of my design. i didn't want to post the dxf of my design for fear of upsetting parallax. If there is any interest, and i get an O.K. from parallax, id be glad to post it. (maybe im being overly cautious)