Skip to content

Instantly share code, notes, and snippets.

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);
@niloy-barua
niloy-barua / gist:c06efddb850ede5e90e2216d8f507aee
Created May 18, 2017 15:01
Arduino : Switch Press&Release
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
//----------------------------------------------------------------------------------
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
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':