Pages: 1 [2]   Go Down
Author Topic: Need some pointers on some code  (Read 667 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks a mill

This littel setup I have here seems to work pretty well.. it never seem to miss a step when I move the potentiometer and the only
thing it has a problem( apart from the fade function) is the bounce when I push the switch....Im still busy looking at how to programe the debounce in so iv lifted the delay for now.

Iv seen some arrays where they look somthing like this ( 0,1,0,0,1,1,1) tryed to change it here but no luck. will go thru the array tutorial a bit more.
Logged

Seattle, WA USA
Online Online
Brattain Member
*****
Karma: 547
Posts: 45986
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Also seems to complain about sensorReading now which it had no problem with before I added this new function in.
The compiler either complains, or it doesn't. There is nothing ambiguous about it.

Your collection of if statements should be if/else if statements. There should be no overlap between one block's condition and another block's condition, so only one block should ever be executed, so if/else if/else if is more appropriate than if/if/if.

I agree wholeheartedly with the comment that you need to use Tools + Auto Format. Putting each { on a new line might help you see the program structure better, too. It certainly does for me.

If "seems to" should be "does", post the whole code and the exact error message.
Logged

Pages: 1 [2]   Go Up
Jump to: