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
# Install a full version of Python 3.4. It'll end up | |
# in /Library/Frameworks. Install PySerial in there too. | |
# This code can then be run in Blender | |
import sys | |
sys.path.append("/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages”) | |
import serial | |
s = serial.Serial("/dev/tty_YOURPORTHERE",9600) | |
my_string = "hello" |
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
// serial port <--> Motion Mind 3 latency test | |
import processing.serial.*; | |
Serial myPort; // The serial port | |
long myRet; | |
int inByte; | |
byte[] myOutString = { | |
// commands: READ REGISTER, Address (5), Register 17 (fw revision), checksum: | |
29, 5, 17, 51 | |
}; |
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
/*-=-=-=-=-=-=-=-=-=-=-=- RCCL/RCI Notice of Copyright -=-=-=-=-=-=-=-=-=-=-* | |
* * | |
* Copyright (C) 1987, 1991 by John E. Lloyd and Vincent Hayward. * | |
* * | |
* Information on copyright permissions, as well as a complete * | |
* disclaimer of warranty, is given in the file COPYRIGHT. * | |
* * | |
*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ | |
/*=~=~=~=~ McGill-Computer-Vision-and-Robotics-Laboratory--C-Module ~=~=~=~= |
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
// | |
// GetSerialPortList.swift | |
// serialTestsIokitSwift | |
// | |
// Created by h on 17/08/2015. | |
// Copyright © 2015 h. All rights reserved. | |
// | |
// Simple function returns array of serial port | |
// paths as Strings | |
// |
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
# | |
# POPULATE! | |
# | |
import bpy | |
import math | |
from bpy_extras import object_utils | |
from random import randint | |
from math import radians |
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
C = thisComp.layer("Camera"); | |
V = C.toWorldVec([0,0,1]); | |
P = toWorld(anchorPoint); | |
lookAt(P, P + V); |
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
# Motion export script | |
rad2deg = 180/3.14159265 | |
import bpy | |
import math | |
from math import sqrt | |
sce = bpy.context.scene | |
saveFile = open("/Users/h/Documents/BlenderPlayback.csv","w") |
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
#include <Adafruit_NeoPixel.h> | |
#define PIN 3 | |
#define LEDCOUNT 23 | |
#define SPEED 5 | |
const uint8_t PROGMEM gamma[] = { | |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, | |
1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, |
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
// AE expression to modulate a spotlight's flare brightness | |
// depending on whether the spot is facing into or away | |
// from the camera | |
// h 6/12/2016 | |
// change these to reference your spotlight | |
// and camera as appropriate | |
L = thisComp.layer("Light 1"); | |
C = thisComp.activeCamera; |
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
// apply this to the PoI of a spot light to point it in the direction of its acceleration vector | |
nextVec = transform.position.valueAtTime(time+0.08)-transform.position.valueAtTime(time); | |
prevVec = transform.position.valueAtTime(time)-transform.position.valueAtTime(time-0.08); | |
theVec = prevVec-nextVec; | |
theVec = theVec * 10; | |
theVec = theVec + transform.position; | |
theVec | |
// apply this to the Particles/sec parameter | |
prevVel = length(thisComp.layer("TEAL").transform.position.valueAtTime(time+0.04) - thisComp.layer("TEAL").transform.position.valueAtTime(time)); |
OlderNewer