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
void setup() { | |
Serial.begin(9600); | |
pinMode(6,OUTPUT); | |
pinMode(7,OUTPUT); | |
digitalWrite(6, LOW); | |
digitalWrite(7,LOW); | |
} |
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
/* | |
* UML shield | |
* Test code for | |
* array of LED's connected to digital I/O pins 2, 3, 4, 5, and 6 | |
* test LED connected to digital I/O pin 13 | |
* common cathode RGB LED connected to digital I/O pins 9, 10, and 11 | |
* | |
* Board configuration: Jumper JP3 closed | |
*/ |
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
int d = 5; | |
int count = 0; | |
void setup() { | |
Serial.begin(9600); | |
Serial.println(count); | |
// coil 1 | |
pinMode(11,OUTPUT); // enable pin for coil 1 |
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
/* | |
* UML shield | |
* Test code for array of LED's connected to digital I/O pins | |
* 2, 3, 4, 5, and 6 | |
* | |
* Board configuration: Jumper JP3 closed | |
*/ | |
// Create a six element integer array for the pin numbers |
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
// The UML shield has 6 LEDs which can be used to display 6 bits of data | |
// The highest binary number that can be represented is 111111 which is the | |
// integer value 63. | |
int binValue[] = {0,0,0,0,0,0}; | |
int ledArray[] = {2,3,4,5,6,7}; | |
int val = 0; | |
void setup() { | |
Serial.begin(9600); |
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
int ledPins[]={2,3,4,5,6,7}; | |
int vol = 0; | |
void setup() { | |
for(int i=0; i < 6; i=i+1){ | |
pinMode(ledPins[i],OUTPUT); | |
digitalWrite(ledPins[i],LOW); | |
} | |
Serial.begin(9600); |
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
int ledPins[]={2,3,4,5,6,7}; | |
void setup() { | |
for(int i=0; i < 6; i=i+1){ | |
pinMode(ledPins[i],OUTPUT); | |
} | |
} |
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
/* | |
* Having used the sketch IRrecvDemo from the IRremote library to | |
* determine the codes for four buttons on a remote, this code will | |
* now "listen" for these codes and control LEDs based upon what code | |
* has been received. | |
*/ | |
#include <IRremote.h> |
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
/* This example employs Timer1 to blink one of three LEDs. The timer is initialized and called | |
during the setup() function which repeatedly calls a function that alternately flashes the | |
other two LEDs. The timer function continues without interruption when the loop operates. | |
*/ | |
#include <TimerOne.h> | |
// This example uses the timer interrupt to blink an LED | |
// This allows the main program to do "other stuff" |
NewerOlder