Giter Site home page Giter Site logo

ulyssesdotcodes / l3d-spark Goto Github PK

View Code? Open in Web Editor NEW

This project forked from enjrolas/l3d-spark

0.0 0.0 0.0 162 KB

L3D Cube library for Spark.

License: GNU Lesser General Public License v3.0

C++ 74.09% C 2.67% HTML 15.43% JavaScript 6.00% Makefile 1.82%

l3d-spark's Introduction

Spark L3D Cube Library

About

This is the official library for use with the Spark Core in the L3D Cube.

It provides 3D drawing functions for writing visual effects and utility functions for working with color. The library also takes care of communication with the LED strips making up the cube.

The API can be found in L3D.h. Further documentation can be found on the L3D Cube website.

Example Usage

Cube cube = Cube(); // 8x8x8 cube with max brightness of 50
cube.begin(); // initialize the cube

cube.background(Color(0, 0, 0)); // clear the cube
cube.sphere(4, 4, 4, 3, Color(255, 0, 0)); // draw a red sphere in the center
cube.show(); // update the LEDs to make the changes visible

Building Locally

To compile a firmware binary using a local copy of the library:

  1. Follow the instructions for compiling the Spark firmware. Make sure you can successfuly compile the firmware before continuing.
  2. Edit the FIRMWARE_DIR variable in the l3d-cube makefile to the path of the spark firmware repository on your machine.
  3. Choose an example to compile or put your own code in firmware/examples.
  4. Run make bin/<name of example>.bin to generate firmware for that example in the bin/ directory. For example, to compile examples/bit-of-everything.cpp run make bin/bit-of-everything.bin.
  5. Flash the firmware using spark flash (the Spark CLI tool) or dfu-util.

l3d-spark's People

Contributors

enjrolas avatar lookingglassfactory avatar ulyssesdotcodes 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.