# 1 "foo.cpp" # 1 "" # 1 "foo.cpp" # 1 "/var/folders/jz/5yb8f2hr8xjcpf0059bsfz4r0000gn/T/build1446095421383572168.tmp/oiOSoul.cpp" # 1 "/private/var/folders/jz/5yb8f2hr8xjcpf0059bsfz4r0000gn/T/build1446095421383572168.tmp//" # 1 "" # 1 "" # 1 "/var/folders/jz/5yb8f2hr8xjcpf0059bsfz4r0000gn/T/build1446095421383572168.tmp/oiOSoul.cpp" # 1 "oiOSoul.ino" # 1 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/libraries/Servo/Servo.h" 1 # 48 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/libraries/Servo/Servo.h" # 1 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/inttypes.h" 1 3 # 37 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/inttypes.h" 3 # 1 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdint.h" 1 3 # 121 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdint.h" 3 typedef int int8_t __attribute__((__mode__(__QI__))); typedef unsigned int uint8_t __attribute__((__mode__(__QI__))); typedef int int16_t __attribute__ ((__mode__ (__HI__))); typedef unsigned int uint16_t __attribute__ ((__mode__ (__HI__))); typedef int int32_t __attribute__ ((__mode__ (__SI__))); typedef unsigned int uint32_t __attribute__ ((__mode__ (__SI__))); typedef int int64_t __attribute__((__mode__(__DI__))); typedef unsigned int uint64_t __attribute__((__mode__(__DI__))); # 142 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdint.h" 3 typedef int16_t intptr_t; typedef uint16_t uintptr_t; # 159 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdint.h" 3 typedef int8_t int_least8_t; typedef uint8_t uint_least8_t; typedef int16_t int_least16_t; typedef uint16_t uint_least16_t; typedef int32_t int_least32_t; typedef uint32_t uint_least32_t; typedef int64_t int_least64_t; typedef uint64_t uint_least64_t; # 213 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdint.h" 3 typedef int8_t int_fast8_t; typedef uint8_t uint_fast8_t; typedef int16_t int_fast16_t; typedef uint16_t uint_fast16_t; typedef int32_t int_fast32_t; typedef uint32_t uint_fast32_t; typedef int64_t int_fast64_t; typedef uint64_t uint_fast64_t; # 273 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdint.h" 3 typedef int64_t intmax_t; typedef uint64_t uintmax_t; # 38 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/inttypes.h" 2 3 # 77 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/inttypes.h" 3 typedef int32_t int_farptr_t; typedef uint32_t uint_farptr_t; # 49 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/libraries/Servo/Servo.h" 2 # 83 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/libraries/Servo/Servo.h" typedef enum { _timer1, _Nbr_16timers } timer16_Sequence_t ; # 98 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/libraries/Servo/Servo.h" typedef struct { uint8_t nbr :6 ; uint8_t isActive :1 ; } ServoPin_t ; typedef struct { ServoPin_t Pin; unsigned int ticks; } servo_t; class Servo { public: Servo(); uint8_t attach(int pin); uint8_t attach(int pin, int min, int max); void detach(); void write(int value); void writeMicroseconds(int value); int read(); int readMicroseconds(); bool attached(); private: int8_t min; int8_t max; uint8_t servoIndex; }; # 6 "oiOSoul.ino" 2 # 1 "/Users/billw/Documents/Arduino/libraries/Adafruit_NeoPixel/Adafruit_NeoPixel.h" 1 # 23 "/Users/billw/Documents/Arduino/libraries/Adafruit_NeoPixel/Adafruit_NeoPixel.h" # 1 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Arduino.h" 1 # 23 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Arduino.h" # 1 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdlib.h" 1 3 # 47 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdlib.h" 3 # 1 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/include/stddef.h" 1 3 4 # 214 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/include/stddef.h" 3 4 typedef unsigned int size_t; # 48 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdlib.h" 2 3 extern "C" { # 68 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdlib.h" 3 typedef struct { int quot; int rem; } div_t; typedef struct { long quot; long rem; } ldiv_t; typedef int (*__compar_fn_t)(const void *, const void *); # 106 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdlib.h" 3 extern void abort(void) __attribute__((__noreturn__)); extern int abs(int __i) __attribute__((__const__)); # 120 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdlib.h" 3 extern long labs(long __i) __attribute__((__const__)); # 143 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdlib.h" 3 extern void *bsearch(const void *__key, const void *__base, size_t __nmemb, size_t __size, int (*__compar)(const void *, const void *)); extern div_t div(int __num, int __denom) __asm__("__divmodhi4") __attribute__((__const__)); extern ldiv_t ldiv(long __num, long __denom) __asm__("__divmodsi4") __attribute__((__const__)); # 175 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdlib.h" 3 extern void qsort(void *__base, size_t __nmemb, size_t __size, __compar_fn_t __compar); # 208 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdlib.h" 3 extern long strtol(const char *__nptr, char **__endptr, int __base); # 242 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdlib.h" 3 extern unsigned long strtoul(const char *__nptr, char **__endptr, int __base); # 254 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdlib.h" 3 extern long atol(const char *__s) __attribute__((__pure__)); # 266 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdlib.h" 3 extern int atoi(const char *__s) __attribute__((__pure__)); # 278 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdlib.h" 3 extern void exit(int __status) __attribute__((__noreturn__)); # 290 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdlib.h" 3 extern void *malloc(size_t __size) __attribute__((__malloc__)); extern void free(void *__ptr); extern size_t __malloc_margin; extern char *__malloc_heap_start; extern char *__malloc_heap_end; extern void *calloc(size_t __nele, size_t __size) __attribute__((__malloc__)); # 338 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdlib.h" 3 extern void *realloc(void *__ptr, size_t __size) __attribute__((__malloc__)); extern double strtod(const char *__nptr, char **__endptr); extern double atof(const char *__nptr); # 364 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdlib.h" 3 extern int rand(void); extern void srand(unsigned int __seed); extern int rand_r(unsigned long *__ctx); # 406 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdlib.h" 3 extern char *itoa(int __val, char *__s, int __radix); # 434 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdlib.h" 3 extern char *ltoa(long int __val, char *__s, int __radix); # 460 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdlib.h" 3 extern char *utoa(unsigned int __val, char *__s, int __radix); # 486 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdlib.h" 3 extern char *ultoa(unsigned long int __val, char *__s, int __radix); # 504 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdlib.h" 3 extern long random(void); extern void srandom(unsigned long __seed); extern long random_r(unsigned long *__ctx); # 563 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdlib.h" 3 extern char *dtostre(double __val, char *__s, unsigned char __prec, unsigned char __flags); # 580 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdlib.h" 3 extern char *dtostrf(double __val, signed char __width, unsigned char __prec, char *__s); # 590 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdlib.h" 3 } # 24 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Arduino.h" 2 # 1 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/string.h" 1 3 # 45 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/string.h" 3 # 1 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/include/stddef.h" 1 3 4 # 46 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/string.h" 2 3 # 56 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/string.h" 3 extern "C" { # 110 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/string.h" 3 extern int ffs (int __val) __attribute__((__const__)); extern int ffsl (long __val) __attribute__((__const__)); extern int ffsll (long long __val) __attribute__((__const__)); extern void *memccpy(void *, const void *, int, size_t); extern void *memchr(const void *, int, size_t) __attribute__((__pure__)); extern int memcmp(const void *, const void *, size_t) __attribute__((__pure__)); extern void *memcpy(void *, const void *, size_t); extern void *memmem(const void *, size_t, const void *, size_t) __attribute__((__pure__)); extern void *memmove(void *, const void *, size_t); extern void *memrchr(const void *, int, size_t) __attribute__((__pure__)); extern void *memset(void *, int, size_t); extern char *strcat(char *, const char *); extern char *strchr(const char *, int) __attribute__((__pure__)); extern char *strchrnul(const char *, int) __attribute__((__pure__)); extern int strcmp(const char *, const char *) __attribute__((__pure__)); extern char *strcpy(char *, const char *); extern int strcasecmp(const char *, const char *) __attribute__((__pure__)); extern char *strcasestr(const char *, const char *) __attribute__((__pure__)); extern size_t strcspn(const char *__s, const char *__reject) __attribute__((__pure__)); extern char *strdup(const char *s1); extern size_t strlcat(char *, const char *, size_t); extern size_t strlcpy(char *, const char *, size_t); extern size_t strlen(const char *) __attribute__((__pure__)); extern char *strlwr(char *); extern char *strncat(char *, const char *, size_t); extern int strncmp(const char *, const char *, size_t) __attribute__((__pure__)); extern char *strncpy(char *, const char *, size_t); extern int strncasecmp(const char *, const char *, size_t) __attribute__((__pure__)); extern size_t strnlen(const char *, size_t) __attribute__((__pure__)); extern char *strpbrk(const char *__s, const char *__accept) __attribute__((__pure__)); extern char *strrchr(const char *, int) __attribute__((__pure__)); extern char *strrev(char *); extern char *strsep(char **, const char *); extern size_t strspn(const char *__s, const char *__accept) __attribute__((__pure__)); extern char *strstr(const char *, const char *) __attribute__((__pure__)); extern char *strtok(char *, const char *); extern char *strtok_r(char *, const char *, char **); extern char *strupr(char *); } # 25 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Arduino.h" 2 # 1 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/math.h" 1 3 # 95 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/math.h" 3 extern "C" { extern double cos(double __x) __attribute__((__const__)); extern double fabs(double __x) __attribute__((__const__)); # 128 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/math.h" 3 extern double fmod(double __x, double __y) __attribute__((__const__)); # 143 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/math.h" 3 extern double modf(double __x, double *__iptr); extern double sin(double __x) __attribute__((__const__)); extern double sqrt(double __x) __attribute__((__const__)); extern double tan(double __x) __attribute__((__const__)); extern double floor(double __x) __attribute__((__const__)); extern double ceil(double __x) __attribute__((__const__)); # 200 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/math.h" 3 extern double frexp(double __x, int *__pexp); # 211 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/math.h" 3 extern double ldexp(double __x, int __exp) __attribute__((__const__)); extern double exp(double __x) __attribute__((__const__)); extern double cosh(double __x) __attribute__((__const__)); extern double sinh(double __x) __attribute__((__const__)); extern double tanh(double __x) __attribute__((__const__)); # 248 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/math.h" 3 extern double acos(double __x) __attribute__((__const__)); # 257 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/math.h" 3 extern double asin(double __x) __attribute__((__const__)); extern double atan(double __x) __attribute__((__const__)); # 275 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/math.h" 3 extern double atan2(double __y, double __x) __attribute__((__const__)); extern double log(double __x) __attribute__((__const__)); extern double log10(double __x) __attribute__((__const__)); extern double pow(double __x, double __y) __attribute__((__const__)); extern int isnan(double __x) __attribute__((__const__)); extern int isinf(double __x) __attribute__((__const__)); # 323 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/math.h" 3 extern double square(double __x) __attribute__((__const__)); __attribute__((__const__)) static inline double copysign (double __x, double __y) { __asm__ ( "bst %D2, 7 \n\t" "bld %D0, 7 " : "=r" (__x) : "0" (__x), "r" (__y) ); return __x; } extern double fdim (double __x, double __y) __attribute__((__const__)); # 357 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/math.h" 3 extern double fma (double __x, double __y, double __z) __attribute__((__const__)); # 366 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/math.h" 3 extern double fmax (double __x, double __y) __attribute__((__const__)); # 375 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/math.h" 3 extern double fmin (double __x, double __y) __attribute__((__const__)); # 389 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/math.h" 3 extern int signbit (double __x) __attribute__((__const__)); extern double trunc (double __x) __attribute__((__const__)); __attribute__((__const__)) static inline int isfinite (double __x) { unsigned char __exp; __asm__ ( "mov %0, %C1 \n\t" "lsl %0 \n\t" "mov %0, %D1 \n\t" "rol %0 " : "=r" (__exp) : "r" (__x) ); return __exp != 0xff; } # 428 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/math.h" 3 double hypot (double __x, double __y) __attribute__((__const__)); # 439 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/math.h" 3 double round (double __x) __attribute__((__const__)); # 452 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/math.h" 3 long lround (double __x) __attribute__((__const__)); # 466 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/math.h" 3 long lrint (double __x) __attribute__((__const__)); } # 26 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Arduino.h" 2 # 1 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/avr/pgmspace.h" 1 3 # 81 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/avr/pgmspace.h" 3 # 1 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/include/stddef.h" 1 3 4 # 82 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/avr/pgmspace.h" 2 3 # 1 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/avr/io.h" 1 3 # 99 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/avr/io.h" 3 # 1 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/avr/sfr_defs.h" 1 3 # 100 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/avr/io.h" 2 3 # 196 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/avr/io.h" 3 # 1 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/avr/iom328p.h" 1 3 # 197 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/avr/io.h" 2 3 # 334 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/avr/io.h" 3 # 1 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/avr/portpins.h" 1 3 # 335 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/avr/io.h" 2 3 # 1 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/avr/common.h" 1 3 # 337 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/avr/io.h" 2 3 # 1 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/avr/version.h" 1 3 # 339 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/avr/io.h" 2 3 # 1 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/avr/fuse.h" 1 3 # 234 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/avr/fuse.h" 3 typedef struct { unsigned char low; unsigned char high; unsigned char extended; } __fuse_t; # 342 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/avr/io.h" 2 3 # 1 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/avr/lock.h" 1 3 # 345 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/avr/io.h" 2 3 # 83 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/avr/pgmspace.h" 2 3 # 106 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/avr/pgmspace.h" 3 extern "C" { # 211 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/avr/pgmspace.h" 3 } # 28 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Arduino.h" 2 # 1 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/avr/interrupt.h" 1 3 # 30 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Arduino.h" 2 # 1 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/arduino/cores/arduino/binary.h" 1 # 32 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Arduino.h" 2 extern "C"{ # 108 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Arduino.h" typedef unsigned int word; typedef uint8_t boolean; typedef uint8_t byte; void init(void); void initVariant(void); int atexit(void (*func)()) __attribute__((weak)); void pinMode(uint8_t, uint8_t); void digitalWrite(uint8_t, uint8_t); int digitalRead(uint8_t); int analogRead(uint8_t); void analogReference(uint8_t mode); void analogWrite(uint8_t, int); unsigned long millis(void); unsigned long micros(void); void delay(unsigned long); void delayMicroseconds(unsigned int us); unsigned long pulseIn(uint8_t pin, uint8_t state, unsigned long timeout); void shiftOut(uint8_t dataPin, uint8_t clockPin, uint8_t bitOrder, uint8_t val); uint8_t shiftIn(uint8_t dataPin, uint8_t clockPin, uint8_t bitOrder); void attachInterrupt(uint8_t, void (*)(void), int mode); void detachInterrupt(uint8_t); void setup(void); void loop(void); # 149 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Arduino.h" # 209 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Arduino.h" } # 1 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/arduino/cores/arduino/WCharacter.h" 1 # 23 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/arduino/cores/arduino/WCharacter.h" # 1 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/ctype.h" 1 3 # 48 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/ctype.h" 3 extern "C" { # 74 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/ctype.h" 3 extern int isalnum(int __c) __attribute__((__const__)); extern int isalpha(int __c) __attribute__((__const__)); extern int isascii(int __c) __attribute__((__const__)); extern int isblank(int __c) __attribute__((__const__)); extern int iscntrl(int __c) __attribute__((__const__)); extern int isdigit(int __c) __attribute__((__const__)); extern int isgraph(int __c) __attribute__((__const__)); extern int islower(int __c) __attribute__((__const__)); extern int isprint(int __c) __attribute__((__const__)); extern int ispunct(int __c) __attribute__((__const__)); extern int isspace(int __c) __attribute__((__const__)); extern int isupper(int __c) __attribute__((__const__)); extern int isxdigit(int __c) __attribute__((__const__)); # 173 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/ctype.h" 3 extern int toascii(int __c) __attribute__((__const__)); extern int tolower(int __c) __attribute__((__const__)); extern int toupper(int __c) __attribute__((__const__)); } # 24 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/arduino/cores/arduino/WCharacter.h" 2 inline boolean isAlphaNumeric(int c) __attribute__((always_inline)); inline boolean isAlpha(int c) __attribute__((always_inline)); inline boolean isAscii(int c) __attribute__((always_inline)); inline boolean isWhitespace(int c) __attribute__((always_inline)); inline boolean isControl(int c) __attribute__((always_inline)); inline boolean isDigit(int c) __attribute__((always_inline)); inline boolean isGraph(int c) __attribute__((always_inline)); inline boolean isLowerCase(int c) __attribute__((always_inline)); inline boolean isPrintable(int c) __attribute__((always_inline)); inline boolean isPunct(int c) __attribute__((always_inline)); inline boolean isSpace(int c) __attribute__((always_inline)); inline boolean isUpperCase(int c) __attribute__((always_inline)); inline boolean isHexadecimalDigit(int c) __attribute__((always_inline)); inline int toAscii(int c) __attribute__((always_inline)); inline int toLowerCase(int c) __attribute__((always_inline)); inline int toUpperCase(int c)__attribute__((always_inline)); inline boolean isAlphaNumeric(int c) { return ( isalnum(c) == 0 ? 0x0 : 0x1); } inline boolean isAlpha(int c) { return ( isalpha(c) == 0 ? 0x0 : 0x1); } inline boolean isAscii(int c) { return ( isascii (c) == 0 ? 0x0 : 0x1); } inline boolean isWhitespace(int c) { return ( isblank (c) == 0 ? 0x0 : 0x1); } inline boolean isControl(int c) { return ( iscntrl (c) == 0 ? 0x0 : 0x1); } inline boolean isDigit(int c) { return ( isdigit (c) == 0 ? 0x0 : 0x1); } inline boolean isGraph(int c) { return ( isgraph (c) == 0 ? 0x0 : 0x1); } inline boolean isLowerCase(int c) { return (islower (c) == 0 ? 0x0 : 0x1); } inline boolean isPrintable(int c) { return ( isprint (c) == 0 ? 0x0 : 0x1); } inline boolean isPunct(int c) { return ( ispunct (c) == 0 ? 0x0 : 0x1); } inline boolean isSpace(int c) { return ( isspace (c) == 0 ? 0x0 : 0x1); } inline boolean isUpperCase(int c) { return ( isupper (c) == 0 ? 0x0 : 0x1); } inline boolean isHexadecimalDigit(int c) { return ( isxdigit (c) == 0 ? 0x0 : 0x1); } inline int toAscii(int c) { return toascii (c); } # 156 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/arduino/cores/arduino/WCharacter.h" inline int toLowerCase(int c) { return tolower (c); } inline int toUpperCase(int c) { return toupper (c); } # 214 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Arduino.h" 2 # 1 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/arduino/cores/arduino/WString.h" 1 # 37 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/arduino/cores/arduino/WString.h" class __FlashStringHelper; class StringSumHelper; class String { typedef void (String::*StringIfHelperType)() const; void StringIfHelper() const {} public: String(const char *cstr = ""); String(const String &str); String(const __FlashStringHelper *str); explicit String(char c); explicit String(unsigned char, unsigned char base=10); explicit String(int, unsigned char base=10); explicit String(unsigned int, unsigned char base=10); explicit String(long, unsigned char base=10); explicit String(unsigned long, unsigned char base=10); explicit String(float, unsigned char decimalPlaces=2); explicit String(double, unsigned char decimalPlaces=2); ~String(void); unsigned char reserve(unsigned int size); inline unsigned int length(void) const {return len;} String & operator = (const String &rhs); String & operator = (const char *cstr); String & operator = (const __FlashStringHelper *str); # 99 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/arduino/cores/arduino/WString.h" unsigned char concat(const String &str); unsigned char concat(const char *cstr); unsigned char concat(char c); unsigned char concat(unsigned char c); unsigned char concat(int num); unsigned char concat(unsigned int num); unsigned char concat(long num); unsigned char concat(unsigned long num); unsigned char concat(float num); unsigned char concat(double num); unsigned char concat(const __FlashStringHelper * str); String & operator += (const String &rhs) {concat(rhs); return (*this);} String & operator += (const char *cstr) {concat(cstr); return (*this);} String & operator += (char c) {concat(c); return (*this);} String & operator += (unsigned char num) {concat(num); return (*this);} String & operator += (int num) {concat(num); return (*this);} String & operator += (unsigned int num) {concat(num); return (*this);} String & operator += (long num) {concat(num); return (*this);} String & operator += (unsigned long num) {concat(num); return (*this);} String & operator += (float num) {concat(num); return (*this);} String & operator += (double num) {concat(num); return (*this);} String & operator += (const __FlashStringHelper *str){concat(str); return (*this);} friend StringSumHelper & operator + (const StringSumHelper &lhs, const String &rhs); friend StringSumHelper & operator + (const StringSumHelper &lhs, const char *cstr); friend StringSumHelper & operator + (const StringSumHelper &lhs, char c); friend StringSumHelper & operator + (const StringSumHelper &lhs, unsigned char num); friend StringSumHelper & operator + (const StringSumHelper &lhs, int num); friend StringSumHelper & operator + (const StringSumHelper &lhs, unsigned int num); friend StringSumHelper & operator + (const StringSumHelper &lhs, long num); friend StringSumHelper & operator + (const StringSumHelper &lhs, unsigned long num); friend StringSumHelper & operator + (const StringSumHelper &lhs, float num); friend StringSumHelper & operator + (const StringSumHelper &lhs, double num); friend StringSumHelper & operator + (const StringSumHelper &lhs, const __FlashStringHelper *rhs); operator StringIfHelperType() const { return buffer ? &String::StringIfHelper : 0; } int compareTo(const String &s) const; unsigned char equals(const String &s) const; unsigned char equals(const char *cstr) const; unsigned char operator == (const String &rhs) const {return equals(rhs);} unsigned char operator == (const char *cstr) const {return equals(cstr);} unsigned char operator != (const String &rhs) const {return !equals(rhs);} unsigned char operator != (const char *cstr) const {return !equals(cstr);} unsigned char operator < (const String &rhs) const; unsigned char operator > (const String &rhs) const; unsigned char operator <= (const String &rhs) const; unsigned char operator >= (const String &rhs) const; unsigned char equalsIgnoreCase(const String &s) const; unsigned char startsWith( const String &prefix) const; unsigned char startsWith(const String &prefix, unsigned int offset) const; unsigned char endsWith(const String &suffix) const; char charAt(unsigned int index) const; void setCharAt(unsigned int index, char c); char operator [] (unsigned int index) const; char& operator [] (unsigned int index); void getBytes(unsigned char *buf, unsigned int bufsize, unsigned int index=0) const; void toCharArray(char *buf, unsigned int bufsize, unsigned int index=0) const {getBytes((unsigned char *)buf, bufsize, index);} const char * c_str() const { return buffer; } int indexOf( char ch ) const; int indexOf( char ch, unsigned int fromIndex ) const; int indexOf( const String &str ) const; int indexOf( const String &str, unsigned int fromIndex ) const; int lastIndexOf( char ch ) const; int lastIndexOf( char ch, unsigned int fromIndex ) const; int lastIndexOf( const String &str ) const; int lastIndexOf( const String &str, unsigned int fromIndex ) const; String substring( unsigned int beginIndex ) const { return substring(beginIndex, len); }; String substring( unsigned int beginIndex, unsigned int endIndex ) const; void replace(char find, char replace); void replace(const String& find, const String& replace); void remove(unsigned int index); void remove(unsigned int index, unsigned int count); void toLowerCase(void); void toUpperCase(void); void trim(void); long toInt(void) const; float toFloat(void) const; protected: char *buffer; unsigned int capacity; unsigned int len; protected: void init(void); void invalidate(void); unsigned char changeBuffer(unsigned int maxStrLen); unsigned char concat(const char *cstr, unsigned int length); String & copy(const char *cstr, unsigned int length); String & copy(const __FlashStringHelper *pstr, unsigned int length); }; class StringSumHelper : public String { public: StringSumHelper(const String &s) : String(s) {} StringSumHelper(const char *p) : String(p) {} StringSumHelper(char c) : String(c) {} StringSumHelper(unsigned char num) : String(num) {} StringSumHelper(int num) : String(num) {} StringSumHelper(unsigned int num) : String(num) {} StringSumHelper(long num) : String(num) {} StringSumHelper(unsigned long num) : String(num) {} StringSumHelper(float num) : String(num) {} StringSumHelper(double num) : String(num) {} }; # 215 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Arduino.h" 2 # 1 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/arduino/cores/arduino/HardwareSerial.h" 1 # 28 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/arduino/cores/arduino/HardwareSerial.h" # 1 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Stream.h" 1 # 26 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Stream.h" # 1 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Print.h" 1 # 24 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Print.h" # 1 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdio.h" 1 3 # 45 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdio.h" 3 # 1 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/include/stdarg.h" 1 3 4 # 43 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/include/stdarg.h" 3 4 typedef __builtin_va_list __gnuc_va_list; # 105 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/include/stdarg.h" 3 4 typedef __gnuc_va_list va_list; # 46 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdio.h" 2 3 # 1 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/include/stddef.h" 1 3 4 # 50 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdio.h" 2 3 # 242 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdio.h" 3 struct __file { char *buf; unsigned char unget; uint8_t flags; # 261 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdio.h" 3 int size; int len; int (*put)(char, struct __file *); int (*get)(struct __file *); void *udata; }; # 397 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdio.h" 3 extern "C" { extern struct __file *__iob[]; # 417 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdio.h" 3 extern struct __file *fdevopen(int (*__put)(char, struct __file*), int (*__get)(struct __file*)); # 434 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdio.h" 3 extern int fclose(struct __file *__stream); # 608 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdio.h" 3 extern int vfprintf(struct __file *__stream, const char *__fmt, va_list __ap); extern int vfprintf_P(struct __file *__stream, const char *__fmt, va_list __ap); extern int fputc(int __c, struct __file *__stream); extern int putc(int __c, struct __file *__stream); extern int putchar(int __c); # 649 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdio.h" 3 extern int printf(const char *__fmt, ...); extern int printf_P(const char *__fmt, ...); extern int vprintf(const char *__fmt, va_list __ap); extern int sprintf(char *__s, const char *__fmt, ...); extern int sprintf_P(char *__s, const char *__fmt, ...); # 685 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdio.h" 3 extern int snprintf(char *__s, size_t __n, const char *__fmt, ...); extern int snprintf_P(char *__s, size_t __n, const char *__fmt, ...); extern int vsprintf(char *__s, const char *__fmt, va_list ap); extern int vsprintf_P(char *__s, const char *__fmt, va_list ap); # 713 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdio.h" 3 extern int vsnprintf(char *__s, size_t __n, const char *__fmt, va_list ap); extern int vsnprintf_P(char *__s, size_t __n, const char *__fmt, va_list ap); extern int fprintf(struct __file *__stream, const char *__fmt, ...); extern int fprintf_P(struct __file *__stream, const char *__fmt, ...); extern int fputs(const char *__str, struct __file *__stream); extern int fputs_P(const char *__str, struct __file *__stream); extern int puts(const char *__str); extern int puts_P(const char *__str); # 762 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdio.h" 3 extern size_t fwrite(const void *__ptr, size_t __size, size_t __nmemb, struct __file *__stream); extern int fgetc(struct __file *__stream); extern int getc(struct __file *__stream); extern int getchar(void); # 810 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdio.h" 3 extern int ungetc(int __c, struct __file *__stream); # 822 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdio.h" 3 extern char *fgets(char *__str, int __size, struct __file *__stream); extern char *gets(char *__str); # 840 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdio.h" 3 extern size_t fread(void *__ptr, size_t __size, size_t __nmemb, struct __file *__stream); extern void clearerr(struct __file *__stream); # 857 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdio.h" 3 extern int feof(struct __file *__stream); # 868 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdio.h" 3 extern int ferror(struct __file *__stream); extern int vfscanf(struct __file *__stream, const char *__fmt, va_list __ap); extern int vfscanf_P(struct __file *__stream, const char *__fmt, va_list __ap); extern int fscanf(struct __file *__stream, const char *__fmt, ...); extern int fscanf_P(struct __file *__stream, const char *__fmt, ...); extern int scanf(const char *__fmt, ...); extern int scanf_P(const char *__fmt, ...); extern int vscanf(const char *__fmt, va_list __ap); extern int sscanf(const char *__buf, const char *__fmt, ...); extern int sscanf_P(const char *__buf, const char *__fmt, ...); # 938 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/include/stdio.h" 3 static __inline__ int fflush(struct __file *stream __attribute__((unused))) { return 0; } } # 25 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Print.h" 2 # 1 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Printable.h" 1 # 23 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Printable.h" # 1 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/arduino/cores/arduino/new.h" 1 # 10 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/arduino/cores/arduino/new.h" __extension__ typedef int __guard __attribute__((mode (__DI__))); extern "C" int __cxa_guard_acquire(__guard *); extern "C" void __cxa_guard_release (__guard *); extern "C" void __cxa_guard_abort (__guard *); extern "C" void __cxa_pure_virtual(void); # 24 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Printable.h" 2 class Print; class Printable { public: virtual size_t printTo(Print& p) const = 0; }; # 28 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Print.h" 2 class Print { private: int write_error; size_t printNumber(unsigned long, uint8_t); size_t printFloat(double, uint8_t); protected: void setWriteError(int err = 1) { write_error = err; } public: Print() : write_error(0) {} int getWriteError() { return write_error; } void clearWriteError() { setWriteError(0); } virtual size_t write(uint8_t) = 0; size_t write(const char *str) { if (str == __null) return 0; return write((const uint8_t *)str, strlen(str)); } virtual size_t write(const uint8_t *buffer, size_t size); size_t write(const char *buffer, size_t size) { return write((const uint8_t *)buffer, size); } size_t print(const __FlashStringHelper *); size_t print(const String &); size_t print(const char[]); size_t print(char); size_t print(unsigned char, int = 10); size_t print(int, int = 10); size_t print(unsigned int, int = 10); size_t print(long, int = 10); size_t print(unsigned long, int = 10); size_t print(double, int = 2); size_t print(const Printable&); size_t println(const __FlashStringHelper *); size_t println(const String &s); size_t println(const char[]); size_t println(char); size_t println(unsigned char, int = 10); size_t println(int, int = 10); size_t println(unsigned int, int = 10); size_t println(long, int = 10); size_t println(unsigned long, int = 10); size_t println(double, int = 2); size_t println(const Printable&); size_t println(void); }; # 27 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Stream.h" 2 # 38 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Stream.h" class Stream : public Print { protected: unsigned long _timeout; unsigned long _startMillis; int timedRead(); int timedPeek(); int peekNextDigit(); public: virtual int available() = 0; virtual int read() = 0; virtual int peek() = 0; virtual void flush() = 0; Stream() {_timeout=1000;} void setTimeout(unsigned long timeout); bool find(char *target); bool find(char *target, size_t length); bool findUntil(char *target, char *terminator); bool findUntil(char *target, size_t targetLen, char *terminate, size_t termLen); long parseInt(); float parseFloat(); size_t readBytes( char *buffer, size_t length); size_t readBytesUntil( char terminator, char *buffer, size_t length); String readString(); String readStringUntil(char terminator); protected: long parseInt(char skipChar); float parseFloat(char skipChar); }; # 29 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/arduino/cores/arduino/HardwareSerial.h" 2 struct ring_buffer; class HardwareSerial : public Stream { private: ring_buffer *_rx_buffer; ring_buffer *_tx_buffer; volatile uint8_t *_ubrrh; volatile uint8_t *_ubrrl; volatile uint8_t *_ucsra; volatile uint8_t *_ucsrb; volatile uint8_t *_ucsrc; volatile uint8_t *_udr; uint8_t _rxen; uint8_t _txen; uint8_t _rxcie; uint8_t _udrie; uint8_t _u2x; bool transmitting; public: HardwareSerial(ring_buffer *rx_buffer, ring_buffer *tx_buffer, volatile uint8_t *ubrrh, volatile uint8_t *ubrrl, volatile uint8_t *ucsra, volatile uint8_t *ucsrb, volatile uint8_t *ucsrc, volatile uint8_t *udr, uint8_t rxen, uint8_t txen, uint8_t rxcie, uint8_t udrie, uint8_t u2x); void begin(unsigned long); void begin(unsigned long, uint8_t); void end(); virtual int available(void); virtual int peek(void); virtual int read(void); virtual void flush(void); virtual size_t write(uint8_t); inline size_t write(unsigned long n) { return write((uint8_t)n); } inline size_t write(long n) { return write((uint8_t)n); } inline size_t write(unsigned int n) { return write((uint8_t)n); } inline size_t write(int n) { return write((uint8_t)n); } using Print::write; operator bool(); }; # 98 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/arduino/cores/arduino/HardwareSerial.h" extern HardwareSerial Serial; # 113 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/arduino/cores/arduino/HardwareSerial.h" extern void serialEventRun(void) __attribute__((weak)); # 216 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Arduino.h" 2 uint16_t makeWord(uint16_t w); uint16_t makeWord(byte h, byte l); unsigned long pulseIn(uint8_t pin, uint8_t state, unsigned long timeout = 1000000L); void tone(uint8_t _pin, unsigned int frequency, unsigned long duration = 0); void noTone(uint8_t _pin); long random(long); long random(long, long); void randomSeed(unsigned int); long map(long, long, long, long, long); # 1 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/arduino/variants/standard/pins_arduino.h" 1 # 40 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/arduino/variants/standard/pins_arduino.h" static const uint8_t SS = 10; static const uint8_t MOSI = 11; static const uint8_t MISO = 12; static const uint8_t SCK = 13; static const uint8_t SDA = 18; static const uint8_t SCL = 19; static const uint8_t A0 = 14; static const uint8_t A1 = 15; static const uint8_t A2 = 16; static const uint8_t A3 = 17; static const uint8_t A4 = 18; static const uint8_t A5 = 19; static const uint8_t A6 = 20; static const uint8_t A7 = 21; # 236 "/Applications/arduino/Arduino-1.0.6.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Arduino.h" 2 # 24 "/Users/billw/Documents/Arduino/libraries/Adafruit_NeoPixel/Adafruit_NeoPixel.h" 2 # 44 "/Users/billw/Documents/Arduino/libraries/Adafruit_NeoPixel/Adafruit_NeoPixel.h" class Adafruit_NeoPixel { public: Adafruit_NeoPixel(uint16_t n, uint8_t p=6, uint8_t t=0x01 + 0x02); ~Adafruit_NeoPixel(); void begin(void), show(void), setPin(uint8_t p), setPixelColor(uint16_t n, uint8_t r, uint8_t g, uint8_t b), setPixelColor(uint16_t n, uint32_t c), setBrightness(uint8_t), clear(); uint8_t *getPixels(void) const, getBrightness(void) const; uint16_t numPixels(void) const; static uint32_t Color(uint8_t r, uint8_t g, uint8_t b); uint32_t getPixelColor(uint16_t n) const; inline bool canShow(void) { return (micros() - endTime) >= 50L; } private: const uint16_t numLEDs, numBytes; uint8_t pin, brightness, *pixels, rOffset, gOffset, bOffset; const uint8_t type; uint32_t endTime; const volatile uint8_t *port; uint8_t pinMask; }; # 7 "oiOSoul.ino" 2 void setup(); void loop(); void sneeze(); void doseOff(); void move3Servos(Servo servo1Name, float target_pos1,Servo servo2Name, float target_pos2,Servo servo3Name, float target_pos3,float easing); void rainbow(uint8_t wait); void rainbowCycle(uint8_t wait); void theaterChase(uint32_t c, uint8_t wait); void theaterChaseRainbow(uint8_t wait); uint32_t Wheel(byte WheelPos); void dimmer(int a, int b, int red, int green, int blue,int fadeDirection, int stepSpeed); void setEyesColor(uint32_t color); # 11 "oiOSoul.ino" Adafruit_NeoPixel strip = Adafruit_NeoPixel(2, 12, 0x01 + 0x02); uint32_t black = strip.Color(0, 0, 0); uint32_t white = strip.Color(255, 255, 255); uint32_t magenta = strip.Color(255, 0, 255); uint32_t red = strip.Color(255, 0, 0); uint32_t green = strip.Color(0, 255, 0); uint32_t blue = strip.Color(0, 0, 255); uint32_t blueMar = strip.Color(0, 157, 255); uint32_t orange = strip.Color(250, 175, 0); uint32_t yellow = strip.Color(255, 255, 0); uint32_t nightBlue = strip.Color(35, 0, 135); Servo servoLeg; Servo servoWaste; Servo servoHead; int centerLeg=1580; int leftLeg=2300; int rightLeg=670; int centerWaste=1300; int forwardWaste=1670; int backwardWaste=777; int centerHead=1150; int leftHead=2400; int rightHead=600; int sensor; long unsigned detectionTime = 0; long unsigned prevDetectionTime = 0; int detectionCountFast = 0; int detectionCountSlow = 0; int fastDetection = 7000; boolean proxDetected = 0x0; int sound; float rhythm = 0.3; int countOfDetectedBeats = 0; long unsigned lastBeat = 0; int allowedPauseBetweenSequences = 2000; long unsigned lastAction = 0; int sneezeTimer = 65000; int sleepIfNoActionTimer = 45000; void setup() { servoLeg.attach(3); servoWaste.attach(5); servoHead.attach(6); pinMode(8, 0x0); servoLeg.writeMicroseconds(centerLeg); servoWaste.writeMicroseconds(centerWaste); servoHead.writeMicroseconds(centerHead); delay(1000); strip.begin(); strip.setBrightness(180); strip.show(); setEyesColor(white); } void loop() { sensor = analogRead(A0); sound = digitalRead(8); if((millis() - lastAction) > sleepIfNoActionTimer) { doseOff(); } if(millis() % sneezeTimer == 0) { sneeze(); } # 127 "oiOSoul.ino" if (sound == 0x1) { delay(100); if (sound == 0x1) { lastBeat = millis(); int x = random(1,5); switch(x){ case 1: setEyesColor(magenta); move3Servos(servoLeg,centerLeg,servoWaste,1350,servoHead,1650,rhythm); move3Servos(servoLeg,centerLeg,servoWaste,centerWaste,servoHead,centerHead,rhythm); break; case 2: setEyesColor(blue); move3Servos(servoLeg,centerLeg,servoWaste,1350,servoHead,800,rhythm); move3Servos(servoLeg,centerLeg,servoWaste,centerWaste,servoHead,centerHead,rhythm); break; case 3: setEyesColor(red); move3Servos(servoLeg,1320,servoWaste,centerWaste,servoHead,800,0.5); move3Servos(servoLeg,centerLeg,servoWaste,centerWaste,servoHead,centerHead,rhythm); break; case 4: setEyesColor(yellow); move3Servos(servoLeg,1900,servoWaste,centerWaste,servoHead,1800,rhythm); move3Servos(servoLeg,centerLeg,servoWaste,centerWaste,servoHead,centerHead,rhythm); break; } setEyesColor(white); countOfDetectedBeats++; lastAction = millis(); } } if((millis()-lastBeat) > allowedPauseBetweenSequences && countOfDetectedBeats >=4 && countOfDetectedBeats <= 10) { rhythm = 0.5; setEyesColor(red); move3Servos(servoLeg,1700,servoWaste,1350,servoHead,1580,0.1); delay(1000); setEyesColor(black); delay(80); setEyesColor(red); delay(700); setEyesColor(black); delay(80); setEyesColor(red); lastBeat = millis(); countOfDetectedBeats = 0; lastAction = millis(); } if(countOfDetectedBeats > 10) { for(int i=1;i<=8;i++) { move3Servos(servoLeg,centerLeg,servoWaste,1350,servoHead,1650,rhythm); move3Servos(servoLeg,centerLeg,servoWaste,centerWaste,servoHead,centerHead,rhythm); } move3Servos(servoLeg,centerLeg,servoWaste,1100,servoHead,centerHead,0.3); delay(1000); move3Servos(servoLeg,centerLeg,servoWaste,1100,servoHead,1580,0.08); delay(2000); setEyesColor(orange); move3Servos(servoLeg,1000,servoWaste,1600,servoHead,750,5.0); delay(1000); move3Servos(servoLeg,1000,servoWaste,1600,servoHead,2200,0.05); delay(600); move3Servos(servoLeg,1000,servoWaste,1600,servoHead,750,0.2); countOfDetectedBeats = 0; rhythm = 0.3; lastBeat = 0; detectionCountFast = 1; detectionCountSlow = 1; lastAction = millis(); } # 230 "oiOSoul.ino" if(sensor < 250) { delay(150); if(sensor < 250) { detectionTime = millis(); if (detectionCountFast !=0) { if (detectionTime-prevDetectionTime < fastDetection ) { detectionCountFast++; detectionCountSlow = 1; } else { detectionCountSlow++; detectionCountFast = 1; } } else { detectionCountFast++; detectionCountSlow++; } if(detectionCountFast > 3) detectionCountFast=1; if(detectionCountSlow > 3) detectionCountSlow=1; prevDetectionTime = detectionTime; proxDetected = 0x1; } } if(proxDetected == 0x1 && detectionCountFast == 1 && detectionCountSlow == 1) { setEyesColor(white); int x = random(1,2); if(x == 2) { move3Servos(servoLeg,centerLeg,servoWaste,1000,servoHead,centerHead,0.05); delay(1000); move3Servos(servoLeg,centerLeg,servoWaste,centerWaste,servoHead,centerHead,0.05); } else { move3Servos(servoLeg,1850,servoWaste,1000,servoHead,centerHead,0.05); delay(1000); move3Servos(servoLeg,centerLeg,servoWaste,centerWaste,servoHead,centerHead,0.05); } proxDetected = 0x0; lastAction = millis(); } else if (proxDetected == 0x1 && detectionCountFast == 2 && detectionCountSlow == 1) { setEyesColor(orange); move3Servos(servoLeg,1700,servoWaste,900,servoHead,centerHead,0.05); delay(1000); move3Servos(servoLeg,centerLeg,servoWaste,centerWaste,servoHead,centerHead,0.08); proxDetected = 0x0; lastAction = millis(); } else if(proxDetected == 0x1 && detectionCountFast == 3 && detectionCountSlow == 1) { setEyesColor(red); move3Servos(servoLeg,centerLeg,servoWaste,800,servoHead,1580,0.08); move3Servos(servoLeg,centerLeg,servoWaste,800,servoHead,730,0.3); move3Servos(servoLeg,centerLeg,servoWaste,800,servoHead,1580,0.3); move3Servos(servoLeg,centerLeg,servoWaste,800,servoHead,centerHead,0.3); delay(1000); move3Servos(servoLeg,centerLeg,servoWaste,centerWaste,servoHead,centerHead,0.05); dimmer(10,255,255,0,0,3,3); dimmer(10,255,255,0,0,3,3); delay(2000); setEyesColor(white); proxDetected = 0x0; lastAction = millis(); } else if(proxDetected == 0x1 && detectionCountFast == 1 && detectionCountSlow == 2) { setEyesColor(magenta); delay(500); move3Servos(servoLeg,centerLeg,servoWaste,1500,servoHead,centerHead,0.03); move3Servos(servoLeg,centerLeg,servoWaste,1300,servoHead,1580,0.05); move3Servos(servoLeg,centerLeg,servoWaste,centerWaste,servoHead,750,0.05); move3Servos(servoLeg,1100,servoWaste,centerWaste,servoHead,1900,0.5); delay(1000); setEyesColor(black); delay(100); setEyesColor(magenta); delay(800); setEyesColor(black); delay(80); setEyesColor(magenta); delay(2000); proxDetected = 0x0; lastAction = millis(); } else if(proxDetected == 0x1 && detectionCountFast == 1 && detectionCountSlow == 3) { setEyesColor(yellow); move3Servos(servoLeg,centerLeg,servoWaste,centerWaste,servoHead,centerHead,0.05); move3Servos(servoLeg,670,servoWaste,centerWaste,servoHead,2300,0.09); move3Servos(servoLeg,2300,servoWaste,centerWaste,servoHead,600,0.09); delay(1000); move3Servos(servoLeg,2300,servoWaste,800,servoHead,600,0.05); move3Servos(servoLeg,2300,servoWaste,1250,servoHead,600,0.05); delay(700); setEyesColor(blueMar); move3Servos(servoLeg,centerLeg,servoWaste,centerWaste,servoHead,centerHead,0.05); move3Servos(servoLeg,2300,servoWaste,centerWaste,servoHead,600,0.1); move3Servos(servoLeg,670,servoWaste,centerWaste,servoHead,2300,0.1); delay(1000); move3Servos(servoLeg,centerLeg,servoWaste,centerWaste,servoHead,centerHead,0.05); rainbow(20); move3Servos(servoLeg,centerLeg,servoWaste,1520,servoHead,centerHead,0.01); setEyesColor(white); proxDetected = 0x0; lastAction = millis(); } # 370 "oiOSoul.ino" } void sneeze() { move3Servos(servoLeg,centerLeg,servoWaste,900,servoHead,centerHead,0.04); setEyesColor(black); move3Servos(servoLeg,centerLeg,servoWaste,1500,servoHead,centerHead,0.3); move3Servos(servoLeg,centerLeg,servoWaste,1150,servoHead,centerHead,0.3); rainbowCycle(2); move3Servos(servoLeg,centerLeg,servoWaste,centerWaste,servoHead,centerHead,0.05); setEyesColor(white); } void doseOff() { dimmer(10,255,35,0,135,2,25); move3Servos(servoLeg,centerLeg,servoWaste,1400,servoHead,centerHead,2.0); delay(1500); move3Servos(servoLeg,centerLeg,servoWaste,1700,servoHead,1000,2.0); delay(1500); move3Servos(servoLeg,centerLeg,servoWaste,1850,servoHead,1000,2.0); delay(4000); move3Servos(servoLeg,centerLeg,servoWaste,1070,servoHead,centerHead,0.1); setEyesColor(black); delay(500); setEyesColor(nightBlue); delay(500); move3Servos(servoLeg,centerLeg,servoWaste,1070,servoHead,1000,0.08); setEyesColor(black); delay(300); setEyesColor(nightBlue); delay(300); move3Servos(servoLeg,centerLeg,servoWaste,1070,servoHead,centerHead,0.08); setEyesColor(black); delay(200); setEyesColor(nightBlue); delay(5000); move3Servos(servoLeg,1200,servoWaste,1060,servoHead,1500,0.02); dimmer(10,255,35,0,135,2,25); setEyesColor(black); move3Servos(servoLeg,1200,servoWaste,1400,servoHead,1500,3.0); delay(1500); move3Servos(servoLeg,1200,servoWaste,1600,servoHead,1500,3.0); delay(1500); for(int i=1600;i<=2300;i+=2){ servoWaste.writeMicroseconds(i); delay(100); } setEyesColor(black); while(0x1){ sound = digitalRead(8); if (sound == 0x1) { delay(100); if (sound == 0x1) { move3Servos(servoLeg,centerLeg,servoWaste,1070,servoHead,centerHead,0.1); rainbowCycle(5); break; } } } } void move3Servos(Servo servo1Name, float target_pos1,Servo servo2Name, float target_pos2,Servo servo3Name, float target_pos3,float easing){ target_pos1 = ((target_pos1)<(600)?(600):((target_pos1)>(2400)?(2400):(target_pos1))); target_pos2 = ((target_pos2)<(600)?(600):((target_pos2)>(2400)?(2400):(target_pos2))); target_pos3 = ((target_pos3)<(600)?(600):((target_pos3)>(2400)?(2400):(target_pos3))); easing = ((easing)<(0.0)?(0.0):((easing)>(5.0)?(5.0):(easing))); float current_pos1 = servo1Name.readMicroseconds(); float current_pos2 = servo2Name.readMicroseconds(); float current_pos3 = servo3Name.readMicroseconds(); float diff1; float diff2; float diff3; while(0x1){ diff1 = target_pos1 - current_pos1; diff2 = target_pos2 - current_pos2; diff3 = target_pos3 - current_pos3; if( fabs(diff1) > 5.0 ) { if(easing <= 1.00) current_pos1 += diff1 * easing; else { if(diff1 > 0.0) current_pos1 += easing; else current_pos1 -= easing; } servo1Name.writeMicroseconds( (int)current_pos1 ); } if( fabs(diff2) > 5.0 ) { if(easing <= 1.00) current_pos2 += diff2 * easing; else { if(diff2 > 0.0) current_pos2 += easing; else current_pos2 -= easing; } servo2Name.writeMicroseconds( (int)current_pos2 ); } if( fabs(diff3) > 5.0 ) { if(easing <= 1.00) current_pos3 += diff3 * easing; else { if(diff3 > 0.0) current_pos3 += easing; else current_pos3 -= easing; } servo3Name.writeMicroseconds( (int)current_pos3 ); } else if(fabs(diff1)<=5.0 && fabs(diff2) <=5.0 && fabs(diff3) <=5.0){ break; } delay(15); } } void rainbow(uint8_t wait) { uint16_t i, j; for(j=0; j<256; j++) { for(i=0; i=a;i--){ strip.setPixelColor(0, (i*red/255) , (i*green/255), (i*blue/255)); strip.setPixelColor(1, (i*red/255) , (i*green/255), (i*blue/255)); strip.show(); delay(stepSpeed); } break; case 3: for(int i=a;i<=b;i++){ strip.setPixelColor(0, (i*red/255) , (i*green/255), (i*blue/255)); strip.setPixelColor(1, (i*red/255) , (i*green/255), (i*blue/255)); strip.show(); delay(stepSpeed); } for(int i=b;i>=a;i--){ strip.setPixelColor(0, (i*red/255) , (i*green/255), (i*blue/255)); strip.setPixelColor(1, (i*red/255) , (i*green/255), (i*blue/255)); strip.show(); delay(stepSpeed); } break; } } void setEyesColor(uint32_t color) { strip.setPixelColor(0,color); strip.setPixelColor(1,color); strip.show(); }