Code Monkey home page Code Monkey logo

gr-remotecar's Introduction

gr-remotecar

I wrote a GNURadio module to generate control signal for toy remote controlled car, and a Qt(PySide) GUI to listen keyboard press.

detail and source code: http://github.com/scateu/gr-remotecar

blog: http://hackrf.net

Video DEMO

INSTALL

mkdir build
cd build
cmake ..
make
sudo make install
sudo ldconfig

TRY

refer to examples/

examples/WheelPulse/Wheel.py is a simple PySide based controller which you can control your toy car with keyboard direction keys. And it is for RemoteCarIIBaseBand

Just replay it.

on examples/tx.sh and examples/rx.sh , I demo how to capture the car's remote signal and just replay it. And it turns out to make the car run.

cd examples
./rx.sh car.iq
./tx.sh car.iq

and it means:

    hackrf_transfer -t car.iq -f 27000000 -s 8000000 -a 1 -l 30 -i 30 -x 40 

27000000 is for 27MHz, you may find the frequency sign on you car's remote.

Principle

We support two kind of remote car control :

RemoteCarBaseBand

                -->|TIME3  |<--   TIME4
      --------+    +-------+    +-------+    +--------- ... -------+    +---.....
              |    |       |    |       |    |                     |    |
              |    |       |    |       |    |                     |    |
              |    |       |    |       |    |                     |    |
              |    |       |    |       |    |                     |    |
              +----+       +----+       +----+                     +----+
              TIME0        TIME0        TIME0
           -->|                              TIME2                 |<---


    TIME0 = 520us
    TIME3 = 300us to 1.3ms
    TIME4 = 300us to 1.3ms
    TIME2 = 20ms

TIME3 and TIME4 control car's accelerator and direction.

RemoteCarIIBaseBand

+----------+     +----------+     +----------+     +----------+     +-----+     +-----+                        
|          |     |          |     |          |     |          |     |     |     |     |                 
|          |     |          |     |          |     |          |     |     |     |     |                 
|          |     |          |     |          |     |          |     |     |     |     |                 
|          |     |          |     |          |     |          |     |     |     |     |                 
|          |     |          |     |          |     |          |     |     |     |     |                 
|          |     |          |     |          |     |          |     |     |     |     |                 
+          +-----+          +-----+          +-----+          +-----+     +-----+     +-...                     

|<-  3t  ->|  t  |<-  3t  ->|  t  |<-  3t  ->|  t  |<-  3t  ->|  t  |  t  |  t  |  t  |    

and we can simply capture it with HackRF using a AM demode gnuradio-companion workflow.

it is on examples/analysis.grc

Left: n=58
Right: n=64
Forward: n=10
Fast Forward: n=22
Backward: n=40
Left Forward: n=28
Right Forward: n=34
Left Backward: n=46
Right Backward: n=52

t = 0.55 ms

and you can try it with examples/WheelPulse/Wheel.py

gr-remotecar's People

Contributors

scateu 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.