Skip to content

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

License

Notifications You must be signed in to change notification settings

cherezov/curiosity_ev3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published