-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsketch.cpp
69 lines (53 loc) · 2.03 KB
/
sketch.cpp
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
58
59
60
61
62
63
64
65
66
67
68
69
/*
Copyright (C) 2014-2015 F1RMB, Daniel Caujolle-Bert <[email protected]>
Copyright (C) 2014 Lee Wiggins <[email protected]>
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 2
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, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include <Arduino.h>
#include "aDCLoad.h"
/*
Version Control
1.00
Initial upload
1.10
* Fixed an error in the set current function of the DAC
* Added improved current calculation to allow for correction in OP-AMP offset, uses the measured value to adjust the set current.
* General code tidy up
2.0
* full rewrite, using C++. Lot of bug fixes, lot of new features.
* size of the hex should be:
* text data bss dec hex filename
* 30884 206 506 31596 7b6c output/sketch.elf
To - Dos
* Display in engineering units, ie. mA and mW.
*/
/**
* !!!!! BIG FAT WARNING !!!!!
* Should be compiled with "-Os" flag.
* Bootloader couldn't be flashed, ISP programming ONLY
* -=- use Code::Blocks or the included Makefile to compile -=-
*
**/
aDCEngine engine(LCD_RS_PIN, LCD_ENABLE_PIN, LCD_D4_PIN, LCD_D5_PIN, LCD_D6_PIN, LCD_D7_PIN, LCD_COLS_NUM, LCD_ROWS_NUM,
#ifdef HAS_INPUT_RELAY
INPUT_RELAY_BUTTON_PIN, INPUT_RELAY_RELAY_PIN,
#endif
ENCODER_A_PIN, ENCODER_B_PIN, ENCODER_PB_PIN, ENCODER_STEPS_PER_NOTCH);
void setup()
{
engine.setup();
}
void loop()
{
engine.run();
}