Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / One Wire Weather Station project (open source)

Author
Message
HowDo
22
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 26th Feb 2007 00:45 Edited at: 26th Feb 2007 01:04
update we have a reading of something.

we got 45.5c/113.0f

getting closer to lift off.

is there anyway of getting a string output of what you are read and showing it on screen as I may be able to see if any of the numbrers are changing.

itest is coming back with 170.
edit
sometimes it comes back with -45.0c/-26.5f itest = 15

so your are getting something back.

Dark Physics makes any hot drink go cold.
jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 26th Feb 2007 02:26 Edited at: 26th Feb 2007 02:42
170 is good, but not what I want. That is the value that it powers up with. I don't like all the resets, however. I commented one out.

The code is all at lines 2568 - 2638 for both the convert request and also to pick up the data next time. I modified it to simply print the value returned without any processing.

Well, no...it didn't mean that, only that I can do this without having the same device, I just need to apply better techniques and quit using voodoo. BUT, yes, I want that, too! (Remote data collection is the main purpose of this...extending it across the Internet seems logical enough...we will get there soon.)

Attachments

Login to view attachments
HowDo
22
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 26th Feb 2007 02:57
before you changed it to this one I had been running a cout on how manys times I got 170 and 15, started to look a bit like this

for half hour

170 = 21 an 15 =9

may have to try checking that again but seem that it starts as 170 next 15 then back to 170 for 6 or 7 ticks then 15 sometimes you get two 15 in a row then back to 170.

Dark Physics makes any hot drink go cold.
jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 26th Feb 2007 03:00 Edited at: 26th Feb 2007 03:20
...and doesn't that sound like it needs more time? Try putting sleep 750 after the convert is requested...at line 2631, just before the endcase.

EDIT : Also, I am not converting correctly...I am converting for my DS1921. I have made corrections for that in my copy of the code. Let me know how the sleep goes for you.
HowDo
22
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 26th Feb 2007 03:20
looks like thats working stays set at 15, changing 750 to see how low it can go, unless that not the goal were aiming for.

Dark Physics makes any hot drink go cold.
jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 26th Feb 2007 03:21
No, that's it....that was what I was going to say just now!
HowDo
22
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 26th Feb 2007 03:33
600 looks a good figure will be making lower later now seeing if in the warm that 15 number goes or not.

Dark Physics makes any hot drink go cold.
HowDo
22
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 26th Feb 2007 03:35
Huston we have lift off the weather as left the tower.

Dark Physics makes any hot drink go cold.
jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 26th Feb 2007 03:37
Okay, then...here is my latest with all of that taken into consideration, and hopefully, the conversion is correct.

Attachments

Login to view attachments
HowDo
22
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 26th Feb 2007 03:52
looking good, going up nicely just gone past 15.5.c 59.9f now 17.0c 62.6f

trying to think of away to check that 32f or 100f is just that without hurting my self.

Dark Physics makes any hot drink go cold.
jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 26th Feb 2007 03:55
Oh, and I do understand...I do. I can access my DS1921 completely. I put it by the TINY spaceheater I have, which gave me a warm fuzzy feeling like you have now.

Okay, now we see what the count is. I'll write that up directly tonight. Sam has already left.
HowDo
22
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 26th Feb 2007 03:58 Edited at: 26th Feb 2007 13:17
ok luckly I don't to start work until 3pm GMT so I have another hour, but do not rush it, take your time please, as its fun, just watching it doing something.

Well Done, thank you.

edit

lowest I could get the sleep down to is 490 > 500 anything lower does not work, did I say it is begining read on a 10meter length of wire, could be why it need about half a sec to work.

Dark Physics makes any hot drink go cold.
jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 27th Feb 2007 03:06 Edited at: 27th Feb 2007 06:26
Yes, I had assumed that it was installed at the end of something like that. Add to that the fact that the devices take parasite power, and all of the ringing and other noise caused by the intermittent nature of the comms, its messy. Have you ever gone to the Dallas forums? Some of those guys are tearing their hair out over it. (Not me...I have alot of experience with this type of thing. I spent an afternoon with an engineer once using a set of tin snips on a tin can oscillator. It was a blast!) I intend to bury my cables for that, and my telescope underground, and also...repowering the USB with a hub might improve things. I am certain that comms could be improved with a tuned circuit at each end, but...I am impressed with these things.

