Quote:
Originally Posted by apalrd
I don't see any reason it wouldn't work if you capitalize variable names. In fact, I highly recommend using some sort of mixed case or underscores to separate words in variables for readability.
I personally am a fan of capitalizing the first letter of a variable name to indicate it is a variable, and naming all macros in all capitals with underscores separating words to differentiate them.
|
Quote:
Originally Posted by Kevin Sevcik
Agreed that capitalization won't change anything. Rearranging deck chairs on the Titanic, that is. I think the C++ convention of variables starting with lower case letters is to distinguish them from classes and functions with start with uppercase letters. Though this may be Java, which has the opposite standard, I think.
|
I've ran into weird errors with Java when the leading character isn't a lowercase letter, hence my suggestion.
Quote:
Originally Posted by Kevin Sevcik
I think your reset and start calls need to be in the other order. I'd also suggest putting an extra println in your loop just to make sure you're actually getting into the loop and all that. Possibly with an increment just for kicks.
|
I don't believe there's any problem with the order of the reset() and start() calls, as start() initializes the accumulator, and reset() just resets the count to 0 - one does not affect the other.
Quote:
Originally Posted by Kevin Sevcik
I'd also recommend checking the outputs with a multimeter just to make sure that's not the problem... It's super easy to accidentally fry an output with static, so don't assume that it's still working fine just because it used to. Trust, but verify.
|
He did say that the encoder worked fine on an Arduino.