Page 363 - Hacking Roomba
P. 363
344 Part III — More Complex Interfacing
Adding a Flash Drive
It would be nice to be able to save the images recorded by the Roomba. The router’s flash
memory shouldn’t be used because of its limited lifespan and small space. The router’s RAM is
a little bigger but disappears when the power is removed. You could copy the images to another
network device, but that requires the other device to be online constantly. A USB flash drive
seems perfect. It is made for a lot of use and has huge amounts of space.
Figure 15-9 shows a typical USB thumb drive. You can get a 1 GB thumb drive for under $30
from several electronics retailers. Each JPEG image from the webcam takes up approximately
16 KB. On a 1 GB drive, you could store over 60,000 images.
FIGURE 15-9: Typical USB thumb drive, red to match this Roomba
Installing Drivers
Installing the storage drivers in OpenWrt is standard and nothing tricky. The kmod-usb-
storage package contains several drivers that work in conjunction. Instead of trying to load
them all manually, add them to /etc/modules and just reboot the router. It ends up being
faster.
root@OpenWrt:~# ipkg install kmod-usb-storage
root@OpenWrt:~# ipkg install kmod-vfat
root@OpenWrt:~# echo “scsi_mod” >> /etc/modules
root@OpenWrt:~# echo “sd_mod” >> /etc/modules
root@OpenWrt:~# echo “sg” >> /etc/modules