Last seen: 2023-08-20 11:25 pm
@inq There is another reason to have only the minimum amount to support the interface in the .h file instead of the entire implementation. When you pu...
Putting executable code into the .h file is a bad idea and not best practice. Firstly, as mentioned already, the code is compiled every time the .h f...
@will I screwed up and referenced the wrong person as the responder before. i should have said that I was expanding on your reply. I was trying to p...
To expand on what @barrie said, the declaration of n, if you intend it to be global, should be before setup. As the code currently exists, steup cann...
@inq No, I was not taking it personally. I was more reacting to your apparent brush-off of the advice as just something that everybody says. I did s...
@inq The problem with "try it, abuse it and see if bad behavior erupts." is that you are setting yourself up for something bad to happen when you leas...
No, my point is that the read should not be in th ISR. In this particular case, the only info to pass on is that the interrupt happened. Set a volat...
Not a good idea to do any I/O inside the ISR. This can cause other interrupt driven events to be delayed or missed entirely. The mantra of writing i...
@frogandtoad You're right. I ran a test with th g++ compiler on my desktop and got an error message: "error: expected primary-expression before ‘)’...
@zander No, read the C or C++ language standard. There you will discover that false (all caps is NOT the language keyword) is defined as zoro and tru...
@ronbentley1 if the variable being checked is already declared as a boolean, then it is already either true or false and can be evaluated as such dire...
@frogandtoad NEVER compare a value or experssion to true or false. If X is a value or expression then the proper form is if( X ) // check if X is ...
@yurkshirelad The empty condition is fine. The problem is that there are one left paren and two right parens. The second should not be there. That ...
learnelectronics did a series of videos on this a while back. The videos, in order are I was playing with a design myself after seeing the...