Giter VIP home page Giter VIP logo

mudoku's Introduction

mudoku

A sudoku solver using LEGO and Matlab.

Class Structure

AbstractScanner

  • Methods
    • firstScan(): find grid size, position of cells that contain a number
    • scanCells(): scans individual cells that contain numbers
    • getCell(x,y): if cell @ x,y contains a number, a 2D greyscale matrix is returned
    • saveCells(fileName): save cells to file
    • loadCells(fileName: load cells from file
    • [x,y] = getNumCells(): returns the number of cells in x/y position

ImageRecognition

  • Methods
    • parseCell(img_matrix): takes a 2D greyscale matrix and returns the number it represents

Drawer

Hardware Abstraction Layer

Provides a wrapper around the low level hardware functions. Is the only class that accesses the RWTH Mindstorms toolbox directly.

  • Methods
    • HardwareAbstractionLayer(varargin): creates an instance and opens both NXTs that need to be connected via USB
    • toggleLamp1: toggles lamp 1
    • toggleLamp2: toggles lamp 2
    • value = getBrightness1: returns the value of light sensor 1
    • value = getBrightness2: returns the value of light sensor 2
    • value = getBrightness3: returns the value of light sensor 3
    • [a b c] = getBrightness: returns the values of all three light sensors
    • moveRight(steps): tells the hardware to move right
    • moveLeft(steps): tells the hardware to move left
    • moveRightW(steps): tells the hardware to move right and delays program execution untill operation is finished
    • moveLeftW(steps): tells the hardware to move left and delays program execution untill operation is finished
    • moveForwards(steps): tells the hardware to move forwards
    • moveBackwards(steps): tells the hardware to move backwards
    • moveForwardsW(steps): tells the hardware to move forewards and delays program execution untill operation is finished
    • moveBackwardsW(steps): tells the hardware to move backwards and delays program execution untill operation is finished
    • ans = reachedEnd: returns 0 if neither of the limit switches is activated, else returns 1
    • moveToLeftLimit: moves to the left until end is reached
    • moveToRightLimit: moves to the right until end is reached
    • calibrateSledge: calculates the max width steps which the sledge can move
    • [x y] = getPosition: gets the current position from the motors
    • moveToXY(x, y): moves to a specific location

mudoku's People

Contributors

ekiwi avatar maddimini avatar renneke avatar jh858821 avatar

Watchers

James Cloos 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.