Factory Reset, Powerup, and Automated Setup - GMU-ASRC/turbopi GitHub Wiki

How to factory reset a TurboPi

To re-flash the TurboPi, you'll need:

  • The correct factory TurboPi image for your model of TurboPi
    • There are two models of TurboPi. There's Pi 4 and Pi 5 models. If you don't know which one you have, look up images of the Pi 4b vs Pi 5.
    • You can find the system images on Hiwonder's Google Drive. There's a link to that on the Home page of this wiki.
  • Software to flash it
    • We recommend BalenaEtcher for most users on Windows, MacOS, and Ubuntu.
    • If you're on a different Linux distro, you may want to find another way to Write a bootable iso to USB (name of your distro here)
  • A microSD reader/writer
    • There are 2 fast USB A/USB C microSD writers available for use in the lab.
  • Access to the microSD card slot on the Pi

Once you've downloaded the system image .iso and have a way to flash it, here's the steps:

  1. Using a screwdriver, remove the four screws around the ultrasonic sensor housing.
  2. Using tweezers or your fingers, gently rock the SD card around until it comes out. Be careful not to snap or scratch the SD card!
  3. Plug the SD card into your computer
  4. Unzip the folder you downloaded. You should see an .iso file.
  5. Open BalenaEtcher (or flash via your favorite utility)
    1. Select the .iso file
    2. Select the drive you plugged in. Careful, whatever you select will have its contents ERASED!!!!
    3. Click Flash! and wait for it to finish writing and validating.
    4. BalenaEtcher automatically dismounts and ejects the drive.
  6. Remove the microSD card from the reader and put it back into the Pi.
    • The side with the gold contacts should face UP.
    • Be gentle, the microSD card does not require force to insert
    • Tweezers may help, but fingers give you more tactile feedback.
    • Once fully inserted, it'll still stick out a little bit.

Powering up the TurboPi

Here's how to turn on the TurboPi:

  1. Insert the two batteries into the battery holder on the bottom of the TurboPi.
    • Be sure to insert them in the correct orientation marked in the battery holder! + to + and - to -.
  2. Turn on the switch on the battery holder and turn on the switch under the metal shield on the top of the robot.
  3. The light on the ultrasonic sensor at the front of the robot should be blue.
  4. Once the TurboPi has booted up, it will let out a short beep, and the blue light will turn off.

You can now connect to the TurboPi via VNC or ssh.

Setting up the TurboPi with our software goodies

The factory TurboPi software setup has many downsides, such as requiring a direct WiFi connection (you may not have internet on your computer because it'll be connected to the TurboPi via WiFi).

We have extensively tweaked the software experience to better suit our needs. Here's the list of major changes:

Luckily for you, we now have an automated setup script that does these things for you.

  1. Download or clone this git repo.
    • We highly recommend git cloning via the ssh url so you can do (Step 4. Deploy) easier.
      1. Install Git
      2. Find your computer's/user's public ssh key
      3. Upload it to your github
      4. Ask one of us to add your github account to this repo (if you're not added, you won't be able to clone)
    • To clone this repo via ssh: git clone [email protected]:GMU-ASRC/turbopi.git
    • To clone this repo via https: https://github.com/GMU-ASRC/turbopi.git
    • To download this repo as a zip folder, or find those URLs again, go to this repo's github page and click the green Code button. Make sure to unzip the folder!
  2. In the folder you downloaded/cloned, copy the scripts/ folder to a USB drive.
  3. (optional): Rename the wpa.secret.EXAMPLE file to wpa.secret, and fill out the correct SSID and passphrase inside that file. If you don't do this, you'll be prompted for the router info in step 7.
  4. Plug the drive into a TurboPi.
  5. Connect via VNC or SSH
    • Make sure you leave this page open, as you may not have internet while connected to the Pi!
  6. Open a terminal in the scripts/ folder of the USB drive.
  7. Run bash provision.sh and follow the instructions.
  8. Wait for setup to finish. The Pi will reboot to finish changing language and hostname, and continue setup after rebooting.
    • If you did this correctly, you'll need to reconnect via Router mode.
    • You may see a terminal window after the Pi reboots. If not, the setup logs can be seen with sudo journalctl -u resume_turbopi_setup.service.

Once setup has finished, you'll need to calibrate the TurboPi's servos and color thresholds.
See: Configuring Camera and Servos

⚠️ **GitHub.com Fallback** ⚠️