Shop OBEX P1 Docs P2 Docs Learn Events
PropBasic: Weather Thingy — Parallax Forums

PropBasic: Weather Thingy

skynuggetskynugget Posts: 172
edited 2010-11-05 05:16 in Propeller 1
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 :)
1600 x 1200 - 242K

Comments

  • VonSzarvasVonSzarvas Posts: 3,523
    edited 2010-09-30 23:16
    Very nice, well done. I will put the SHT11 on my "to-buy" list.

    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 !
  • TonyWaiteTonyWaite Posts: 219
    edited 2010-10-01 02:40
    Looks practical and useful code - thank you very much for sharing!

    T o n y
  • skynuggetskynugget Posts: 172
    edited 2010-10-01 07:55
    Thanks guys! I wouldn't have been able to finish, or even start this project without the help of everyone here. Its only fair I post the final results!

    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.
  • VonSzarvasVonSzarvas Posts: 3,523
    edited 2010-10-01 08:06
    skynugget wrote: »
    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 !!

    :lol:
  • skynuggetskynugget Posts: 172
    edited 2010-10-01 08:15
    HA! *gulp
  • skynuggetskynugget Posts: 172
    edited 2010-10-29 17:05
    so i started on the receiver, wahoo!

    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!
    1600 x 1200 - 192K
  • $WMc%$WMc% Posts: 1,884
    edited 2010-10-29 19:26
    skynugget wrote: »
    so i started on the receiver, wahoo!

    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.:confused:
    '
    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.;)
  • skynuggetskynugget Posts: 172
    edited 2010-10-29 19:46
    sure, its a Garmin GPS 18

    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..
  • $WMc%$WMc% Posts: 1,884
    edited 2010-10-30 11:06
    skynugget wrote: »
    sure, its a Garmin GPS 18

    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.
  • skynuggetskynugget Posts: 172
    edited 2010-11-02 16:29
    So here it is, probably the closest thing to a "completed project" I have come to.

    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!
    1600 x 1200 - 262K
    900 x 1200 - 145K
    900 x 1200 - 129K
  • VonSzarvasVonSzarvas Posts: 3,523
    edited 2010-11-04 03:38
    Very nice skynugget, thanks for sharing.

    ..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.
  • skynuggetskynugget Posts: 172
    edited 2010-11-04 05:19
    i have a bunch of different sized barrels on one end, with a 9v clip on the other.
    there is actually a wallwart plugged in to the other side of the clip.
  • $WMc%$WMc% Posts: 1,884
    edited 2010-11-04 16:24
    skynugget wrote: »
    So here it is, probably the closest thing to a "completed project" I have come to.

    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!
    '
    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!!!!
  • skynuggetskynugget Posts: 172
    edited 2010-11-05 05:16
    Thanks for the kind words WMc, but im still a wannabee myself :)

    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)
Sign In or Register to comment.