Skip to content
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


This is a project using RPI(model 3B, I think other RPIs should work, too), GPS(usb to serialport with NMEA), G-sensor(GY-91, contains MPU9255, MPU9250 should work, too) to detect non-smooth road. PiCollector image

Use this in your car, scooter, even with your bike.

Add auto-install script

  1. Download
  2. Install image
  3. copy ./scripts/ to /boot/
  4. modify WPA_USER and WPA_PASS for wifi connection
  5. login to pi, default username/password is pi/raspberry
  6. exec with
sudo /boot/

P.S. remember to change CrLf to Lf while you are using windows 7. reboot to take effect

GPS G-STAR IV (USB to UART GPS receiver)

  1. connect G-STAR IV to RPI usb port
  2. connect to /dev/ttyUSB0

GY-91 module

  1. connect RPI PINOUT to GY-91
  • 1(3V3) - 3V3
  • 3(I2C1 SDA) - SDA
  • 5(I2C1 SCL) - SCL
  • 9(GND) - GND

RTC DS3231 module

  1. add /boot/config.txt
  • dtoverlay=i2c-gpio,i2c_gpio_sda=10,i2c_gpio_scl=9
  1. connect ds3231 module (+) -> (-) to
  • PINOUT 17(3V3)-19(GPIO10)-21(GPIO9)-23(GPIO11)-25(GND)
  1. add /etc/modules
  • i2c-dev
  • rtc-ds1307
  1. add or uncomment line in /boot/config.txt
  • dtparam=i2c_arm=on
  1. add rc.local
  • echo ds1307 0x68 > /sys/class/i2c-adapter/i2c-3/new_device
  • hwclock -s

Wifi setting notes:

  1. scan wifi BSSID
  • sudo iwlist wlan0 scan
  1. add WPA auth into system
  • wpa_passphrase "BSSID" "PASSWD" | sed -e '/#.*$/d' | sudo tee -a /etc/wpa_supplicant/wpa_supplicant.conf > /dev/null
  1. Auto reconnect to wifi on a raspberry pi

# The IP for the server you wish to ping ( is a public Google DNS server)

# Only send two pings, sending output to /dev/null
ping -c2 ${SERVER} > /dev/null

# If the return code from ping ($?) is not 0 (meaning there was an error)
if [ $? != 0 ]
    # Restart the wireless interface
    ifdown --force wlan0
    ifup wlan0
  • add /etc/crontab for every 2 minutes check
*/2 *   * * *   root    /usr/local/bin/

Before you run

  1. Make sure you have "sudo" privilege
  2. run "./scripts/"
  3. run "sudo ./scripts/"


A project to detect non-smooth road using RPI




No releases published


No packages published