GithubHelp home page GithubHelp logo

aminazirani / drawing-robot-with-lego-mindstorms-ev3dev Goto Github PK

View Code? Open in Web Editor NEW
1.0 4.0 0.0 18.42 MB

Drawing Robot using LEGO Mindstorms EV3

License: Apache License 2.0

C 69.05% C++ 30.95%
lego-mindstorms-ev3 ev3dev drawing-robot

drawing-robot-with-lego-mindstorms-ev3dev's Introduction

Drawing Robot using LEGO Mindstorms EV3

Initiation & Goal

header

The development of this software was initiated and encouraged by the class Hardware-Praktikum (Internship) at the Leibniz Universität Hannover. The goal of this project was to assemble a robot using the normal and the extended packs of the LEGO Mindstorms EV3 with the aim to draw a caricature of a given person on a piece of paper. This includes moving on the paper and lifting/lowering the pen when needed.

Software

For this purpose, the Linux-based operating system ev3dev was used. From the ev3dev website:

ev3dev is a Debian Linux-based operating system that runs on several LEGO® MINDSTORMS compatible platforms including the LEGO® MINDSTORMS EV3 and Raspberry Pi-powered BrickPi.

Since the main programming language which is used for this repo is C, the needed libraries need to be installed on the device. In order to to do so please follow the instructions on ev3dev-c.

Hardware

The needed sensors and motors are:

  1. two motors for the wheels
  2. one motor to lift and lower the pen
  3. a Gyroscope sensor

To create a perfect caricature, the pen needs to be placed exactly between the two axes of the tires. Our approach is as follows:

Pen

When the handler is moved down, the pen is lifted from the paper and when the handler moves up, the pen lands on the paper again.

Placing the Robot

The robots needs to be place on the paper so that it has the papers edges on its left and in front of it. This point would be (0,0) for the coordinates. After placing the robot on the paper, the gyroscope needs to be detached and connected again in order for it to be reseted and calibrated to 0.

Executing the Code on the Robot

In order to clone this repository to your ev3dev brick, you will have to install the needed libraries of ev3dev-c first. After that, copy the folder "code" to your ev3dev brick. Navigate to the folder and compile "main.c" using the following command:

gcc main.c -lev3dev-c -lm -o main

After compiling has finished, execute the code using ./main.

Installed Caricatures

The default caricature which is available under main.c is a caricature of "Homer Simpson":

Homer

You can also choose between "Sonic", "Bugs bunny" and "Batman".

Homer

In order to change the caricature, open main.c and comment out everything which has anything to do with homer. Uncomment the parts with your desired comic figure and compile/run again. You can also add your own caricature coordinates by preparing an array of coordinates which have no negative values and are integers.

drawing-robot-with-lego-mindstorms-ev3dev's People

Contributors

aminazirani avatar basti38 avatar danielritter96 avatar hardwareget avatar

Stargazers

 avatar

Watchers

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