GithubHelp home page GithubHelp logo

jkuav / rovercontroller Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jakkra/rovercontroller

0.0 0.0 0.0 36.7 MB

LoRa/WiFi remote controller for driving my rover

Home Page: https://github.com/jakkra/Mars-Rover

License: MIT License

C 98.66% Makefile 0.29% CMake 1.05%

rovercontroller's Introduction

Rover Controller

Controller for driving https://github.com/jakkra/Mars-Rover. Webpage for viewing telematics graphs on phone https://github.com/jakkra/Rover-Mission-Control.

How it works

Sets up an AP, the Rover will automatically connect if it's in range. The Rover is controlled by sending joystick and switch state over either LoRa or a websocket. If the Rover isn't connected to the AP, then data will be sent over LoRa instead. There is a switch to override this behaviour and always send data over LoRa even if the Rover is connected to the AP.

When the Rover is connected to the local AP it will send telematics data over the websocket, or over LoRa if the Rover is outside of WiFi range. The data is then in turn passed on to a phone if one is connected. When the Rover is close by telematics will arrive about 10/s over WiFi, if outide of range then telematics are transported over LoRa. As LoRa modules cannot do true duplex data transfer we need to switch between sending and receiving, meaning telematics sent by the rover while we are sending joystick data will be lost. From experimentation LoRa telematics arrive about every 500ms.

A phone can connect to the Controller AP to view the telematics from the Rover. Phone opens a websocket connection to the Controller and receives the telematic data the Rover sends. Telematics website can be found here: https://github.com/jakkra/Rover-Mission-Control.

CAD model

Full Fusion 360 project is found in CAD folder.

Hardware

  • ESP32 + LoRa module
  • 2x Joysticks
  • 1x ADS1115 (ESP32 does not have enough ADCs for all the pots)
  • A few on-off-on switches
  • 2 potentiometers
  • 2 colored LEDs

Config

For pinmapping see: https://github.com/jakkra/RoverController/blob/master/main/controller_input.c#L46

Images

Compiling

Follow instruction on https://github.com/espressif/esp-idf to set up the esp-idf, then just run idf.py build or use the VSCode extension.

Building the controller

TBD upon request.

esp-idf patches

Run git apply esp-idf-patch/no_delay.patch in your esp-idf folder. This decreases lag for TCP as it will flush the buffers after every write instead of LWIP buffering TCP data to send it in chunks.

rovercontroller's People

Contributors

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