I've been messing around with some basic robots and autorun.lua.
My aim was to be able to plug a floppy disk into a robot, start the robot up and have the robot copy the program that would be stored on the floppy disk.
Once the file was on the internal drive, the robot would run it.
The idea was that I'd be able to set the robot's functionality by hotswapping floppy disks.
Trouble is, the robot autorun hasn't really been behaving.
When I run the program in the shell, it works every time. However, when the robot starts up it works... sometimes.
The program I told it to run just tells it to turn left - but it only does that every second boot or so (not in a regular pattern)
I've been trying to figure out why this is happening for a while now and I still don't understand it!
I sent the program to sleep for a few seconds to see what goes on during initialisation and found this
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Hi there,
I've been messing around with some basic robots and autorun.lua.
My aim was to be able to plug a floppy disk into a robot, start the robot up and have the robot copy the program that would be stored on the floppy disk.
Once the file was on the internal drive, the robot would run it.
The idea was that I'd be able to set the robot's functionality by hotswapping floppy disks.
Trouble is, the robot autorun hasn't really been behaving.
When I run the program in the shell, it works every time. However, when the robot starts up it works... sometimes.
The program I told it to run just tells it to turn left - but it only does that every second boot or so (not in a regular pattern)
I've been trying to figure out why this is happening for a while now and I still don't understand it!
I sent the program to sleep for a few seconds to see what goes on during initialisation and found this
https://imgur.com/a/WA7SK
SpoooOOoky!
My best guess at the moment for why it's acting up is the usage of os.execute()
Although it still isn't particularly consistent with other parts of the program
https://pastebin.com/9DeP5fng
Here's some source code so you can have a clue what I'm on about!
Oh and the robot is a collection of tier one parts with a floppy drive.
Link to post
Share on other sites