Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1.
- void setup() {
- pinMode(9, OUTPUT);
- for(int j=0; j<7; j++){
- for(int i=255; i>=0; i--){
- analogWrite(9, i);
- delay(30);
- }
- }
- }
- void loop() {
- // put your main code here, to run repeatedly:
- }
- 2.
- void setup() {
- for(int i=255; i>=0; i--){
- analogWrite(9, i);
- tone(2, i+500, 30);
- delay(30);
- }
- for(int i=0; i<=255; i++){
- analogWrite(9, i);
- tone(2, i+500, 30);
- delay(30);
- }
- }
- void loop() {
- // put your main code here, to run repeatedly:
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement