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 <Time.h> | |
#include <Wire.h> | |
#include <LibTemperature.h> | |
LibTemperature temp = LibTemperature(0); | |
//echo T$(($(date +%s)+60*60*-4)) > /dev/tty.usbserial-A4006DN3 | |
#define TIME_MSG_LEN 11 // time sync to PC is HEADER followed by unix time_t as ten ascii digits | |
#define TIME_HEADER 'T' // Header tag for serial time sync message |
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/pgmspace.h> | |
#include <math.h> | |
#include <LiquidCrystal.h> | |
#define ENC_A 14 | |
#define ENC_B 15 | |
#define ENC_PORT PINC | |
#define LED1 3 | |
#define LED2 5 |
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 <stdio.h> | |
#include <stdlib.h> | |
#include <ctype.h> | |
#include <math.h> | |
#include <PS2Keyboard.h> | |
#include <LiquidCrystal.h> | |
#define PS2DATA 2 | |
#define PS2IRQ 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
// Buzzer example function for the CEM-1203 buzzer (Sparkfun's part #COM-07950). | |
// by Rob Faludi | |
// http://www.faludi.com | |
// Additions by Christopher Stevens | |
// http://www.christopherstevens.cc | |
//referenced from http://www.phy.mtu.edu/~suits/notefreqs.html | |
//starting with F noteFreqArr[1] | |
int noteFreqArr[] = { |
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/pgmspace.h> | |
#define ENC_A 14 | |
#define ENC_B 15 | |
#define ENC_PORT PINC | |
const prog_uint8_t character_map[][2] = { | |
{ B00000000, B00000000 }, // space | |
{ B00000010, B00000100 }, // ! 32 | |
{ B00101000, B00000000 }, // " |
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/pgmspace.h> | |
#include "fix_fft.h" | |
#include <WProgram.h> | |
/* fix_fft.c - Fixed-point in-place Fast Fourier Transform */ | |
/* | |
All data are fixed-point short integers, in which -32768 | |
to +32768 represent -1.0 to +1.0 respectively. Integer | |
arithmetic is used for speed, instead of the more natural | |
floating-point. |
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 <stdio.h> | |
#include <stdlib.h> | |
#include <ctype.h> | |
#include <math.h> | |
#define CHECKMALLOC(var) if((var) == NULL) {printf("ERROR: malloc\n");abort();} | |
#define MAXOPSTACK 64 | |
#define MAXNUMSTACK 64 |
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 <string.h> | |
#include <SPI.h> | |
#include <PS2Keyboard.h> | |
#include <avr/sleep.h> | |
#define PS2DATA 2 | |
#define PS2IRQ 3 | |
PS2Keyboard keyboard; |
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
export PATH=/opt/local/bin:$PATH | |
xset b off | |
xmodmap -e "keycode 119 = Insert" | |
dwmstatus & | |
dwm |
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
strftime Formatting Atoms | |
%a Abbreviated weekday name * Thu | |
%A Full weekday name * Thursday | |
%b Abbreviated month name * Aug | |
%B Full month name * August | |
%c Date and time representation * Thu Aug 23 14:55:02 2001 | |
%d Day of the month (01-31) 23 | |
%H Hour in 24h format (00-23) 14 | |
%I Hour in 12h format (01-12) 02 |