You know, all the trouble we've encountered has really been all my fault. I knew at the back of my tiny little mind that I would need to put that damned sleep in there, but I am stubborn. (Oh, don't think it won't come out, either...I hope!)

I used to build, install, operate and repair a rather complex passive sonar system which had about 300 data cables alone. Have you ever spent 12 hours ohms checking 16-bit parallel data exchange cables? Fun!

Here is a little thing I worked up in about 1991 with QuickBasic 4.5 to talk to the equipment I was using on that system...it wasn't exactly condoned, but...I was allowed to use it when equipment failures threatened the mission. I bought all of the parts for it in Tokyo...it is a MIL-188C to RS-232C converter...it was quite useful. Too bad, but about a year after I made it, the Navy contracted for a very poor laptop solution...I made mine for about $15. (Now, maybe you see why my government will pay $700 for a hammer.)


So, anyway...I am studying your counter...its nice. This will be a fun part. Oh...Ann Coulter and Darryl Hannah are fighting on my TV...man, its like "Girls Gone Mild"!

EDIT: btw, if we have to kepp the sleep in there...I think we might just as well take the data immediately after that. I will modify that, too.
HowDo
22
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 27th Feb 2007 05:44 Edited at: 27th Feb 2007 06:15
Well the above code was on me P3, now the dual core come back will see how low or high it has to go on the sleep bit
.

On the dual core machine the cpu socket was not on the motherboard correctly so it was confusing all in senors to the point where the system goes into fail safe mode and shuts down.

Once had the task of making a parallel port switch between two printers but only using a 4 gang rotor, found you could just switch the five volt rail instead of all the wires.

One other thing the other weather program can read the .00 part in both F or C, wonder were they are finding the extra bit or is that byte.

cheers

edit
just thought I'd check what the itemp count was and you get 0 1 and 2
for itemp = 0 to array count(Devices()) line 2568

Dark Physics makes any hot drink go cold.
jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 27th Feb 2007 06:29 Edited at: 27th Feb 2007 06:49
That's right rich, mate!
Yes, I changed the sign check to just use the negative, that is not right. I have changed mine to use that function I wrote before, jzMakeWordIntValue...I think it would work on the value returned. I will post up a mod in a couple of hours.

Get the extra decimal place from str$...I put it at 1 just because...I don't know why! (We can try the method in the datasheet to increase the resolution of the reading, too if you want to...it is a little more involved, but it works like successive-approximation does...I can do that.)

here.temperature = str$(itest / 2.0, 3) + "C/" + ...
str$((itest / 2.0) * 1.8 + 32.0, 3) + "F"


itemp at that point is just the device number in the array. So, that loop is there to loop through the devices, looking for one that has a command pending.
jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 27th Feb 2007 08:19 Edited at: 27th Feb 2007 09:09
Okay, give this a try. I haven't done a thing with your counter. (I watched 4 hours of "Dogfights" on the History Channel...oops.) I did manage to clean things up a bit.

I wrote a quick little routine for you to mess with to read the extra bit....its a bit, but it doubles the resolution, at least. I really did it very ploddingly for a reason...I want to make sure you can watch it happen by the numbers, if you need to...its a bit of the old voodoo, I'm afraid...hope it works.

Attachments

Login to view attachments
HowDo
22
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 27th Feb 2007 13:36
Working OK, nice lot of numbers two decimal place would have been great but three is fantastic cheers, had to put the sleep back in again as every now and then it got a bit hot lol.

OK I ask for this now hope it easy to put in, waiting for a minute to pass seem to take for ever, any chance of a sample rate to the conversion call.

at the moment I disable the network clocks and mess with timer so it goes to conversion at 5 or 10second intervals.

I believe your clock checking will be very useful when I suddenly get to the part were I think that's why I need the clock.

nice and windy here today... tack (some boat term).

