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
byte ccCode[16]={0x3F,0x06,0x5B,0x4F,0x66,0x6D,0x7D,0x07,0x7F,0x6F,0x77,0x7C,0x39,0x5E,0x79,0x71}; | |
byte counter=0; | |
void setup() | |
{ | |
//setting direction of PORTB & partial PORTD registers | |
DDRB=B00111111; | |
DDRD=B11000001; | |
pinMode(3,INPUT_PULLUP); | |
digitalWrite(0,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
void setup() | |
{ | |
pinMode(3,INPUT_PULLUP); | |
pinMode(13,OUTPUT); | |
} | |
void loop() | |
{ | |
//the following block of code will check a NO button switch for press & release | |
//---------------------------------------------------------------------------------- |
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 toEvenOdd(numList): | |
""" | |
list: list containing number | |
return: two lists. first containing even numbers, second containing odd | |
numbers | |
""" | |
evenList=[] #will contain the even numbers after next iterative part | |
oddList=[] #will contain the odd numbers after next iterative part |
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
background="******************\n******************\n☺\n******************\n******************" | |
i = 1 #to keep track where the user is in the "woods" | |
n='right' | |
while n=='right' or i>0: | |
print(background) | |
n=input("you are in the lost woods, What do you do?\nGo left or right?(type in)\n") | |
if n=='right': |