Git Product home page Git Product logo

7688-fpv-rccar's Introduction

7688-fpv-rccar

FPV remote control radio car using LinkIt Smart 7688

For a quick understanding what does this project do, please check:

  1. Youtube video
  1. Google presentation

Quick references:

main

Software Setup Instruction

  1. as root, do npm install ws
  2. put fpvcarsrv.js to /root
  3. put index.html & arrow.png to /www/car/
  4. put init.cgi to /www/cgi-bin, and do chmod 755 /www/cgi-bin/init.cgi

Note

  1. init.cgi will start both mjpg-streamer and websocket server, make sure there is /root/fpvcarsrv.js, if you want to rename/change the path, remember to modify init.cgi as well
  2. mjpg-streamer will be listening port 8080 (which is hard-coded in init.cgi)
  • the default video settings will be “320x240, 15fps
  • they can be specified at runtime by “init.cgi?r=640x480&f=30
  1. websocket server will be listening port 8001, hard-coded in fpvcarsrv.js

How to Use/Start

  1. Wait for 7688 ready after powering on
  2. check the Wi-Fi LED, it should be always on during bootup
  3. If 7688 is in AP mode, the LED will turn off after ready. And after a device (laptop or mobile) connect to it, the LED will start to blink
  4. If 7688 is in Station mode, the LED will be blinking if it connect to an AP.
  5. Launch browser on your device and goes to "http://hostname/cgi-bin/init.cgi"
  6. If you want to specifiy camera resolution and fps, goes to "http://hostname/cgi-bin/init.cgi?r=640x480&f=30"
  7. After a while, it should display following
starting mjpeg streamer (320x240, 15)... done
starting node server ... done
  1. Click the /car hyperlink or goes to "http://hostname/car"

Sources Files

init.cgi

where

/www/cgi-bin

setup

chmod 755 init.cgi

note

init.cgi is written with Python, it is responsible for (re)start mjpg-streamer and websocket server if anything goes wrong.

fpvcarsrv.js

where

/root

setup

it require websocket package, please do “npm install ws” (remember to setup 7688 to station mode and connect to a AP with network access to do so)

note

  • fpvcarsrv.js is written with Node JS, it is responsible for starting a server allowing client to control the ESC/Servo.
  • It starts websocket server at port 8001
  • Only the first connection can control the vehicle, the other connection will be viewer.
  • ESC (Throttle) is connected to PWM0 (pin18) of 7688
  • Servo (Steering) is connected to PWM1 (pin19) of 7688
  • mraa package (already installed) is used to control the 2 PWM output

index.html & arrow.png

where

/www/car

note

  • Connect to http://hostname/car to reach index.html
    • If 7688 is at AP mode, make sure your device connect to it.
    • If 7688 is at station mode, make sure 7688 and your device is at the same network domain
  • Not all browser support mjpg playback, following case tested:
    • Safari on Macbook (OS 10.11): ok
    • Chrome on Macbook (OS 10.11): ok
    • Safari on iPhone6 (iOS 9.2): ok (not ok at iOS 9.1)
    • Chrome on iPhone6: not ok
  • This page will create a element with src = http://hostname:8080/
  • This page will also create websocket connection to http://hostname:8001/
    • It will wait for server ack, and know its role as controller or viewer.
    • In controller’s case, it will monitor touch moving or mouse dragging. and send correponding command to websocket server created in fpvcarsrv.js
    • In viewer’s case, it will do nothing

Hardware Setup Instruction

Original RC configuration

rc_original.png Transmitter sends signal to Receiver and control steering(Servo) and throttle(ESC)

Modififed 7688 configuration

rc_modified.png 7688 replace Receiver, receive control command from Wi-Fi device and control steering(Servo) and throttle(ESC), it also connect to a USB camera to provide FPV service.

Diagram

hw_diagram.png 7688 and Webcam are on the car shell, it connect to the car body via a 4-line wire (5V/Servo signal/ESC signal/GND). The 5V voltage regulator board on car body help to provide 7.4v->5v regulation.

5V voltage regulator board

board_detail1.png

7688 socket board

board_detail2.png

7688-fpv-rccar's People

Contributors

smallptsai avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.