Dark Physics makes any hot drink go cold.
jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 27th Feb 2007 14:52
xlnt. Once a minute was just to keep me from trying too hard to get the time...it can really be anything legal. I have tried to make something that would support that. The new function is a part of that process, too.

That is why I only commented it. Sleep value will be something that the program can track, and adjust....soon.

Okay, got a 9AM start today...I feel like a dairy farmer with two early starts in a row.
HowDo
22
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 27th Feb 2007 15:33 Edited at: 28th Feb 2007 05:49
If you were a dairy farmer starting at 9am would make you about 5 hours late.

seeing as you will probably reading this in a past sense (the day has happened) how'd it go, good one.

I like having a job were you are not controlled by the morning clock, you are just allowed to wake up when your on board say it time too, nice.

well I tried adding my graphics to your code works but the flashing of text is driving me nuts as I can't remember what should be set and where.

good job I've got google spell check other wise you would be having great fun figuring out what I trying to say to you.(what you know google not in there dictionary.)

well I beat you home or online posted the code with my weather sim added.

Dark Physics makes any hot drink go cold.

Attachments

Login to view attachments
jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 28th Feb 2007 06:26 Edited at: 28th Feb 2007 08:05
remstart at line 1058, remend at line 1089. That's what I did. I anticipated this, and I rewrote it a little to let you start doing that. I took what we have, and made a function that selfishly does the entire convert, returning celsius as a float. Then, I wrote a function for my DS1921, and stopped calling EnumerateDevices after the initial time at lightoff. Next, I moved the temperature reading to every 5 seconds to show you how you can use that loop for now to get timed data.

I will comment out all of the display, and just leave the timed stuff in there. I'll post it up in a few. (We had our turn to lose the electricity today, and the furnace went out, to boot.)

I had started to post a comment about the weather vane, but...I ended up canceling for some reason...probably Apple software bugging me to update my Apple security. That is a very right and true analog. I tried to get a sort of audio deck look to my first Windows comms program, which communicated with Digital Fault Recorders used by electric utilities. (That program is very nice, but proprietary.) It worked pretty well for 16 bit Windows. I used Windows radio buttons as bi-color LEDs.

...and I never said that I was a punctual dairy farmer, but to put the record straight, I am a butcher. (No, the cows are not happy to see me, but...they are already dead when I see them.)
HowDo
22
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 28th Feb 2007 06:42
looks like you could have done with one of those 12v car inverters to 110v or 240v to keep your furnace going.

decided to move the pointers to the middle of screen so that the above text can still be seen, for now, may move all around or learn a better way to display the info.


early morning here and there some big flashes going on but no thunder?

Dark Physics makes any hot drink go cold.
jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 28th Feb 2007 06:50 Edited at: 28th Feb 2007 08:15
Someone had already used the doorbell transformer to power the thermostat...I laughed so hard when I finally found the end of the wire. Brilliant! (The furnace guy apparently did not share my amusement...we have a new programmable thermostat and a clean furnace...$175 later.)

Okay, here is something that combines both, and looks good on my screen.



I would like to make a Galilean thermometer for my temperature display. It seems an interesting challenge to me.

Attachments

Login to view attachments
HowDo
22
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 28th Feb 2007 14:12
Galilean thermometer I think dark physic will do it very nicely, save having to work out all the up and down bits, just making look good would be the hard part.

Yes, that looks much better, was trying last night to make the speedometer into a temperature gauge, little things like how to do percentage and quick way of laying number text in a circle are slowing me down so doing manually.

Did I read further back you found away of sending data from DBPro program to another, so if keeping them separate might be easier one is the weather graphics the other the ibuuton code that does all the work.(just a thought).

Ooh just seen were on page 4.

Very windy again today doing 18mph+.

Dark Physics makes any hot drink go cold.
jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 1st Mar 2007 03:18 Edited at: 1st Mar 2007 03:20
I had started to mess with that speedometer, too...I only got as far as starting a UDT to contain the variables. I like how you have contained all of the code in functions. You have created an excellent analogue of the station, and we are very close to hooking it all up. Speaking of the speedometer, I have named it type DIALGAUGE. If we put all of the variables in there, we can make functions to display data, and then I will add a reference to the type in the Devices UDT. It will serve to tie devices to display methods, and objects.

