Go Down

Topic: Weird glitchy stuff (Read 3778 times) previous topic - next topic

Grumpy_Mike

No come on, you are starting to piss me off here. Why don't you apply one single bit of thinking to your problems.

At the moment you have a line that says:-
Code: [Select]
if ( ! digitalRead(buttonInt) ) return;
and you want to return if another different button is pressed.
So you have the same line again only looking at the different button, or you use the logic OR function || and combine to looks at the button into one line.

There comes a time when hand holding turns into a dependent situation. Are you going to just have a knee jerk reaction to everything you don't immediately understand? At the end of the day you are trying to develop some skills, every one starts out with zero knowledge and it is fine to ask, but to ask repeatedly without even thinking about it is not good.

niekwoo10

i used that exact code yesterday with a if statement at the top of fade() but it just immediately went to the other function.. Anyways, as soon as i see my dad (and his present) again i will try to fix it.

Grumpy_Mike

Did you remember the ! and did you wire the button the same as the first one?

niekwoo10

Yes, that's the strange thing. It was a different button though. Maybe i should connect the button to my regular Arduino and test if the button works.

Go Up