Skip to content

skamo3/SEA-ME-Project-1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

SEA:ME Pi Racer

Table of Contents


Assemble Pi Racer

Important Point

  1. When connect motor & servo, attention to the connection
  2. Connect right direction the Camera

Write Image on Raspberry Pi

Install Raspberry Pi imager for set up Raspberry Pi

  • Click this link
    image

Write downloaded Image on SD card

image

  • Operating System -> Downloaded image
  • SD Card -> Your own SD card for Raspberry Pi

Enable SSH & Setting WIFI

image

  • Check Enable SSH
  • Check Set username and password
    • Username is server's name
    • Password is server's password
    • Remember this. It needs when connect Raspberry Pi server & PC

image

  • Check Configure wireless LAN

    • Enter the Wi-Fi or LAN information you are using on the PC you are connecting to
  • Setting done. Write the Image

Enable SSH

  • Write finish and Move to /boot directory
  • Enter the command touch ssh or touch /Volume/boot/ssh
    • Second one only work in Linux or Mac

Find & Connect Raspberry Pi

1st. Use monitor

  1. Connect monitor with Raspberry Pi
  2. Command ifconfig & check IP_ADDRESS
  3. Command ssh -Y {SERVER_NAME}@{IP_ADDRESS}

2nd. Use nmap

  1. nmap -sn {IP_ADDRESS}.0/24
    • ex) nmap -sn 192.168.2.0/24 -> Change last number to 0 or *
  2. Find Raspberry Pi's IP_ADDRESS
  3. Command ssh -Y {SERVER_NAME}@{IP_ADDRESS}

If there are many devices connected to the router, check the Raspberry Pie by turning it off and on

3rd. Make a wild guess

  • Raspberry Pie IP is caught similar to a PC

But I don't recommend it. It's not like a programmer.

Install & Set up Environment


Create donkeycar from template

  • Create a set of files to control your Donkey with this command
    • donkey createcar --path ~/mycar
    • You can also change your path something else instead of "mycar"

Configure I2C PCA9685

  • It's only for Raspberry Pi

  • sudo apt-get install -y i2c-tools -> install i2c-tools

  • sudo i2cdetect -y 1 -> check your car

    image
    • If you can't see 40
      1. On Pi, ensure I2C is enable in menu of sudo raspi-config
        • It suggest reboot
      2. Check your hardwear
        • Maybe your cable or Something wrong

Control with Web Controller & Gamepad

  • In terminal, follow commands
    pi@raspberrypi:~$ source ~/env/bin/activate
    (env) pi@raspberrypi:~$ cd mycar/
    (env) pi@raspberrypi:~/mycar$ python manage.py drive
    
  • Open Chrome in host pc. Go to http://{RASPBERRY_PI_IP_ADDRESS}:8887
  • Reference Link
  • Connect the USB adapter of Gamepad to Raspberry Pi
  • In terminal, follow commands
    pi@raspberrypi:~$ source ~/env/bin/activate
    (env) pi@raspberrypi:~$ cd mycar/
    (env) pi@raspberrypi:~/mycar$ python manage.py drive --js
    

Way to use Gamepad

  1. Use --js option
    • Run donkeycar with this command
      python manage.py drive --js
  2. Modify myconfig.py file
    • Find USE_JOYSTICK_AS_DEFAULT
    • Modify False to True
      USE_JOYSTICK_AS_DEFAULT = True

Display OLED pannel

Enable display in myconfig.py

  • Find line USE_SSD1306_128_32 removing #
  • Find line SSD1306_RESOLUTION removing #
  • example
    image

Tips

When you need to re-install Raspberry Pi

  • It should be occur this message Image
  • follow this code to reset ssh-key
    • ssh-keygen -R {IP_ADDRESS}
    • IP_ADDRESS => Raspberry Pi's IP address

Errors

  • Gamepad work different way

image

  • 7 & 8 is changed
  • Left and Right -> Left is forward and Right is backward
  • Front and Rear -> Front is right and Read is Left

About

SEA:ME Project 1 repository

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published