No, that is an excellent idea. I like the idea of giving a user dll that contains the exposed functions, which work without too much mystery. That is the best way to do it, because...to pass data between windows, [whether they are separate apps, or just separate windows in the same app], it is best to use the mechanism that Windows already has, which is either some form of Dynamic Data Exchange (DDE, the clipboard uses it.) or create a unique message to do it. (That is how I do it.) There is alot of stuff obscuring the 1-Wire API calls, again my fault, but (to me) in order to support a trivial interface that is easy to work with and produces consistently correct results, you must write alot of utility functions, and also know very well the status at all times. So, alot of the work I have done here is not strictly necessary to talk to the devices. I am further a little shamed at how simple the routine to read your DS1820 wound up being. I suppose I should've started like that, but I started looking at the whole network.

The truth is...had I written this merely to support the weather station, I'd probably have been done two months ago. I am not yet totally comfortable with DBPro...there is alot to explore, plus I have my own agenda, which to be perfectly blunt about it...needs me to service it. (I have no aspirations of being a butcher. I am in my third year of it now, and...I greatly prefer doing this to doing that.
HowDo
22
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 1st Mar 2007 05:21
Yes I was pleased with my speedometer as its was the first Time using the curveangle command, before then it was a command I would read about but not understand until now, then found out just how simple it was to use.(when someone showed me how that is.)

Also thinking of making a confusing one were there are two needles one for Mph and one for Kph, should be fun making them hit the right number from the counter (oops nearly ).

working out at lunch at work how many meters there could be here's a list

Temperature F C 2
speed MPH KPH 2
wind direction 1
rain gauge mm ins 2 (future buy.)
humidity 1 (future buy.)
barometer 1 (future buy.)
moon phase 1
analog clock 1
------
11 or 8 dials

been having one of those days, task at work is simple to do but I seem to be digging myself a hole, must put the blinkers on and focus more on doing the task.(soldering components into boards.)

Like you've said doing coding to me is a relaxing way of passing the time special when it all starts to go how it should.

off to see if I can surf any moonphase pictures that can be put onto a sphere or work on lighting sphere so that it gives the look of the moonphase lighting.(looks out windows see the moon not full yet so no howling. lol.)

Dark Physics makes any hot drink go cold.
jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 1st Mar 2007 06:58 Edited at: 1st Mar 2007 07:00
On Saturday when the moon is truly full, there will be an eclipse. You will see it when the moon is high enough to give a good show, but...I'm betting that our atmosphere will give me a better coppery metal view, albeit low, at moonrise. (Good for me, there's not a mountain in sight for MILES.)

I like the list, good to see you anticipate the humidity sensor...they are a bit pricey still, however.

I don't know why, but...I like to solder. Wire-wrapping is what drives me bonkers.

...and, btw...I do appreciate the dual-needle one, let's absolutely do that.

Will have some code to begin to get the count soon. Hopefully sometime tomorrow afternoon.
Cheers.
HowDo
22
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 1st Mar 2007 13:44 Edited at: 2nd Mar 2007 06:16
Quote: "Wire-wrapping is what drives me bonkers.
"


No its not that, its having assemble a rack or what ever and then some R&D person say Ah! we changed a few things, can you undo it and put them here, here and here, or add this, this and this.

That's when you go bonkers same as when you looking for pictures of the moon found one that would have done nicely but would have to get the copyright permission to use them very high res. for some reason NASA did not seem to have any moon phases picture or I could not use there search system correctly.

edit

add this to the code put makelightsandcolor() after makevain()



Dark Physics makes any hot drink go cold.
jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 2nd Mar 2007 06:22 Edited at: 2nd Mar 2007 06:28
Oh, we called those ECOs in the military. Unfortunately, civilians do not have to go through as much red tape, so they just bug you on the floor. That place that makes the DFRs was like that. I spent a year and a half on the test floor, and they even came in there and changed stuff after it had been built, and configured!

Meade has some nice pics at their site. They make the camera I am getting. (They also made 2 of my telescopes.) Plus, there are links to amateurs who will let you have their stuff. I can get you a picture maybe next month...still short about $100 on getting it. (Yes, it costs $100!) Try starting here:
http://www.meade.com/lpi/gallery.html,
or here:
http://www.wvi.com/~rberry/

I have some code for you to try out. I have finally broken EnumerateDevices up by taking the repetitive code out, and creating a new function, AddDevice. This is the constructor for a device. Also, I am trying to get your counter's values right after the temperature conversion. I put some text on the screen to watch the two external counters. Also, I confess, I played with your speedometer.

EDIT: Aren't you the clever primate! That is effing awesome!

Attachments

Login to view attachments
jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 2nd Mar 2007 06:23
Okay, but...lem'me put it in what I just posted....g'd'ev'en'n, there.
HowDo
22
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 2nd Mar 2007 06:33
ok,
been trying to change the color of text when the pointer was pointing at it, only to find it just changes all the text to the same color. look like images are on the way.

Dark Physics makes any hot drink go cold.
HowDo
22
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 2nd Mar 2007 06:35
Bingo, done in one.

Dark Physics makes any hot drink go cold.
jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 2nd Mar 2007 06:39
Alright, we are getting somewhere now, aren't we?

HowDo
22
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 2nd Mar 2007 06:44
will count A and B reset after a time?, when you want a windy day you just don't get one.

I think its showing 2kph thats what the other program is showing.

Dark Physics makes any hot drink go cold.
HowDo
22
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 2nd Mar 2007 06:59
going to have to leave you in suspense as I need to go to bed big day today have some workmen around to do the cavity wall insulation so need the sleep.

both counts would show one higher eg count A 10 count B12 or count A 12 count B 10.

Dark Physics makes any hot drink go cold.
jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 2nd Mar 2007 07:27 Edited at: 2nd Mar 2007 10:09
No, they just spin round and round. They are returned to zero when power is applied, so we can use that method. They should be at zero when the program starts, but...they will not stay at zero. The way we will use them is by tracking the difference in count over a fixed period of time, and then convert to the proper units. I have not studied that as it pertains to the weather station. There is a formula somewhere, I think.

EDIT: I found the formula after alot of fruitless wandering about, like before. (Dallas is clear - they do not support the station, and the docs are incomplete, and a little Java-biased.) So, it looks like you just take a count every so often, and do the math. I put a little test code in there to do it. Also, I have the DS2450 thing in me head, I can feel it dribbling down, pretty easy, do a conversion and the result is a voltage that relates to the direction, but...it needs calibration, so I'm going to give you two keys for rotating it in the software. (Probably F1/F2). The direction, we will do more often, I think...on the tick, perhaps.

Another thing is that your counter can go 10 times faster than we are using it. (In terms of communications, that is.) We'll explore that (Overdrive mode) later.

Oh, and I tried to smooth your objects...how's it look?

Attachments

Login to view attachments
HowDo
22
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 2nd Mar 2007 11:23 Edited at: 2nd Mar 2007 23:12
Well that looks total different, shine coming along nicely, here's a link that might help, plus I will show the formula that's listed in it.

.http://www.aagelectronica.com/aag/index.html

their count formula.



I think you might find the link of use with 20+ FAQs.
oops should have been just 5 lines not all of it.
A16 looking for.

been trying to think of something that I have that I can set to a 1000 rpm or less and put this on the anemometer so as to check that it is counting as we think, as the speeds look to high.

edit
found this pdf on the wind direction at
http://www.midondesign.com/Documents/Calculating%20Wind%20Speed%20and%20Direction.pdf

Dark Physics makes any hot drink go cold.
jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 3rd Mar 2007 04:01
I didn't divide the count by two. I actually got the method for this one from BASICStamp source code. It was a little over the top, the Stamp was being used as the bus master, and there was a lot more of the resetting, and bit-banging. My Stamp is too old; it is too slow to do 1-Wire....dang! I really don't like buying those things...I like using 8051 style microcontrollers. I have a Philips MCU that is just fabulous. It came with JavaBeans from Symantec...I forgot what it was called, but the whole thing was called emWare, and I really liked it...7 years ago. Anyway, I just don't like Java too much because it is a pain to develop with...to me. I tried to use Swing, but versionitis just made it frustrating.

Whatever.

Yes, I found that last link, too. It was great because it was blue, and my printer is nearly out of black. Only problem with ALL of them is that they do not clearly indicate to me what I am supposed to be using. The schematic shows the sensor connected to both counters, so...I would guess that both counts should be the same, and that I could use either one. For some strange reason, one guy took count A, and then waited 5 seconds, and took count B. Then, as if to complicate the matter further, the BASICStamp code only takes 24 bits from count A, now that has to do probably with the limits of their BASIC, and the Stamp itself. I chose to take count A, all 32-bits, both times.

I still haven't located my crappy o'scope, but...I broke out my USB powered speakers, and I can hear the 1-Wire just fine, thank you...beep-beep.......beep-beep....every 5 seconds.

About the display...you know I only have that one hammer, the smoothing...so, everything looks like a nail to me. I like it, and I don't. It seems to soften your excellent specular light too much. I was curious to see if its effect would remain on the moving parts. I know that smoothing makes an average MD2 model look much better. (They are generally low-poly, and so suffer alot from aliasing.) I did see your light finally, it reflects off the vane when it goes through about 35 degrees in the positive direction. Very cool!

I put the divide by two in, and now...I am going to get your direction...tonight, I hope. Is that the error, by the way? Could you check it while I am coding up the direction thingy? Just divide revolutions by 10.0 instead of 5.0 at line 1075-ish.

Hopefully, I can bang this out in an hour, or two...shouldn't be a problem.

btw, the day you asked about went swimmingly...the rest, not so much.
HowDo
22
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 3rd Mar 2007 04:32 Edited at: 3rd Mar 2007 04:32
On Track, divide 10 matches other program speed reading.

have been look at what you have to do to code for the wind direction ouch! theirs a lot there in its flow charts.

