File Access Block
The File Access block give the robot human-like capabilities. Consider the following:
When you are told something you have to remember for a long time, you write it down. By writing it down and storing it away it will be there for you to access whenever you need it even though it is not in your memory right now. The file access block allows the robot to do the same.
But robots can remember information with variables right? It is true they can, however, try making a program that makes the variable "test" and prints it's value at the beginning of the program. Then in the same program change the value and then end the program. When you end the program and run it again you will find it didn't remember the number you set at the end of the last run. So variables only remember information while the program runs and forgets it once the program ends.
File access allows you to store information in a file just like on a computer. Your computer doesn't forget or delete your files every time you turn it off or restart it. So when the robot uses file access the file is saved across all programs and does not get deleted at the end of a program.
Now we can learn how to make the robot make its own files. Start by grabbing a File Access block and placing it on the program line. ***TBC***
When you are told something you have to remember for a long time, you write it down. By writing it down and storing it away it will be there for you to access whenever you need it even though it is not in your memory right now. The file access block allows the robot to do the same.
But robots can remember information with variables right? It is true they can, however, try making a program that makes the variable "test" and prints it's value at the beginning of the program. Then in the same program change the value and then end the program. When you end the program and run it again you will find it didn't remember the number you set at the end of the last run. So variables only remember information while the program runs and forgets it once the program ends.
File access allows you to store information in a file just like on a computer. Your computer doesn't forget or delete your files every time you turn it off or restart it. So when the robot uses file access the file is saved across all programs and does not get deleted at the end of a program.
Now we can learn how to make the robot make its own files. Start by grabbing a File Access block and placing it on the program line. ***TBC***
Back to Advanced Blocks