Codeslinger
@codeslinger
Member
Joined: 2019-12-31 2:59 pm
Last seen: 2023-08-20 11:25 pm
Topics: 2 / Replies: 28
Reply
RE: Arduino .h file vs .h and .cpp files

@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...

1 year ago
Forum
Reply
RE: Arduino .h file vs .h and .cpp files

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...

1 year ago
Forum
Reply
RE: What is Error" n does not name a type" ?

@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...

2 years ago
Forum
Reply
RE: What is Error" n does not name a type" ?

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...

2 years ago
Forum
Reply
RE: Use hardware interrupt to read a 5 button switch (DAOKI 5 button board)

@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...

2 years ago
Forum
Reply
RE: Use hardware interrupt to read a 5 button switch (DAOKI 5 button board)

@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...

2 years ago
Forum
Reply
RE: Use hardware interrupt to read a 5 button switch (DAOKI 5 button board)

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...

2 years ago
Forum
Reply
RE: Use hardware interrupt to read a 5 button switch (DAOKI 5 button board)

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...

2 years ago
Forum
Reply
RE: INA 260, trouble with an if statement

@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 ‘)’...

3 years ago
Forum
Reply
RE: INA 260, trouble with an if statement

@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...

3 years ago
Forum
Reply
RE: INA 260, trouble with an if statement

@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...

3 years ago
Forum
Reply
RE: INA 260, trouble with an if statement

@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 ...

3 years ago
Forum
Reply
RE: INA 260, trouble with an if statement

@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 ...

3 years ago
Forum
Reply
RE: Ohm Meter

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...

3 years ago
Forum
Page 1 / 2