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 "FastLED.h" | |
// For led chips like Neopixels, which have a data line, ground, and power, you just | |
// need to define DATA_PIN. For led chipsets that are SPI based (four wires - data, clock, | |
// ground, and power), like the LPD8806, define both DATA_PIN and CLOCK_PIN | |
#define LED_PIN 11 | |
#define COLOR_ORDER GRB | |
#define CHIPSET WS2812B | |
#define NUM_LEDS 72 |
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
import os | |
import time | |
import subprocess | |
import sys | |
fileList = [] | |
rootdir = raw_input("Root Dir: ") | |
for root, subFolders, files in os.walk(rootdir): | |
for file in files: | |
theFile = os.path.join(root,file) |
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
function [outImage, SAFEZONE] = bSplineResizeWidth(theSize, inImage, SAFEZONE, DEBUG) | |
if nargin < 4 || isempty(DEBUG) | |
DEBUG = 0; % Number of "safe zones" | |
end | |
if nargin < 3 || isempty(SAFEZONE) | |
SAFEZONE = [37.5,62.5]; % Percent of image width | |
end | |
INTERPMETHOD = 'spline'; | |
%% Deal with input and output image sizes |
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
/* | |
WiFlyTimeWithConsole.pde | |
http://www.semifluid.com | |
Based upon httpclient.ino from: | |
https://github.com/harlequin-tech/WiFlyHQ/blob/master/examples/httpclient/httpclient.ino | |
and Console.pde from: | |
================ | |
Universal 8bit Graphics Library, http://code.google.com/p/u8glib/ |
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
% Prerequisites (tested on Mac OS X 10.8.5): | |
% exiftool (tested with 9.37) | |
% http://www.sno.phy.queensu.ca/~phil/exiftool/ | |
% Luminance HDR (tested with 2.3.1) | |
% http://qtpfsgui.sourceforge.net/ | |
function ProcessHDRVideo(MOVIENAME,EVDIFF) | |
% Include the audio | |
% [y,Fs] = audioread(moviename); | |
% filename = fullfile(workingDir,'images','audioTrack.wav'); |
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
// Print character arrays to console | |
void u8g_print(char* theString) { | |
char ch; | |
byte i = 0; | |
while ((ch = theString[i++]) != '\0') { | |
read_line(ch); | |
} | |
} | |
// Print character arrays with a new line at the end | |
void u8g_println(char* theString) { |
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
% Load the 'original image', rescale to 1920 width, crop to 1080 height | |
originalImage = imread('YOURPHOTOHERE.JPG'); | |
scaledImage = imresize(originalImage, [NaN 1920]); | |
scaledImage = imcrop(scaledImage,[0, size(scaledImage,1)/2-1080/2,... | |
size(scaledImage,2), size(scaledImage,1)/2+1080/2-1]); | |
% Create a data output folder | |
[currentPath, ~, ~]= fileparts(mfilename('fullpath')); | |
mkdir(fullfile(currentPath,'data')) % Create the data directory | |
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 "U8glib.h" | |
#include <EEPROM.h> | |
// Variables you might want to play with | |
unsigned int timePeriod = 65; // 0-65535, us or ms per measurement (max 0.065s or 65.535s) | |
byte voltageRange = 1; // 1 = 0-3.3V, 2 = 0-1.65V, 3 = 0-0.825V | |
byte ledBacklight = 100; | |
boolean linesNotDots = true; // Draw lines between data points |
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 "U8glib.h" | |
const byte lcdLED = 6; // LED Backlight | |
const byte lcdA0 = 7; // Data and command selections. L: command H : data | |
const byte lcdRESET = 8; // Low reset | |
const byte lcdCS = 9; // SPI Chip Select (internally pulled up), active low | |
const byte lcdMOSI = 11; // SPI Data transmission | |
const byte lcdSCK = 13; // SPI Serial Clock | |
// SW SPI: |
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
nRecurse = 0; | |
FV = sphere_tri('ico',nRecurse,[],0); | |
lighting phong; | |
shading interp; | |
figure; | |
patch('vertices', FV.vertices,'faces', FV.faces, 'facecolor', [0.5 0.5 0.5], 'edgecolor', [.2 .2 .2]); | |
axis square; | |
axis off; | |
camlight infinite; | |
camproj('orthographic'); |
OlderNewer