/
README
59 lines (42 loc) · 1.56 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
MAX1284 Multiple TX to emoncms
------------------------------
For the MAX1284 Internet Gateway http://max1284.homelabs.org.uk/
Receives data from multiple TinyTX sensors and/or emonTX and uploads to an emoncms server
Optional feature to gets NTP time every so often and transmit for remote GLCD displays
By Nathan Chantrell. http://zorg.org/
Licenced under GNU GPL V3
Based on emonbase multiple emontx example for ethershield by Trystan Lea and Glyn Hudson at OpenEnergyMonitor.org
Requires modification to Jeelib library as follows or use version here: https://github.com/nathanchantrell/jeelib
In RF12.cpp
Add new pin definitions for the MAX1284:
#elif defined(__AVR_ATmega1284P__)
#define RFM_IRQ 2 // The PIN the IRQ is on
#define RFM_IRQ_NO 2 // The IRQ number
#define SS_DDR DDRC
#define SS_PORT PORTC
#define SS_BIT 5
#define SPI_SS 4 // PB4, pin 5
#define SPI_MOSI 5 // PB5, pin 6
#define SPI_MISO 6 // PB6, pin 7
#define SPI_SCK 7 // PB7, pin 8
AND CHANGE:
#else
if ((nodeid & NODE_ID) != 0)
attachInterrupt(0, rf12_interrupt, LOW);
else
detachInterrupt(0);
#endif
TO:
#else
#if RFM_IRQ_NO // If IRQ number is defined use that, if not use IRQ0
if ((nodeid & NODE_ID) != 0)
attachInterrupt(RFM_IRQ_NO, rf12_interrupt, LOW);
else
detachInterrupt(RFM_IRQ_NO);
#else
if ((nodeid & NODE_ID) != 0)
attachInterrupt(0, rf12_interrupt, LOW);
else
detachInterrupt(0);
#endif
#endif