GithubHelp home page GithubHelp logo

cherezov / curiosity_ev3 Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 5.57 MB

Curiosity Mars LegoEV3 Rover wirelessly controlled rover powered by OpenWRT and Arduino boards

License: MIT License

Python 86.74% Shell 6.67% C++ 6.59%
ev3dev laptop joystick robot uart wireless-control lego-mindstorms ev3-brick openwrt arduino

curiosity_ev3's Introduction

Curiosity Mars LegoEV3 Rover

This project was made for my son, who asked me to make possible wireless control his Lego Mindstorm EV3 robot from PC. Below is the log of what was done, what is needed to be done and several notes and instructions.

General idea

legowrt idea

Requirements

  • Rover shall has a camera eye and image shall be visible on laptop
  • Rover shall be controlled via joystick connected to a laptop
  • Rover shall be controlled via laptop keyboard
  • Notebook and rover shall communicate wirelessly (e.g via wifi)

Hardware

Plan and progress and thoughts

  • Connect Lego EV3 Brick to wifi network Note: this requires WiFi dongle and will occupy single USB port
  • Connect MR3020 board to EV3 Brick with USB reverse tethering
  • Setup port forwarding from MR3020 to EV3 Brick
  • Run python listening server on EV3 Brick and teset connection from laptop
  • Make same test with WebCamera and EV3 Brick connected to MR3020 board via USB hab
  • Connect joystick to laptop
  • Find out a way to code joystick: pygame is quite good!
  • Develop python3 listenening server for EV3 Brick
  • Code client side application
  • Add auto configuration usb0 interface on MR3020 board configure DHCP?
  • Run server app as daemon at runtime
  • Inernet access for MR3020 brick and/or auto update listening server

Installation

Configuration notes

USB reverse tethering

This simply requires additional package to install on MR3020 board

> opkg update
> opkg install kmod-usb-net-cdc-ether
> reboot

More info about OpenWRT usb reverse tethering

EV3 brick part is described here

Wires

USB Hub -> 3020 USB port
Ev3 brick mini USB -> USB hub
UVC camera -> USB hub
3020 mini USB -> external power bank

Add ssh publick keys access

to /etc/dropbear/authorized_keys

Port forwarding from MR3020 to EV3

Port forwarding is described in /etc/config/rinetd

> ifconfig usb0 169.254.233.100

Restart rinetd

> /etc/init.d/rinetd restart

Test connection:

pass:maker
link: http://www.ev3dev.org/docs/tutorials/connecting-to-ev3dev-with-ssh/

Ev3 root password

> sudo passwd

pass: maker

Forward to UART

3020 is listening on TCP port 2000 and forwards data to UART
Following line will redirect command to UART using CLI over the network

sudo echo 'any command' | nc <3020 ip address> 2000

Forward to ev3dev

ev3dev is listening on port 8080
3020 is listening on port 88 and redirects to ev3dev:8080

sudo echo 'any command' | nc <3020 ip address> 88

Auto start ev3dev serv

Add to /etc/rc.local

python3.4 /usr/local/bin/ev3server.daemon.py start

curiosity_ev3's People

Contributors

cherezov avatar

Watchers

 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.