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
int redPin = 10; | |
int greenPin = 11; | |
int bluePin = 9; | |
int buttonPin = 8; | |
int colorPins[] = {0, 10, 11, 9}; | |
float colorVals[] = {125,255,255,255}; //aktuelle Farbwerte | |
float colorValsOrig[] = {125,255,255,255}; //Originalwerte(Warmweiß) | |
int colorDirs[] = {-2,-3,-3,-3}; |
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<avr/io.h> | |
#include<util/delay.h> | |
void sleep(uint8_t millisec) | |
{ | |
while(millisec) | |
{ | |
_delay_ms(1);/* 1 ms delay */ | |
millisec--; |
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 <avr/io.h> | |
#include <avr/interrupt.h> | |
#include <util/delay.h> | |
#define LED_CONFIG (DDRD |= (1<<1)) | |
#define CPU_PRESCALE(n) (CLKPR = 0x80, CLKPR = (n)) | |
#define DIT 80 /* unit time for morse code */ | |
#define FPS 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
#include <avr/io.h> | |
#include <avr/interrupt.h> | |
#include <util/delay.h> | |
#define CPU_PRESCALE(n) (CLKPR = 0x80, CLKPR = (n)) | |
#define FPS 1; | |
volatile int frame = 0; | |
uint8_t cube[4][4]; |
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
require 'rubygems' | |
require 'csv' | |
class Value | |
attr_accessor :name, :min , :max | |
def initialize(name, min = 0, max = 0) | |
@name = name | |
@min = min | |
@max = max |
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
def humanize(seconds) | |
units = [[60, 'sec'],[60, 'min'],[24, 'hour'],[365, 'day']] | |
time = [] | |
units.each do |count, name| | |
if seconds > 0 | |
seconds, rest = seconds.divmod(count) | |
time << "#{rest}#{name}#{rest > 1 ?'s':''}" | |
end | |
end |
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
// Array with default value | |
int foo[1337] = {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
#!/usr/bin/env ruby | |
require 'commander/import' | |
require 'nopoint/version' | |
require 'nopoint' | |
program :name, 'nopoint' | |
program :version, Nopoint::VERSION | |
program :description, 'Slideshow generator' |
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
module Main where | |
import Text.ParserCombinators.Parsec | |
data ListItem = List ListItem [ListItem] | |
| Value String | |
| Property String String | |
unwordsList :: [ListItem] -> String | |
unwordsList = unwords . map showVal |
OlderNewer