This file contains hidden or 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
| /* OctoWS2811 BasicTest.ino - Basic RGB LED Test | |
| http://www.pjrc.com/teensy/td_libs_OctoWS2811.html | |
| Copyright (c) 2013 Paul Stoffregen, PJRC.COM, LLC | |
| Permission is hereby granted, free of charge, to any person obtaining a copy | |
| of this software and associated documentation files (the "Software"), to deal | |
| in the Software without restriction, including without limitation the rights | |
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| copies of the Software, and to permit persons to whom the Software is | |
| furnished to do so, subject to the following conditions: |
This file contains hidden or 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
| double a = 2; | |
| double b = 16; | |
| /* | |
| println b**2.minus(a**2); | |
| println b**2 - a**2; | |
| double x = a**2; | |
| double y = b**2; | |
| double z = y-x; | |
| double result = z/Math.log(2); | |
| double newresult = ((b/a)**2)/2 |
This file contains hidden or 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 foo(closure) { | |
| println closure.maximumNumberOfParameters | |
| println closure.parameterTypes | |
| } | |
| foo { e -> println e} | |
| foo { int a, double b -> println "$a, $b"} | |
| def greet = { name -> println "${toUpperCase()} $name" } |
This file contains hidden or 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
| /* Read from the Macetech Shifty VU shield and write value to serial | |
| adapted from http://docs.macetech.com/doku.php/rusty_vu | |
| */ | |
| /* Arduino Uno analog pins (from hardware/arduino/variants/standard/pins_arduino.h) | |
| 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; |
This file contains hidden or 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
| /* | |
| * RGB_LEDs sketch | |
| * RGB LEDs driven from analog output ports | |
| */ | |
| const int redPin = 3; // choose the pin for each of the LEDs | |
| const int greenPin = 5; | |
| const int bluePin = 6; | |
| const int redPin2 = 11; // choose the pin for each of the LEDs |
This file contains hidden or 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
| /* From the Rusty VU project http://docs.macetech.com/doku.php/rusty_vu */ | |
| #define clockpin 13 // CI | |
| #define enablepin 10 // EI | |
| #define latchpin 9 // LI | |
| #define datapin 11 // DI | |
| #define NumLEDs 1 | |
| int LEDChannels[NumLEDs][3] = {0}; |
This file contains hidden or 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
| #define clockpin 13 // CI | |
| #define enablepin 10 // EI | |
| #define latchpin 9 // LI | |
| #define datapin 11 // DI | |
| #define NumLEDs 1 | |
| int LEDChannels[NumLEDs][3] = {0}; | |
| int SB_CommandMode; | |
| int SB_RedCommand; |
This file contains hidden or 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
| #define clockpin 13 // CI | |
| #define enablepin 10 // EI | |
| #define latchpin 9 // LI | |
| #define datapin 11 // DI | |
| #define NumLEDs 1 | |
| int LEDChannels[NumLEDs][3] = {0}; | |
| int SB_CommandMode; | |
| int SB_RedCommand; |
This file contains hidden or 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
| // Test sketch for El Escudo Dos | |
| // Turn each EL channel (A-H) on in sequence and repeat | |
| // Mike Grusin, SparkFun Electronics | |
| void setup() { | |
| // The EL channels are on pins 2 through 9 | |
| // Initialize the pins as outputs | |
| pinMode(2, OUTPUT); // channel A | |
| pinMode(3, OUTPUT); // channel B | |
| pinMode(4, OUTPUT); // channel C |