Buttons instead of keypad

I've been working on this for a bit and I'm really close. The operation is functioning how I want it, except, I want you use arcade style buttons to toggle the control points, instead of the "C" and "D" buttons on the key pad. I have a void set up for the function declaration for "C" and "D", but I'd rather use buttons. I cant seem to wrap my brain around how to separate out the 'void keypadevent' and still have the switching necessary for the true and false portion of the function. I'm sure its something very simple...but I just can't see it.

Any ideas?

sketch_feb04a.ino (16.3 KB)

I have a void set up

The digitalRead() function returns an int. Would you refer to that function as an int? Of course not. So, why do you refer to functions that return nothing as voids? They are FUNCTIONS!

ok...a function. Thanks for the input.

I cant seem to wrap my brain around how to separate out the 'void keypadevent' and still have the switching necessary for the true and false portion of the function. I'm sure its something very simple...but I just can't see it.

It is not so simple. The keypadEvent function is NOT one that you call. You need to write a function AND call it, to take the place of the keypadEvent function.

You also need to get rid of the goto statements and labels. The Arduino is NOT programmed in Basic. Big boys do not need goto statements.

Perfect, figured it out. It was just that simple. Wasn't looking at it like that. I like my Basic and goto's, thanks.