Created
July 17, 2023 02:26
-
-
Save Sarverott/b6b4991055e540a7ce923403a67ac58f to your computer and use it in GitHub Desktop.
project for digispark with Atmel ATTiny85, makes random noise, every pin (0-5) have to be conected with speaker or piezo
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 randomSound, delayPeriod; | |
void setup() { | |
} | |
void loop() { | |
delayPeriod=random(1,10); | |
for(int pin=0;pin<6;pin++){ | |
randomSound=random(20,1000); | |
noTone(pin); | |
tone(pin, randomSound, delayPeriod); | |
} | |
delay(delayPeriod); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment