stochri
05.01.2006, 21:06
Hier ein Beispielscript, mit dem man den ASURO aus SCILAB heraus fernsteuern kann:
function turn(degrees)
// ASURO turn
// v0.1 5.1.2006 stochri
digit_per_turn=68;
digit=abs(degrees/360*digit_per_turn);
realtimeinit(0.1);
realtime(0);
for k=1:digit,
realtime(k);
if degrees>0,
unix ./asuro_rechts;
else
unix ./asuro_links;
end
end
endfunction
// -------------------------------------------------------------------------
// This file ist made for scilab the free mathematical toolbox
//
// Copyright (C) 2006 stochri
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
// -------------------------------------------------------------------------
//
Damit das funktioniert, muss man vorher die beiden scripfiles asuro_links und asuro_rechts wie hier beschrieben
https://www.roboternetz.de/phpBB2/viewtopic.php?t=15726
erzeugen.
Gruss,
stochri
function turn(degrees)
// ASURO turn
// v0.1 5.1.2006 stochri
digit_per_turn=68;
digit=abs(degrees/360*digit_per_turn);
realtimeinit(0.1);
realtime(0);
for k=1:digit,
realtime(k);
if degrees>0,
unix ./asuro_rechts;
else
unix ./asuro_links;
end
end
endfunction
// -------------------------------------------------------------------------
// This file ist made for scilab the free mathematical toolbox
//
// Copyright (C) 2006 stochri
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
// -------------------------------------------------------------------------
//
Damit das funktioniert, muss man vorher die beiden scripfiles asuro_links und asuro_rechts wie hier beschrieben
https://www.roboternetz.de/phpBB2/viewtopic.php?t=15726
erzeugen.
Gruss,
stochri