Pull program from cbc

2 replies [Last post]
carz181
Title: NooBot
Joined: 07/06/2010
Posts:
BotPoints: 3
User offline. Last seen 12 years 6 weeks ago.

So my teammate lost all of our programs. Is it possable to pull the saved program off of the cbc to a flashdrive?

PiPeep
PiPeep's picture
Title: RocketBot
Joined: 07/19/2009
Posts:
BotPoints: 170
User offline. Last seen 8 years 23 weeks ago.

Yes.
There are many ways to do this.

Probably the easiest way is to modify a flash drive download script (here's one), and run it off of a flash drive.

Here's something to try, although I haven't tested it:

int main() {
system("mkdir /mnt/user/tmpusb");
system("mount /dev/sdb1 /mnt/user/tmpusb -t vfat");
system("mkdir /mnt/user/tmpusb/restored_code")
system("cp -R /mnt/user/code/ /mnt/user/tmpusb/restored_code/");
system("umount /dev/sdb1");
printf("[RESTORE] Remove Drive. UR DONE!");
}

PiPeep
PiPeep's picture
Title: RocketBot
Joined: 07/19/2009
Posts:
BotPoints: 170
User offline. Last seen 8 years 23 weeks ago.

Any luck?