Arduino: 1.8.10 (Windows 10), Board: “ATtiny25/45/85, ATtiny25, Internal 1 MHz”
In file included from sketch\tk-delay.h:24:0,
from C:\Users\pops\Documents\Arduino\sketch_jan21a\sketch_jan21a.ino:164:
tk-attiny.h:11:5: error: redefinition of ‘int mode1’
int mode1 = 255;
^
In file included from C:\Users\pops\Documents\Arduino\sketch_jan21a\sketch_jan21a.ino:58:0:
sketch\tk-attiny.h:11:5: note: ‘int mode1’ previously defined here
int mode1 = 255;
^
In file included from sketch\tk-delay.h:24:0,
from C:\Users\pops\Documents\Arduino\sketch_jan21a\sketch_jan21a.ino:164:
tk-attiny.h:12:5: error: redefinition of ‘int mode2’
int mode2 = 8;
^
In file included from C:\Users\pops\Documents\Arduino\sketch_jan21a\sketch_jan21a.ino:58:0:
sketch\tk-attiny.h:12:5: note: ‘int mode2’ previously defined here
int mode2 = 8;
^
In file included from sketch\tk-delay.h:24:0,
from C:\Users\pops\Documents\Arduino\sketch_jan21a\sketch_jan21a.ino:164:
tk-attiny.h:15:11: error: redefinition of ‘const int ledPin’
const int ledPin = 0; // setting LED pin
^~
In file included from C:\Users\pops\Documents\Arduino\sketch_jan21a\sketch_jan21a.ino:58:0:
sketch\tk-attiny.h:15:11: note: ‘const int ledPin’ previously defined here
const int ledPin = 0; // setting LED pin
^~
In file included from sketch\tk-delay.h:24:0,
from C:\Users\pops\Documents\Arduino\sketch_jan21a\sketch_jan21a.ino:164:
tk-attiny.h:17:54: error: redefinition of ‘unsigned int key’
unsigned int key attribute ((section (“.noinit”)));
^
In file included from C:\Users\pops\Documents\Arduino\sketch_jan21a\sketch_jan21a.ino:58:0:
sketch\tk-attiny.h:17:14: note: ‘unsigned int key’ previously declared here
unsigned int key attribute ((section (“.noinit”)));
^
In file included from sketch\tk-delay.h:24:0,
from C:\Users\pops\Documents\Arduino\sketch_jan21a\sketch_jan21a.ino:164:
tk-attiny.h:19:55: error: redefinition of ‘unsigned int mode’
unsigned int mode attribute ((section (“.noinit”)));
^
In file included from C:\Users\pops\Documents\Arduino\sketch_jan21a\sketch_jan21a.ino:58:0:
sketch\tk-attiny.h:19:14: note: ‘unsigned int mode’ previously declared here
unsigned int mode attribute ((section (“.noinit”)));
^~
In file included from sketch\tk-delay.h:24:0,
from C:\Users\pops\Documents\Arduino\sketch_jan21a\sketch_jan21a.ino:164:
sketch\tk-attiny.h: In function ‘void setup()’:
tk-attiny.h:21:6: error: redefinition of ‘void setup()’
void setup() {
^
In file included from C:\Users\pops\Documents\Arduino\sketch_jan21a\sketch_jan21a.ino:58:0:
sketch\tk-attiny.h:21:6: note: ‘void setup()’ previously defined here
void setup() {
^
In file included from sketch\tk-delay.h:24:0,
from C:\Users\pops\Documents\Arduino\sketch_jan21a\sketch_jan21a.ino:164:
sketch\tk-attiny.h: In function ‘int modeone()’:
tk-attiny.h:38:5: error: redefinition of ‘int modeone()’
int modeone() {
^
In file included from C:\Users\pops\Documents\Arduino\sketch_jan21a\sketch_jan21a.ino:58:0:
sketch\tk-attiny.h:38:5: note: ‘int modeone()’ previously defined here
int modeone() {
^
In file included from sketch\tk-delay.h:24:0,
from C:\Users\pops\Documents\Arduino\sketch_jan21a\sketch_jan21a.ino:164:
sketch\tk-attiny.h: In function ‘int modetwo()’:
tk-attiny.h:43:5: error: redefinition of ‘int modetwo()’
int modetwo() {
^
In file included from C:\Users\pops\Documents\Arduino\sketch_jan21a\sketch_jan21a.ino:58:0:
sketch\tk-attiny.h:43:5: note: ‘int modetwo()’ previously defined here
int modetwo() {
^
In file included from sketch\tk-delay.h:24:0,
from C:\Users\pops\Documents\Arduino\sketch_jan21a\sketch_jan21a.ino:164:
sketch\tk-attiny.h: In function ‘int modethree()’:
tk-attiny.h:48:5: error: redefinition of ‘int modethree()’
int modethree() {
^
In file included from C:\Users\pops\Documents\Arduino\sketch_jan21a\sketch_jan21a.ino:58:0:
sketch\tk-attiny.h:48:5: note: ‘int modethree()’ previously defined here
int modethree() {
^
In file included from sketch\tk-delay.h:24:0,
from C:\Users\pops\Documents\Arduino\sketch_jan21a\sketch_jan21a.ino:164:
sketch\tk-attiny.h: In function ‘void loop()’:
tk-attiny.h:56:6: error: redefinition of ‘void loop()’
void loop() {
^~
In file included from C:\Users\pops\Documents\Arduino\sketch_jan21a\sketch_jan21a.ino:58:0:
sketch\tk-attiny.h:56:6: note: ‘void loop()’ previously defined here
void loop() {
^~
In file included from sketch\tk-delay.h:24:0,
from C:\Users\pops\Documents\Arduino\sketch_jan21a\sketch_jan21a.ino:164:
sketch\tk-attiny.h: In function ‘void system_sleep()’:
tk-attiny.h:74:6: error: redefinition of ‘void system_sleep()’
void system_sleep() {
^~
In file included from C:\Users\pops\Documents\Arduino\sketch_jan21a\sketch_jan21a.ino:58:0:
sketch\tk-attiny.h:74:6: note: ‘void system_sleep()’ previously defined here
void system_sleep() {
^~
In file included from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:30:0,
from sketch\sketch_jan21a.ino.cpp:1:
sketch\tk-attiny.h: In function ‘void __vector_2()’:
tk-attiny.h:81:5: error: redefinition of ‘void __vector_2()’
ISR (PCINT0_vect) {
^
sketch\tk-attiny.h:81:5: note: ‘void __vector_2()’ previously defined here
ISR (PCINT0_vect) {
^
In file included from sketch\tk-voltage.h:23:0,
from C:\Users\pops\Documents\Arduino\sketch_jan21a\sketch_jan21a.ino:166:
sketch\tk-attiny.h: At global scope:
tk-attiny.h:11:5: error: redefinition of ‘int mode1’
int mode1 = 255;
^
In file included from C:\Users\pops\Documents\Arduino\sketch_jan21a\sketch_jan21a.ino:58:0:
sketch\tk-attiny.h:11:5: note: ‘int mode1’ previously defined here
int mode1 = 255;
^
In file included from sketch\tk-voltage.h:23:0,
from C:\Users\pops\Documents\Arduino\sketch_jan21a\sketch_jan21a.ino:166:
tk-attiny.h:12:5: error: redefinition of ‘int mode2’
int mode2 = 8;
^
In file included from C:\Users\pops\Documents\Arduino\sketch_jan21a\sketch_jan21a.ino:58:0:
sketch\tk-attiny.h:12:5: note: ‘int mode2’ previously defined here
int mode2 = 8;
^
In file included from sketch\tk-voltage.h:23:0,
from C:\Users\pops\Documents\Arduino\sketch_jan21a\sketch_jan21a.ino:166:
tk-attiny.h:15:11: error: redefinition of ‘const int ledPin’
const int ledPin = 0; // setting LED pin
^~
In file included from C:\Users\pops\Documents\Arduino\sketch_jan21a\sketch_jan21a.ino:58:0:
sketch\tk-attiny.h:15:11: note: ‘const int ledPin’ previously defined here
const int ledPin = 0; // setting LED pin
^~
In file included from sketch\tk-voltage.h:23:0,
from C:\Users\pops\Documents\Arduino\sketch_jan21a\sketch_jan21a.ino:166:
tk-attiny.h:17:54: error: redefinition of ‘unsigned int key’
unsigned int key attribute ((section (“.noinit”)));
^
In file included from C:\Users\pops\Documents\Arduino\sketch_jan21a\sketch_jan21a.ino:58:0:
sketch\tk-attiny.h:17:14: note: ‘unsigned int key’ previously declared here
unsigned int key attribute ((section (“.noinit”)));
^
In file included from sketch\tk-voltage.h:23:0,
from C:\Users\pops\Documents\Arduino\sketch_jan21a\sketch_jan21a.ino:166:
tk-attiny.h:19:55: error: redefinition of ‘unsigned int mode’
unsigned int mode attribute ((section (“.noinit”)));
^
In file included from C:\Users\pops\Documents\Arduino\sketch_jan21a\sketch_jan21a.ino:58:0:
sketch\tk-attiny.h:19:14: note: ‘unsigned int mode’ previously declared here
unsigned int mode attribute ((section (“.noinit”)));
^~
In file included from sketch\tk-voltage.h:23:0,
from C:\Users\pops\Documents\Arduino\sketch_jan21a\sketch_jan21a.ino:166:
sketch\tk-attiny.h: In function ‘void setup()’:
tk-attiny.h:21:6: error: redefinition of ‘void setup()’
void setup() {
^
In file included from C:\Users\pops\Documents\Arduino\sketch_jan21a\sketch_jan21a.ino:58:0:
sketch\tk-attiny.h:21:6: note: ‘void setup()’ previously defined here
void setup() {
^
In file included from sketch\tk-voltage.h:23:0,
from C:\Users\pops\Documents\Arduino\sketch_jan21a\sketch_jan21a.ino:166:
sketch\tk-attiny.h: In function ‘int modeone()’:
tk-attiny.h:38:5: error: redefinition of ‘int modeone()’
int modeone() {
^
In file included from C:\Users\pops\Documents\Arduino\sketch_jan21a\sketch_jan21a.ino:58:0:
sketch\tk-attiny.h:38:5: note: ‘int modeone()’ previously defined here
int modeone() {
^
In file included from sketch\tk-voltage.h:23:0,
from C:\Users\pops\Documents\Arduino\sketch_jan21a\sketch_jan21a.ino:166:
sketch\tk-attiny.h: In function ‘int modetwo()’:
tk-attiny.h:43:5: error: redefinition of ‘int modetwo()’
int modetwo() {
^
In file included from C:\Users\pops\Documents\Arduino\sketch_jan21a\sketch_jan21a.ino:58:0:
sketch\tk-attiny.h:43:5: note: ‘int modetwo()’ previously defined here
int modetwo() {
^
In file included from sketch\tk-voltage.h:23:0,
from C:\Users\pops\Documents\Arduino\sketch_jan21a\sketch_jan21a.ino:166:
sketch\tk-attiny.h: In function ‘int modethree()’:
tk-attiny.h:48:5: error: redefinition of ‘int modethree()’
int modethree() {
^
In file included from C:\Users\pops\Documents\Arduino\sketch_jan21a\sketch_jan21a.ino:58:0:
sketch\tk-attiny.h:48:5: note: ‘int modethree()’ previously defined here
int modethree() {
^
In file included from sketch\tk-voltage.h:23:0,
from C:\Users\pops\Documents\Arduino\sketch_jan21a\sketch_jan21a.ino:166:
sketch\tk-attiny.h: In function ‘void loop()’:
tk-attiny.h:56:6: error: redefinition of ‘void loop()’
void loop() {
^~
In file included from C:\Users\pops\Documents\Arduino\sketch_jan21a\sketch_jan21a.ino:58:0:
sketch\tk-attiny.h:56:6: note: ‘void loop()’ previously defined here
void loop() {
^~
In file included from sketch\tk-voltage.h:23:0,
from C:\Users\pops\Documents\Arduino\sketch_jan21a\sketch_jan21a.ino:166:
sketch\tk-attiny.h: In function ‘void system_sleep()’:
tk-attiny.h:74:6: error: redefinition of ‘void system_sleep()’
void system_sleep() {
^~
In file included from C:\Users\pops\Documents\Arduino\sketch_jan21a\sketch_jan21a.ino:58:0:
sketch\tk-attiny.h:74:6: note: ‘void system_sleep()’ previously defined here
void system_sleep() {
^~
In file included from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:30:0,
from sketch\sketch_jan21a.ino.cpp:1:
sketch\tk-attiny.h: In function ‘void __vector_2()’:
tk-attiny.h:81:5: error: redefinition of ‘void __vector_2()’
ISR (PCINT0_vect) {
^
sketch\tk-attiny.h:81:5: note: ‘void __vector_2()’ previously defined here
ISR (PCINT0_vect) {
^
In file included from C:\Users\pops\Documents\Arduino\sketch_jan21a\sketch_jan21a.ino:166:0:
sketch\tk-voltage.h: In function ‘void ADC_on_temperature()’:
sketch\tk-voltage.h:42:20: error: ‘V_REF’ was not declared in this scope
ADMUX = (1 << V_REF) | (1 << ADLAR) | TEMP_CHANNEL;
^
sketch\tk-voltage.h:42:44: error: ‘TEMP_CHANNEL’ was not declared in this scope
ADMUX = (1 << V_REF) | (1 << ADLAR) | TEMP_CHANNEL;
^~
sketch\tk-voltage.h:47:44: error: ‘ADC_PRSCL’ was not declared in this scope
ADCSRA = (1 << ADEN ) | (1 << ADSC ) | ADC_PRSCL;
^
sketch\tk-voltage.h:47:44: note: suggested alternative: ‘ADC_CRIT’
ADCSRA = (1 << ADEN ) | (1 << ADSC ) | ADC_PRSCL;
^
ADC_CRIT
sketch\tk-voltage.h: In function ‘void ADC_on()’:
sketch\tk-voltage.h:55:20: error: ‘ADC_DIDR’ was not declared in this scope
DIDR0 |= (1 << ADC_DIDR);
^~
sketch\tk-voltage.h:55:20: note: suggested alternative: ‘ADC_on’
DIDR0 |= (1 << ADC_DIDR);
^~
ADC_on
sketch\tk-voltage.h:57:20: error: ‘V_REF’ was not declared in this scope
ADMUX = (1 << V_REF) | (1 << ADLAR) | ADC_CHANNEL;
^
sketch\tk-voltage.h:57:44: error: ‘ADC_CHANNEL’ was not declared in this scope
ADMUX = (1 << V_REF) | (1 << ADLAR) | ADC_CHANNEL;
^
sketch\tk-voltage.h:59:44: error: ‘ADC_PRSCL’ was not declared in this scope
ADCSRA = (1 << ADEN ) | (1 << ADSC ) | ADC_PRSCL;
^
sketch\tk-voltage.h:59:44: note: suggested alternative: ‘ADC_CRIT’
ADCSRA = (1 << ADEN ) | (1 << ADSC ) | ADC_PRSCL;
^
ADC_CRIT
C:\Users\pops\Documents\Arduino\sketch_jan21a\sketch_jan21a.ino: In function ‘void save_mode()’:
sketch_jan21a:234:27: error: ‘EEPSIZE’ was not declared in this scope
eepos = (eepos+1) & ((EEPSIZE/2)–1); // wear leveling, use next cell
^
C:\Users\pops\Documents\Arduino\sketch_jan21a\sketch_jan21a.ino:234:27: note: suggested alternative: ‘EEPE’
eepos = (eepos+1) & ((EEPSIZE/2)–1); // wear leveling, use next cell
^
EEPE
C:\Users\pops\Documents\Arduino\sketch_jan21a\sketch_jan21a.ino: In function ‘void save_state()’:
sketch_jan21a:240:24: error: ‘EEPSIZE’ was not declared in this scope
#define OPT_firstboot (EEPSIZE-1)
^
C:\Users\pops\Documents\Arduino\sketch_jan21a\sketch_jan21a.ino:251:34: note: in expansion of macro ‘OPT_firstboot’
eeprom_write_byte((uint8_t *)OPT_firstboot, firstboot);
^
C:\Users\pops\Documents\Arduino\sketch_jan21a\sketch_jan21a.ino:240:24: note: suggested alternative: ‘EEPE’
#define OPT_firstboot (EEPSIZE-1)
^
C:\Users\pops\Documents\Arduino\sketch_jan21a\sketch_jan21a.ino:251:34: note: in expansion of macro ‘OPT_firstboot’
eeprom_write_byte((uint8_t *)OPT_firstboot, firstboot);
^
C:\Users\pops\Documents\Arduino\sketch_jan21a\sketch_jan21a.ino: In function ‘void restore_state()’:
sketch_jan21a:240:24: error: ‘EEPSIZE’ was not declared in this scope
#define OPT_firstboot (EEPSIZE-1)
^
C:\Users\pops\Documents\Arduino\sketch_jan21a\sketch_jan21a.ino:270:39: note: in expansion of macro ‘OPT_firstboot’
eep = eeprom_read_byte((uint8_t *)OPT_firstboot);
^
C:\Users\pops\Documents\Arduino\sketch_jan21a\sketch_jan21a.ino:240:24: note: suggested alternative: ‘EEPE’
#define OPT_firstboot (EEPSIZE-1)
^
C:\Users\pops\Documents\Arduino\sketch_jan21a\sketch_jan21a.ino:270:39: note: in expansion of macro ‘OPT_firstboot’
eep = eeprom_read_byte((uint8_t *)OPT_firstboot);
^
C:\Users\pops\Documents\Arduino\sketch_jan21a\sketch_jan21a.ino: In function ‘void set_output(uint8_t, uint8_t, uint8_t)’:
sketch_jan21a:406:5: error: ‘FET_PWM_LVL’ was not declared in this scope
FET_PWM_LVL = pwm1;
^
sketch_jan21a:407:5: error: ‘PWM_LVL’ was not declared in this scope
PWM_LVL = pwm2;
^
sketch_jan21a:408:5: error: ‘ALT_PWM_LVL’ was not declared in this scope
ALT_PWM_LVL = pwm3;
^
In file included from C:\Users\pops\Documents\Arduino\sketch_jan21a\sketch_jan21a.ino:166:0:
C:\Users\pops\Documents\Arduino\sketch_jan21a\sketch_jan21a.ino: In function ‘uint8_t read_adc_8bit()’:
sketch\tk-voltage.h:31:25: error: redefinition of ‘uint8_t read_adc_8bit()’
#define get_temperature read_adc_8bit
^
C:\Users\pops\Documents\Arduino\sketch_jan21a\sketch_jan21a.ino:482:9: note: in expansion of macro ‘get_temperature’
uint8_t get_temperature() {
^
sketch\tk-voltage.h:70:9: note: ‘uint8_t read_adc_8bit()’ previously defined here
uint8_t read_adc_8bit() {
^
C:\Users\pops\Documents\Arduino\sketch_jan21a\sketch_jan21a.ino: In function ‘uint8_t read_otc()’:
sketch_jan21a:501:20: error: ‘CAP_DIDR’ was not declared in this scope
DIDR0 |= (1 << CAP_DIDR);
^~
C:\Users\pops\Documents\Arduino\sketch_jan21a\sketch_jan21a.ino:501:20: note: suggested alternative: ‘CAP_MED’
DIDR0 |= (1 << CAP_DIDR);
^~
CAP_MED
sketch_jan21a:503:20: error: ‘V_REF’ was not declared in this scope
ADMUX = (1 << V_REF) | (1 << ADLAR) | CAP_CHANNEL;
^
sketch_jan21a:503:44: error: ‘CAP_CHANNEL’ was not declared in this scope
ADMUX = (1 << V_REF) | (1 << ADLAR) | CAP_CHANNEL;
^
sketch_jan21a:505:44: error: ‘ADC_PRSCL’ was not declared in this scope
ADCSRA = (1 << ADEN ) | (1 << ADSC ) | ADC_PRSCL;
^
C:\Users\pops\Documents\Arduino\sketch_jan21a\sketch_jan21a.ino:505:44: note: suggested alternative: ‘ADC_CRIT’
ADCSRA = (1 << ADEN ) | (1 << ADSC ) | ADC_PRSCL;
^
ADC_CRIT
C:\Users\pops\Documents\Arduino\sketch_jan21a\sketch_jan21a.ino: In function ‘int main()’:
sketch_jan21a:524:20: error: ‘CAP_PIN’ was not declared in this scope
DDRB |= (1 << CAP_PIN); // Output
^
C:\Users\pops\Documents\Arduino\sketch_jan21a\sketch_jan21a.ino:524:20: note: suggested alternative: ‘CAP_MED’
DDRB |= (1 << CAP_PIN); // Output
^
CAP_MED
sketch_jan21a:528:19: error: ‘PWM_PIN’ was not declared in this scope
DDRB |= (1 << PWM_PIN); // enable main channel
^
C:\Users\pops\Documents\Arduino\sketch_jan21a\sketch_jan21a.ino:528:19: note: suggested alternative: ‘M_PI’
DDRB |= (1 << PWM_PIN); // enable main channel
^
M_PI
sketch_jan21a:529:19: error: ‘ALT_PWM_PIN’ was not declared in this scope
DDRB |= (1 << ALT_PWM_PIN); // enable second channel
^
C:\Users\pops\Documents\Arduino\sketch_jan21a\sketch_jan21a.ino:529:19: note: suggested alternative: ‘NOT_A_PIN’
DDRB |= (1 << ALT_PWM_PIN); // enable second channel
^
NOT_A_PIN
sketch_jan21a:532:19: error: ‘FET_PWM_PIN’ was not declared in this scope
DDRB |= (1 << FET_PWM_PIN); // enable third channel (DDB4)
^
C:\Users\pops\Documents\Arduino\sketch_jan21a\sketch_jan21a.ino:532:19: note: suggested alternative: ‘NOT_A_PIN’
DDRB |= (1 << FET_PWM_PIN); // enable third channel (DDB4)
^
NOT_A_PIN
exit status 1
redefinition of ‘int mode1’
This report would have more information with
“Show verbose output during compilation”
option enabled in File -> Preferences.