aboutsummaryrefslogtreecommitdiff
path: root/arduino_nano/main.h
blob: 0b91aa5e66af960f4546815910e8892ea35fb4a1 (plain)
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
/* This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 */
/* Copyright (c) 2015 King Kévin <kingkevin@cuvoodoo.info> */
/* the spark counter transmits electricity measurements over radio
 * the electricity measurements (voltage, current, power, energy) are query everry second from a peacefair PZEM-004 power meter
 * they are then transmitted using an nRF2L01+ transceiver
 */
 
/* spark counter configuration */
struct configuration {
	uint8_t rx_addr[5]; // nRF24 receiving address
	uint8_t tx_addr[5]; // nRF24 transmit address
	uint8_t channel; // nRF24 channel
	uint8_t request_period; // how many seconds between power meter requests
};
struct configuration conf = {{1,'h','o','m','e'},{0,'h','o','m','e'},42,5};