Giter VIP home page Giter VIP logo

leguno-remote's Introduction

Bluetooth Remote Control for Lego Technic Hub

This is an arduino sketch to control the assembled LEGO Technic vehicles via the Bluetooth LE interface and IMU sensor.

Requirements

Installation

Just upload the sketch with your preferred IDE to the board. If you want to have debug information you might uncomment the #define DEBUG line at the beginning of the sketch. If you do so and upload it to the remote it will wait after powered on until a serial terminal is connected.

Current supported vehicles

  • Lego Technic 4x4 Offroader 42099

Initialization Sequence

ATTENTION: After you powered on the remote and pushed the green button on the Technic HUB the vehicle will automatically steer to the left and right to measure the steering range and center position.

Power on your remote (Arduino Board). The easiest way might be to supply it via USB. Now it will scan for BLE Devices with the name Technic Hub. If the central found one it will connect to it immediately and the blue LED on the board will be switched on.
The remote will send some setup commands to the hub so the two motors on port A and B get mapped to one virtual port. For the last step the steering range and the central position for the steering will be initialized.

Steering the vehicle

Rotating the board around the Y-axes will increase/decrease speed. So you can move the vehicle forward and backward. Like in case rotating around the X-axes will allow you to turn left and right.
The picture below shows the Arduino NANO 33 BLE Sense and its orientation to control a vehicle.

Useful Links

  • LEGO BLE Protocol
  • If you use Microsoft Edge as your preferred browser use edge://bluetooth-internals/#adapter in case of Google Chrome chrome://bluetooth-internals/#adapter to investigate your bluetooth peripheral

leguno-remote's People

Contributors

hoharald avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

leguno-remote's Issues

Help to adapt your code to use physical joystick

I successfully used your library with the 4x4 model. Thank you it works great !

I now try to use a old USB remote with your project.

Image

I am able to monitor the input but I am not sure where to modify your code to take them into account. Would you be so kind to point me the good direction @hoharald ?

Thank you so much in adavance !
Martin

connecting to multiple hubs

thanks for sharing this code. I found it very helpful and inspiring while learning how the powered up hub works.
Can this code be easily used to connect simultaneously to more hubs somehow ? I would like to build a car with more motors and sensors, and 2 hubs.

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.