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 ledPin = 9; | |
int potPin = A2; // select the input pin for the potentiometer | |
int val = 0; // variable to store the value coming from the sensor | |
int seed = 92; | |
void setup() { | |
Serial.begin(9600); | |
pinMode(ledPin, OUTPUT); | |
} | |
void loop() { |
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 latchPin = 2; //pin 12 on the 595 | |
int dataPin = 3; //pin 14 on the 595 | |
int clockPin = 4; //pin 11 on the 595 | |
//D1 = 256, D2 = 512, D3 = 1024, D4 = 2048 | |
int D1 = 3584; | |
int D2 = 3328; | |
int D3 = 2816; | |
int D4 = 1792; |
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
// assigning arduino digital pins for the various led display pins | |
int pinA = 3; | |
int pinB = 7; | |
int pinC = 12; | |
int pinD = 10; | |
int pinE = 9; | |
int pinF = 4; | |
int pinG = 13; | |
int pinDP = 11; // the decimal point pin | |
int D1 = 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
int LED = 9; //pin for the LED | |
int BUTTON = 7; //pin for the BUTTON | |
int val = 0; //stores state of the pin | |
int old_val = 0; //stores previous state of the pin | |
int state = 0; | |
int brightness = 128; //stores brightness value | |
int old_b = 127; | |
unsigned long startTime = 0; //when did we begin pressing? | |
void setup() |
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> | |
int main (void) | |
{ | |
printf("Hello world!"); | |
return 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
// Example 01 : Blinking LED | |
const int LED = 13; // LED connected to digital pin 13 | |
void setup () | |
{ | |
pinMode(LED, OUTPUT); //sets the digital pin as output |