This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected override Result RunCommand(RhinoDoc doc, RunMode mode) | |
{ | |
RhinoApp.WriteLine("The {0} command will get info from a pt cloud.", EnglishName); | |
Rhino.DocObjects.ObjRef obref; | |
Rhino.Commands.Result rc = Rhino.Input.RhinoGet.GetOneObject("Select point cloud object", true, Rhino.DocObjects.ObjectType.PointSet, out obref); | |
if (rc != Rhino.Commands.Result.Success) | |
return rc; | |
Rhino.DocObjects.RhinoObject rhobj = obref.Object(); | |
if (rhobj == null) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void RunScript(Guid id, Color col, double pow, ref object A) | |
{ | |
Rhino.DocObjects.ObjRef obj = new Rhino.DocObjects.ObjRef(id); | |
Rhino.DocObjects.LightObject lobj = obj.Object() as Rhino.DocObjects.LightObject; | |
lobj.LightGeometry.Diffuse = col; | |
lobj.LightGeometry.Intensity = pow; | |
lobj.CommitChanges(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//adapted from LEDneltKit written bu Adafruit and found here: | |
//https://github.com/adafruit/LPD8806/tree/master/examples/LEDbeltKit | |
//Fades a color in and out | |
//2013.06.04 - Luis E. Fraguada | |
//looking for suggestions! | |
#include "LPD8806.h" | |
#include "SPI.h" | |
int dataPin = 16; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package ioio.bosioio; | |
import ioio.lib.api.SpiMaster; | |
import ioio.lib.api.exception.ConnectionLostException; | |
import ioio.lib.util.BaseIOIOLooper; | |
import ioio.lib.util.IOIOLooper; | |
import ioio.lib.util.android.IOIOActivity; | |
import android.os.Bundle; | |
import android.view.Menu; | |
import android.widget.SeekBar; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//testing RTOS for multiple neopixel strips | |
//ChibiOS for Arduino sourced from: http://code.google.com/p/rtoslibs/ | |
#include <ChibiOS_AVR.h> | |
#include <Adafruit_NeoPixel.h> | |
Adafruit_NeoPixel strip1 = Adafruit_NeoPixel(3, 8, NEO_GRB + NEO_KHZ800); | |
Adafruit_NeoPixel strip2 = Adafruit_NeoPixel(3, 9, NEO_GRB + NEO_KHZ800); | |
uint8_t wait = 100; | |
uint8_t r = 255; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"metadata": { | |
"formatVersion": 3, | |
"sourceFile": "this", | |
"generatedBy": "this", | |
"vertices": 8, | |
"normals": 8, | |
"faces": 12, | |
"colors": 0, | |
"uvs": 0, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"metadata": { | |
"formatVersion": 3.1, | |
"sourceFile": "this", | |
"generatedBy": "this", | |
"vertices": 12, | |
"normals": 12, | |
"faces": 20, | |
"colors": 12, | |
"uvs": 0, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"metadata": { | |
"version": 4.3, | |
"type": "Object", | |
"generator": "MyApp" | |
}, | |
"geometries": [ | |
{ | |
"uuid": "8ae9fe0f-b41e-4b1e-8bda-397f75cbe68a", | |
"type": "Geometry", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#from http://www.pyimagesearch.com/2015/03/30/accessing-the-raspberry-pi-camera-with-opencv-and-python/ | |
# import the necessary packages | |
from picamera.array import PiRGBArray | |
from picamera import PiCamera | |
import time | |
import cv2 | |
# initialize the camera and grab a reference to the raw camera capture | |
camera = PiCamera() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pymetawear import libmetawear | |
from pymetawear.client import MetaWearClient | |
c = MetaWearClient('XX:XX:XX:XX:XX:XX', 'pygatt', debug=True) | |
print("New client created: {0}".format(c)) | |
#args board, strand, pin, #pixels, color order | |
libmetawear.mbl_mw_neopixel_init_slow_strand(c.board, 0, 0, 1, 0) | |
#args board, strand, pixel id, r, g, b |
OlderNewer