Hi guys, I'm slowly getting an understanding of arduino and the neopixels, I'm planning on using them as ceiling lights in my camper van.
I'm getting comfortable with editing the code to achieve the effects I want, but I would like to be able to move to the next 'effect' within the sketch using a push button as opposed to the wait command.
So in effect the code would loop until it sees input from the button, then move on..seems really simple, I just can't find the right command.
Any advice greatly received.
Cheers, Nik..
Absolute Newb.. easy coding query
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_bill
- Posts: 88086
- Joined: Sat Feb 07, 2009 10:11 am
Re: Absolute Newb.. easy coding query
Have you got the button wired up yet? Lesson 6 shows how: https://learn.adafruit.com/adafruit-ard ... tal-inputs
To wait for a button press:
To wait for a button press:
Code: Select all
while(digitalRead(buttonPin) == HIGH); // this will loop until the button is pressed
- an1mal_69
- Posts: 3
- Joined: Fri Sep 05, 2014 5:48 am
Re: Absolute Newb.. easy coding query
Excellent..much obliged Bill!!
Please be positive and constructive with your questions and comments.