SIDEBAR
»
S
I
D
E
B
A
R
«
Arduino Libraries

Sometimes it is a real hassle to track down all the different arduino libraries so I have started to following list.

  1. Arduino DHCP Library v0.4

Custom Library Notes:

Passing a serial port to a class constructor dynamically.

1
2
3
4
5
6
7
8
9
10
11
12
13
#include <HardwareSerial.h>

class SomeClass {
public:
SomeClass(HardwareSerial *serialToUse);
private:
HardwareSerial *_port;
}

SomeClass::SomeClass(HardwareSerial *serialToUse) {
// save the port in the class.
this->_port = serialToUse;
}

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>


9 × = fifty four

%d bloggers like this: