Since weather data has been made available. Perhaps a wind barb display technique will spark some programming ideas. The attached zip file contains KPL source produced with standard Phrogram.
Another version of this same function using an animated sprite. The attached zip file windsprite.zip contains : "anibarbs.gif" a set of wind barbs.and "windsprite.kpl" . It is a modified "Facing2D.kpl" from: 4 ) Class Library Learning Examples > Sprites
OOPS ( 4 - 16 - 07 ): in trying to add "windsprite.zip" to this message, I accidently removed the earlier version "windspin.zip" . The version with animated sprite is much nicer.
OOPS follow up ( 4 - 19 - 2007 ): restored windspin.kpl to the zip file. Enhanced windsprite.kpl
OOPS follow up ( 8 - 25 - 2007 ): strange behavior depending on location of source when processed by Phrogram ?
I've had an odd experience with some functionality with respect to sprites : The phrogram "windsprite.kpl"which is modeled after the "Facing2D.kpl" phrogram behaves differently when launched from a folderwithin a "My Phrogram Files" subfolder and when launched from a subfolder somewhere else. It alsocan be confirmed that a created install behaves differently when the subfolder of the original code is outside "My Phrogram Files". The attached setup files demonstrate this issue. O_setup.exe was madeoutside "My Phrogram Files", I_setup.exe was made within a "My Phrogram Files" subfolder. The attached "jpg" files O_windsprite.jpg and I_windsprite.jpg ...
It seems that the sprite feature "SetRotationOffset" is behaving differently depending on where the KPLsource is located. Helpful advice would be appreciated. Note that with the mouse in the same position, the wind barbs are perpendicular ...
Nice program! Great idea! Now if I could just figure out how to get data from my anemometer & weather vane....
(I love it when someone takes pieces from my programs & uses them in new and improved ways; that's why I write them.)
This is so clever...spinning the mouse over the selected barb in the windsprite example and it goes round really fast!
That is a very clever piece of code!
It is possible to write a version of wind barb program in the Scratch graphic language with the USB hardware input board. I had hoped that there might be some way to link Phrogram to Scratch: perhaps the USB interface could be fashioned into a library module ? perhaps file output from Scratch would be available for Phrogram. Unfortunately, I don't know that much about SQUEAK and the USB interface. I also could not find any file output functions in the Scratch language ? This hardware board only costs 25 bucks. Unfortunately, the features don’t work in the java implementation for testing ON-LINE. http://scratch.mit.edu/projects/jamesjoseph/44028 You need to install the Scratch program on your machine. Since the folks at http://scratch.mit.edu initiated the LEGO mindstorm project: perhaps this group would be more open to an interface with Phrogram than the folks at LEGO. My reading of forums on this issue suggested that LEGO has a relationship with LABVIEW that perhaps the folks at http://scratch.mit.edu/scratchboard/ do not have. Hopefully, they would be interested in some form of collaboration.