Giter VIP home page Giter VIP logo

workspace-rob's Introduction

com-chilipeppr-workspace-rob

A ChiliPeppr Workspace rob.

alt text

ChiliPeppr Workspace / rob

All ChiliPeppr workspaces/widgets/elements are defined using cpdefine() which is a method that mimics require.js. Each defined object must have a unique ID so it does not conflict with other ChiliPeppr objects.

Item Value
ID com-chilipeppr-workspace-rob
Name Workspace / rob
Description A ChiliPeppr Workspace rob.
chilipeppr.load() URL http://raw.githubusercontent.com/https://master/auto-generated-workspace.html
Edit URL http://ide.c9.io/qarth/workspace-rob
Github URL http://github.com/https:/
Test URL https://preview.c9users.io/qarth/workspace-rob/workspace.html

Example Code for chilipeppr.load() Statement

You can use the code below as a starting point for instantiating this workspace from ChiliPeppr's Edit Boot Script dialog box. The key is that you need to load your workspace inlined into the standard #pnlWorkspace div so the DOM can parse your HTML, CSS, and Javascript. Then you use cprequire() to find your workspace's Javascript and get back the instance of it to init() it.

// This code should be pasted into the ChiliPeppr Edit Boot Javascript dialog box
// located in the upper right corner of any chilipeppr.com page.
// The ChiliPeppr environment has a standard div called #pnlWorkspace that
// this workspace should be loaded into.
chilipeppr.load(
  "#pnlWorkspace",
  "http://raw.githubusercontent.com/https://master/auto-generated-workspace.html",
  function() {
    // Callback after workspace loaded into #pnlWorkspace
    // Now use require.js to get reference to instantiated workspace
    cprequire(
      ["inline:com-chilipeppr-workspace-rob"], // the id you gave your workspace
      function(myWorkspaceRob) {
        // Callback that is passed reference to the newly loaded workspace
        console.log("Workspace / rob just got loaded.", myWorkspaceRob);
        myWorkspaceRob.init();
      }
    );
  }
);

Publish

This workspace publishes the following signals. These signals are owned by this workspace and are published to all objects inside the ChiliPeppr environment that listen to them via the chilipeppr.subscribe(signal, callback) method. To better understand how ChiliPeppr's subscribe() method works see amplify.js's documentation at http://amplifyjs.com/api/pubsub/

Signal Description
(No signals defined in this workspace)

Subscribe

This workspace subscribes to the following signals. These signals are owned by this workspace. Other objects inside the ChiliPeppr environment can publish to these signals via the chilipeppr.publish(signal, data) method. To better understand how ChiliPeppr's publish() method works see amplify.js's documentation at http://amplifyjs.com/api/pubsub/

Signal Description
(No signals defined in this workspace)

Foreign Publish

This workspace publishes to the following signals that are owned by other objects. To better understand how ChiliPeppr's subscribe() method works see amplify.js's documentation at http://amplifyjs.com/api/pubsub/

Signal Description
(No signals defined in this workspace)

Foreign Subscribe

This workspace publishes to the following signals that are owned by other objects. To better understand how ChiliPeppr's publish() method works see amplify.js's documentation at http://amplifyjs.com/api/pubsub/

Signal Description
(No signals defined in this workspace)

Methods / Properties

The table below shows, in order, the methods and properties inside the workspace object.

Method / Property Type Description
idstring"com-chilipeppr-workspace-rob"

The ID of the widget. You must define this and make it unique.
namestring"Workspace / rob"
descstring"A ChiliPeppr Workspace rob."
urlstring"http://raw.githubusercontent.com/https://master/auto-generated-workspace.html"
fiddleurlstring"http://ide.c9.io/qarth/workspace-rob"
githuburlstring"http://github.com/https:/"
testurlstring"http://workspace-rob-qarth.c9users.io/workspace.html"
widgetConsoleobjectContains reference to the Console widget object. Hang onto the reference so we can resize it when the window resizes because we want it to manually resize to fill the height of the browser so it looks clean.
widgetSpjsobjectContains reference to the Serial Port JSON Server object.
initfunctionfunction ()

The workspace's init method. It loads the all the widgets contained in the workspace and inits them.
getBillboardfunctionfunction ()

Returns the billboard HTML, CSS, and Javascript for this Workspace. The billboard is used by the home page, the workspace picker, and the fork pulldown to show a consistent name/image/description tag for the workspace throughout the ChiliPeppr ecosystem.
addBillboardToWorkspaceMenufunctionfunction ()

Inject the billboard into the Workspace upper right corner pulldown which follows the standard template for workspace pulldown menus.
setupResizefunctionfunction ()

Listen to window resize event.
onResizefunctionfunction ()

When browser window resizes, forcibly resize the Console window
loadTemplateWidgetfunctionfunction (callback)

Load the Template widget via chilipeppr.load() so folks have a rob widget they can fork as a starting point for their own.
loadSpjsWidgetfunctionfunction (callback)

Load the Serial Port JSON Server widget via chilipeppr.load()
loadConsoleWidgetfunctionfunction (callback)

Load the Console widget via chilipeppr.load()
loadWorkspaceMenufunctionfunction (callback)

Load the workspace menu and show the pubsubviewer and fork links using our pubsubviewer widget that makes those links for us.

About ChiliPeppr

ChiliPeppr is a hardware fiddle, meaning it is a website that lets you easily create a workspace to fiddle with your hardware from software. ChiliPeppr provides a Serial Port JSON Server that you run locally on your computer, or remotely on another computer, to connect to the serial port of your hardware like an Arduino or other microcontroller.

You then create a workspace at ChiliPeppr.com that connects to your hardware by starting from scratch or forking somebody else's workspace that is close to what you are after. Then you write widgets in Javascript that interact with your hardware by forking the base template widget or forking another widget that is similar to what you are trying to build.

ChiliPeppr is massively capable such that the workspaces for TinyG and Grbl CNC controllers have become full-fledged CNC machine management software used by tens of thousands.

ChiliPeppr has inspired many people in the hardware/software world to use the browser and Javascript as the foundation for interacting with hardware. The Arduino team in Italy caught wind of ChiliPeppr and now ChiliPeppr's Serial Port JSON Server is the basis for the Arduino's new web IDE. If the Arduino team is excited about building on top of ChiliPeppr, what will you build on top of it?

workspace-rob's People

Contributors

chilipeppr avatar qarth avatar

Watchers

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