Hallo everybody! Now I have written an improved file called "port.exe" in turbo-pascal, which works with both commands "out" and "in" in ucblogo. You install the files in the following way: -at first you copy the attached "port.exe"-file into the directory "ucblogo"; -then you copy both logo-files "out" and "in" (without postfix .lgo) into the subdirectory "logolib" of ucblogo. Here the logo-files "out" and "in": ------------------------------------------- to out :adresse :pin shell (list "port "-w :adresse :pin) end bury "out ------------------------------------------- to in :adresse shell (list "port "-r :adresse) openread "result.tmp setread "result.tmp make "result first readlist setread [] close "result.tmp output :result end bury "in ------------------------------------------- Now you can start the ucblogo and you write for example: out 888 3 (LED 1 and 2 switch on) In the second step you can write: in 888 You will get the value 3 of the printer port (lpt), which can operate with another function in mathematics (function value). Best regards Stephan
Global SchoolNet Foundation -
Linking Kids Around the World!
Copyright GSN - All Rights Reserved
- Comments
& Questions
Visit GSN's
Global
Schoolhouse for more exciting learning resources!
Search our Site
-
Home