Questions tagged [header]
7 questions
3
votes
1 answer
What is the logic behind Arduino inlining `HardwareSerial::_rx_complete_irq()` for receiving serial data (but NOT `_tx_udr_empty_irq()`)?
Q: What is the logic behind Arduino inlining HardwareSerial::_rx_complete_irq() for receiving serial data (but NOT _tx_udr_empty_irq()), and when is it advisable?
From the bottom of the HardwareSerial class in HardwareSerial.h:
// Interrupt handlers…
Gabriel Staples
- 1,319
- 11
- 27
1
vote
1 answer
Setting pinmode() in header file
I am trying to have a header file to handle all my pin definitions and pinmodes.
This is the header:
#ifndef __HEADER_TESTER__
#define __HEADER_TESTER__
#include
const byte rxPin = 2;
const byte txPin = 3;
SoftwareSerial…
user1584421
- 1,349
- 3
- 19
- 32
1
vote
1 answer
Using functions in header files
I want to include a function in my sketch I moved to a .h file.
I did it as follows:
My code:
#include "header.h"
void setup() {
fct();
}
void loop() {
}
My header:
#include "Arduino.h"
#ifndef MYHELPERS_H
#define MYHELPERS_H
void fct() {
//…
Spyro 999
- 19
- 3
1
vote
2 answers
What are patterns of bits sent to or read from GPIO pins called?
I want to call them “words”, but I’m uncertain if this is how they are referred to in documentation for the use of a header board that might plug into an ardino board.
So if you have a sequence of ONs and OFFs being read or sent from a…
leeand00
- 113
- 6
0
votes
2 answers
Odd behavior of defines - is this Arduino specific and how does it work?
A question I have long had regards an interaction between #define statements and a library header include. I've seen several Arduino libraries use this rather convenient configuration system where you can write a #define statement, then include the…
RDragonrydr
- 338
- 4
- 15
0
votes
1 answer
variable or field declared void Error
For a larger sketch, I have separated a chunk of code in a separate .cpp file
#include "msg.h"
#include
#include
#include
void parseResponse(String &payload, float &temp, float &wind, int &pressure, int…
Zaffresky
- 183
- 1
- 13
0
votes
3 answers
cannot open source file "WProgram.h" in VSCode
So I started typing out this question, but in the process of taking screenshots and looking up sources for the question I figured out the answer :P
That said, this problem has been a snag for me for a while and I've asked multiple people about it…
Chris Schmitz
- 357
- 4
- 13