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
import string | |
import random | |
def generate(length=35, digits_count=5, upper_count=5, special_count=5): | |
lower_count = max(0, length - digits_count - upper_count - special_count) | |
digits = random.sample(string.digits, digits_count) | |
specials = random.sample(string.punctuation, special_count) | |
upper = random.sample(string.ascii_uppercase, upper_count) |
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 = 13; | |
//led for visualization (use 13 for built-in led) | |
int speakerPin = 11; | |
//speaker connected to one of the PWM ports | |
#define c 261 | |
#define d 294 | |
#define e 329 | |
#define f 349 |