This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
As the title says, for my project I am building an interactive sunflower that plays music when there's light and stops when there's none. I found a neat code for a song but I don't know how to integrate it into my code.
I tried
void playsong(){
song code goes here}
before my loop
and then:
if (value1 > 0 && value1 <= 200) {
analogWrite (LED, 255);
playsong( );
}
else if (value1 > 200 && value1 < 255) {
analogWrite (LED, 255);
delay (1000);
analogWrite (LED, 0);
delay (1000);
}
else {
analogWrite (LED, 0);
}
What am I doing wrong? plz help.
Subreddit
Post Details
- Posted
- 3 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/arduino/com...