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
void setup() | |
{ | |
for (int i = 1; i < 9; i++) | |
{ | |
pinMode(i, 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
void setup() | |
{ | |
pinMode(12, OUTPUT); | |
pinMode(2, INPUT_PULLUP); | |
} | |
int button; | |
int last_button; | |
int led = LOW; | |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <cs50.h> | |
#include <time.h> | |
#define DECK_SIZE 52 | |
// strings for pretty printing values | |
string ranks[] = {"", "A", "2", "3", "4", "5", "6", | |
"7", "8", "9", "10", "J", "Q", "K"}; |
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 <stdbool.h> | |
#include <cs50.h> | |
bool push(char *item); | |
char *pop(void); | |
bool is_empty(void); | |
bool is_full(void); |
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
void setup() | |
{ | |
pinMode(12, OUTPUT); | |
pinMode(2, INPUT_PULLUP); | |
pinMode(4, INPUT_PULLUP); | |
} | |
int led = LOW; | |
int button_right; | |
int last_button_right; |
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 A = 7; | |
int B = 8; | |
int C = 9; | |
int D = 10; | |
int E = 11; | |
int F = 12; | |
int G = 13; | |
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
int A = 7; | |
int B = 8; | |
int C = 9; | |
int D = 10; | |
int E = 11; | |
int F = 12; | |
int G = 13; | |
byte digits[] = {126, 48, 109, 121, 51, | |
91, 95, 112, 127, 123}; |
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> | |
typedef struct node | |
{ | |
int value; | |
struct node *next; | |
} node; | |
node *list = NULL; |
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 A = 7; | |
int B = 8; | |
int C = 9; | |
int D = 10; | |
int E = 11; | |
int F = 12; | |
int G = 13; | |
byte digits[] = {126, 48, 109, 121, 51, | |
91, 95, 112, 127, 115}; |
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 <LiquidCrystal.h> | |
// initialize the library with the numbers of the interface pins | |
LiquidCrystal lcd(12, 11, 5, 4, 3, 2); | |
byte Alien[] = { | |
B11111, | |
B10101, | |
B11111, | |
B11111, |