Code for a Lego Mindstorms Dalek, from Doctor Who, using the Mindstorms EV3 brick running ev3dev.
With a Logitech C270 webcam:
Taking a selfie in the mirror:
-
Install ev3dev Stretch using these instructions, including the steps to set up SSH and update apt.
-
The following commands use a local copy of the SD card for the rest of the installation; this is much faster than running on the EV3:
a. Plug the SD card into the computer, and find its device name, typically
/dev/sda,/dev/sdb, etc. Assuming/dev/sda, run:sudo umount /dev/sda1 sudo umount /dev/sda2 sudo dd bs=4M if=/dev/sda of=dalek.img sudo chown "$(id -u):$(id -g)" dalek.imgb. Remove the SD card.
c. Ensure qemu is installed; assuming Ubuntu 24.04, run:
sudo apt-get install qemu-user-static
d. Chroot into the image:
mkdir dalek sudo losetup -P /dev/loop0 dalek.img sudo mount /dev/loop0p2 dalek sudo systemd-nspawn -D dalek --resolv-conf=bind-host --user=1000
e. Inside the image, run:
git clone https://github.com/calliecameron/lego-mindstorms-dalek ./lego-mindstorms-dalek/utils/setup_ev3.sh ./lego-mindstorms-dalek/utils/install_dependencies.sh exitf. Unmount the image:
sudo umount dalek sudo losetup -d /dev/loop0
g. Write the image back to the SD card using the same tool used to install ev3dev.
Select lego-mindstorms-dalek/run.sh from the brick's file browser (or you can run it through SSH).
- Make sure the Dalek and the computer are on the same WiFi network.
- Find the Dalek's IP address (displayed on the brick), and in your browser go to port 12345. E.g. if the Dalek is 192.168.0.2, the address you want is
http://192.168.0.2:12345.
- Connect the controller to the brick via bluetooth.
- Overlay image from http://chriscastielredy.deviantart.com/art/Doctor-Who-Dalek-Vision-515731932
- Dalek icon from http://www.veryicon.com/icons/movie--tv/doctor-who/dalek.html