Up early again, normally getting ready to come home from work, (jammy sod only works 4 days a week)then go to bed, but seeing I have to get up early on Saturday to take someone to do the weekly shopping, here I am doing this (more fun than working but it don't pay any bills though).

amazing out of nearly 3000 commands in DBPro I had not seen object smoothing like what that one does.

Do you or anyone else who may be reading this have a coin shape disk that I could use as a back plate for the speedometer as flattening a sphere looks OK but when flatten you cannot give it a color that show up.

My Thursday was not so bad after all, just took my time and it went better than I thought it would, my (Friday) day with the wall cavity was done quicker than had been expecting, all over and done with in under 3hrs, bloke was up and down the ladder like lighting and with a 25kg hammer drill in one hand, clever stuff rock wool.

So it good-evening or morning ?

Dark Physics makes any hot drink go cold.
jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 3rd Mar 2007 04:44
rock wool is very very clever indeed.

I imagine that one could not swing a dead cat without hitting someone here that had two of those. The trouble with this thread, apart from my involvement with it, is that...noone else has the weather station. Heck, I don't even have one yet!

It is evening, and I missed the first "Dogfights", but...like everything else on the History Channel, it will come back around directly. (Nice to see how you chaps are coming along and holding up against the Blitz, and all.)

About the direction, the trouble for once is not the 1-Wire, its the extrapolation of the data...but I am going to try a little of me voodo, and see if the data can be sussed out more quickly. I think I will use multiple select/case, starting with the total voltage. Otherwise, its like shooting fish in a barrel, but with a howitzer.
HowDo
22
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 3rd Mar 2007 05:00 Edited at: 3rd Mar 2007 05:01
Well ping a post when ready and will give it a spin (pun intended), that way you'll know your on the right path.

Quote: "Heck, I don't even have one yet!"


true but you got the graphic for when the windfall or budget allows and other coders may not want to or afored to buy it, but they might like to show off their object coding, but as you've said it up to them.

Dynamite fishing better, get a bigger bang. No fish just a big bang. lol

something the computer guy told my mate, in Vista you can plug usb memory stick in and use them as direct memory or drives, so a 20gig usb drive could be use as 20gig of physical memory.

Dark Physics makes any hot drink go cold.
HowDo
22
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 3rd Mar 2007 05:27 Edited at: 3rd Mar 2007 05:28
Wow! this hurts,



add the media folder from SpheremMpping code or change the path to it if you still have it onboard and put the above bit at the begining of makevain().



Dark Physics makes any hot drink go cold.

Attachments

Login to view attachments
jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 3rd Mar 2007 05:48 Edited at: 4th Mar 2007 07:38
It looks better than the Dallas ad pic, which is pretty nice. btw, I stumbled on a "weather Underground" site last night. They are interested in your data, I think.

Oh my, you've gone and made the dual-needle gauge!

EDIT: Well, here it is. A few things about it:
1. I am a little shy, it only tries every 3 seconds.
2. It is a very convoluted routine, but...it looks good to me.
3. I have used an approximation to interpret the results. This
device is substantially more capable and configurable than the
others, its pretty flexible. Probably, I could just adjust the
values returned by the calibration that is in the device...that
is for later, I think.
4. I return the direction as a negative for an error, or
1.0 - 16.0 for each valid position. You can calibrate it by
substituting the angular value according to how yours is setup.
(Confusing until you do it.)
5. I preserve the 4 channels results in the global UDT, this, as
this.total1, this.total2, this.total3 and this.total4.
6. The direction returned will be printed in the lower left corner.

I hope this works....

Attachments

Login to view attachments
jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 4th Mar 2007 04:07
[bump]...oops, I edited my post. Try the code at the bottom.
HowDo
22
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 4th Mar 2007 10:00
it works for one count then crashes with runtime error - 5107 not a memblock byte at line 2656.

before it ceashes you can see the pointer move to the correct postions then if falls over.

Dark Physics makes any hot drink go cold.
jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 4th Mar 2007 10:41
Ow, that hurt! I changed it to write a word, not a byte. It is on line 2802 in the iButton.dba file. I looked in the FullSourceDump to line it up with my tons of comments, which are not included in the line given in runtime errors like that, by the way. Here is an amended copy. SORRY.

Attachments

Login to view attachments
HowDo
22
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 4th Mar 2007 10:53
ee I all wet had go out and get the station so that I could maunly move the pointer, seem to be doing as wanted very sentived only a smalll movement and the numbers change.

Dark Physics makes any hot drink go cold.
jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 4th Mar 2007 11:00
No, that is very normal...should return only 1 - 16 as floats. Then you need to multiply that by 22.5 to get the bearing (direction). I left it that way for two reasons...one your station might not be facing so that north is 1, for example. Next, the thing might be upside down, in which case the rotation is anti-clockwise. Sorry that you got wet, but...you do live in England, after all

In related news, I have done a little sewing with your graphics...I nearly have it all hooked up...I think. Should be in the next hour, or so...maybe even sooner.
HowDo
22
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 4th Mar 2007 11:04 Edited at: 4th Mar 2007 11:17
Well I was not expecting you to be about at this time, so thank you for begin up late.

there's me dividing it by 720 on wonder.

edit

added here.winddirectionoffset to udts now finding value.

Dark Physics makes any hot drink go cold.
jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 4th Mar 2007 11:17 Edited at: 4th Mar 2007 11:30
Well, I do keep all sorts of hours. I was having a great time with banker's hours for two days. I did manage to peek at the eclipse. I caught the last half, more or less. It was very bright, and orangey. Not at all coppery. Still, it looked good.

Well, here is something you might like to try. I tried to start containing your variables in UDTs, and I have sort of patched it into the data stream, but it is meatball surgery. I might not even be doing it right, its been a long week!

Attachments

Login to view attachments
HowDo
22
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 4th Mar 2007 11:37
Ok slowly learning how to used UDTs so have added the *22.5 + winddircetionoffset to line 3704 in the code, now just have to work out if it going clock wise or anticolock wise, plus how much to offset it by.

Dark Physics makes any hot drink go cold.

Login to post a reply

Server time is: 2025-05-17 20:14:46
Your offset time is: 2025-05-17 20:14:46