How can I have two variables for a if...else sequence? For example I have a buttons and a LED, the LED needs to be lit when I press the button in order for something to happen. If one or the other reqirement is not met, the action is not performed. How can I achieve this?
I tryed googling this and for some reason there wasn't an answer.
Edit(after suggestion of posting whole script);
Im currently working with some neopixels, Im still working on the exact way of getting information from the neopixel itself however I think this is how I should do it according to the other replys
//FYI "strip" is the neopixel strip, the following number if information about which pixels on the neopixel to light up
//pinMode is the button
if(strip==4, 255, 0, 0 && pinMode==HIGH){
strip.setPixelColor(5, 0, 0, 255)//lights up another pixel on neopixel to show that sequence is done
strip.show();
Im currently working with some neopixels, Im still working on the exact way of getting information from the neopixel itself however I think this is how I should do it according to the other replys
//FYI "strip" is the neopixel strip, the following number if information about which pixels on the neopixel to light up
//pinMode is the button
if(strip==4, 255, 0, 0 && pinMode==HIGH){
strip.setPixelColor(5, 0, 0, 255)//lights up another pixel on neopixel to show that sequence is done
strip.show();
It debugs and gives me these two statements:
40:14 error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
and
41:17 note: in expansion of macro 'HIGH'
You should follow some valid learning process. That is one of many. But you used pinMode() already in your sketch, so it should raise a red flag. It seems like you didn't bother to look at any examples or documentation, instead tried to guess.