[Dprglist] LFS Users Guide, Reference, Simulator imposed maximums you can use for upcomming contest,
deltagraph at aol.com
deltagraph at aol.com
Sat Nov 14 17:58:04 PST 2020
Hello to all with interest in LFS (Line Follower Simulator),
I will not be making any changes posted to github repository until after the upcoming contest. 1.6.4 is the final.
Note on the github. The readme probably details this, but make sure you get a copy of
https://github.com/ron-grant/LFS/blob/master/LFS%20Users%20Guide%201.6.pdf
Also, when you download processing library
https://github.com/ron-grant/LFS/blob/master/distribution/lineFollowerSim-18/download/lineFollowerSim-18.zip
an copy to your sketchbook library folder, browse to references subfolder and create a shortcut to index.html which is LFSreference manual detailing classes / methods used by LFS.
---------------------------------------------A question came up about simulator maximums. They appear on help screens, but here they are, if you used maximums in your code(Which may or may not be desirable).
lfs.setAccRate(64); // acceleration rate (inches/sec^2)
lfs.setDecelRate(64); // deceleration rate (inches/sec^2)
lfs.setTurnAcc(720); // turn acceleration and deceleration rate (degrees/sec^2)
lfs.setMaxSpeed(36); // inform lfs of your max speed *
lfs.setMaxTurnRate(720); // inform lfs of your max turn rate (degrees/sec)
----------------------------------------------
Jian asked a question about creating an array of line sensors in LFS.
I think he had it worked out, but did get caught with automatic naming method crashing on array being used.Solution is to comment out that method which automatically provides sensor names when mouse hovers over them in robot/sensor views. In this example I manually named the array elements so the hover feature works (for these sensors).
Example of creating array of sensors
LineSensor[] sensors = new LineSensor[3]; // declaration outside userInit method
in userInit
for (int i=0; i<3; i++)
{ sensors[i] = lfs.createLineSensor(i+1, 0, 10,10, 32); // create 3 line sensors 1" apart sensors[i].name = String.format("sensors[%d]",i);
}
// Comment out automatic sensor naming
// nameSensorsUsingVariableNames(); // look up sensor names and assign them to sensor name field (lib 1.3)
Thanks to all with interest in LFS.
Please feel free to post questions. I know that the rules are being finalized.
I will try to post some helpful short videos to youtube in the coming week..
Ron Grant
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.dprg.org/pipermail/dprglist-dprg.org/attachments/20201115/e6ce6e42/attachment.html>
More information about the DPRGlist
mailing list