Giter Club home page Giter Club logo

pixelbot's Introduction

pixelBot

This is being actively worked on. Not everything works yet, I wouldn't recommend going nuts on this for a week or so as I have some things that aren't working yet. I've turned off issues and am not looking for feature requests or anything until I'm done building what's necessary.

Making it

  • Print out the pieces besides the body here http://www.thingiverse.com/thing:291926
  • Print out the body http://www.thingiverse.com/thing:1589599 (Thanks again to Catlinman for his blender skills!)
  • TODO: How to make the LED head
  • Clone/download repo. Run npm install in the main directory and run bower install in /public
  • pixelbot.ino is to be ran on the Particle. You'll need to add the fastLED library.
  • Put Particle deviceID/access token information in pixelBotParticleTEMP.js, then remove TEMP from the name so it's pixelBotParticle.js
  • Put whatever the server URL ends up being in public/config.js
  • node server.js to run the server.

The API

One thing to keep in mind is x,y coordinate 0,0 and index 0 maps to the bottom left corner due to where it's a good spot to drill through the monitor head to put the wire going into the LED array. If you like to put holes in things via blender, hit me up, but for me a drill is much easier ;)

The Javascript API

server.js has the following API functions that it sends to particle. This is what a webpage should communicate with and should return good, valid JSON as well as handle particle errors, invalid data, etc.

  • GET getLEDArrDimensions returns an object {width: #, height: #}
  • GET getLEDPixels returns an array of objects representing each LED. The index of the array corresponds to the LED address. The objects contain the r, g, b value for that LED.
  • POST setPixel takes var pixX, pixY, pixR, pixG, pixB representing what x, y coordinate to turn what RGB value. Remember that 0,0 maps to the lower left hand corner of the array.

Exposed Particle Functions and Variables

It has several exposed functions and variables

  • POST setPixel takes x,y,red,blue,green and lights up that LED with that color
  • POST setAll takes red,blue,green and lights up all LEDs with that color
  • GET ledDims returns the height and width separated by a comma. I don't JSON this because it's two numbers.
  • GET ledInfo returns led rgb info by index. It's an array of arrays with 3 values, signifying the r, g, b value of the led by index. This should return the most condensed form that JSON.parse() can understand. This will break if you have too many LEDs - maximum string length allowed out is 622 bytes.

pixelbot's People

Contributors

gelicia avatar

Stargazers

 avatar  avatar  avatar

Watchers

 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.