Hi,
I wanted to use the ArduTester V1.13 project, but unfortunately I have an Arduino Leonardo.
I thought that I only need to change the ports in the project, however, it still does not compile.
What else do I need to change in the code to completely transfer the project from the UNO board to the Leonardo?
In general the Leonardo has more function. A major difference is the SPI pins are only on the ISP header in the Leonardo. This gives the Leonardo 4 more digital I/Os.
It doesn't compile cleanly on an UNO. There are a ton of warnings that should be fixed.
The next step to adding Leonardo support is to modify "config.h" to use the right register names for the ATmega32u4 processor. You will need to add a new processor type.
In file included from /Users/john/Downloads/ArduTester_1_13/config.h:1101:0,
from /Users/john/Downloads/ArduTester_1_13/Transistortester.h:14,
from /Users/john/Downloads/ArduTester_1_13/ArduTester_1_13.ino:16:
/Users/john/Downloads/ArduTester_1_13/autoconf.h:80:3: warning: #warning LCD_ST7565_Y_START is set higher than SCREEN_HEIGHT! [-Wcpp]
#warning LCD_ST7565_Y_START is set higher than SCREEN_HEIGHT!
^~~~~~~
/Users/john/Downloads/ArduTester_1_13/autoconf.h:98:3: warning: #warning LCD_LINES is not correctly set! [-Wcpp]
#warning LCD_LINES is not correctly set!
^~~~~~~
/Users/john/Downloads/ArduTester_1_13/autoconf.h:100:4: warning: #warning SCREEN_HEIGHT is not correctly set! [-Wcpp]
#warning SCREEN_HEIGHT is not correctly set!
^~~~~~~
In file included from /Users/john/Downloads/ArduTester_1_13/Transistortester.h:17:0,
from /Users/john/Downloads/ArduTester_1_13/ArduTester_1_13.ino:16:
/Users/john/Downloads/ArduTester_1_13/autoconf.h:80:3: warning: #warning LCD_ST7565_Y_START is set higher than SCREEN_HEIGHT! [-Wcpp]
#warning LCD_ST7565_Y_START is set higher than SCREEN_HEIGHT!
^~~~~~~
/Users/john/Downloads/ArduTester_1_13/autoconf.h:98:3: warning: #warning LCD_LINES is not correctly set! [-Wcpp]
#warning LCD_LINES is not correctly set!
^~~~~~~
/Users/john/Downloads/ArduTester_1_13/autoconf.h:100:4: warning: #warning SCREEN_HEIGHT is not correctly set! [-Wcpp]
#warning SCREEN_HEIGHT is not correctly set!
^~~~~~~
/Users/john/Downloads/ArduTester_1_13/ReadADC.ino:21:0: warning: "StartADCwait" redefined
#define StartADCwait() ADCSRA = (1<<ADSC)|(1<<ADEN)|(1<<ADIF)|AUTO_CLOCK_DIV; /* Start conversion */\
/Users/john/Downloads/ArduTester_1_13/GetESR.ino:28:0: note: this is the location of the previous definition
#define StartADCwait() ADCSRA = (1<<ADSC)|(1<<ADEN)|(1<<ADIF)|AUTO_CLOCK_DIV; /* Start conversion */\
/Users/john/Downloads/ArduTester_1_13/ReadCapacity.ino:123:0: warning: "MAX_LOAD_TIME" redefined
#define MAX_LOAD_TIME 500
/Users/john/Downloads/ArduTester_1_13/ReadBigCap.ino:73:0: note: this is the location of the previous definition
#define MAX_LOAD_TIME 12500
/Users/john/Downloads/ArduTester_1_13/lcd_draw.ino:212:3: warning: #warning "no WITH_GRAPHICS" [-Wcpp]
#warning "no WITH_GRAPHICS"
^~~~~~~
/Users/john/Downloads/ArduTester_1_13/lcd_hw_4_bit.ino:159:67: warning: extra tokens at end of #else directive [-Wendif-labels]
#else /* !(LCD_INTERFACE_MODE == (MODE_SPI | MODE_7920_SERIAL)) */ERIAL | MODE_I2C | MODE_7108_S
^~~~~
In file included from /Users/john/Downloads/ArduTester_1_13/ArduTester_1_13.ino:16:0:
/Users/john/Downloads/ArduTester_1_13/Transistortester.h:82:60: warning: narrowing conversion of '2.23848633e+4' from 'double' to 'uint16_t {aka unsigned int}' inside { } [-Wnarrowing]
/* 1400 */ 30441023.0 / (PIN_RM + PIN_RP + R_L_VAL) + 0.5};
^
/Users/john/Downloads/ArduTester_1_13/Transistortester.h:82:60: warning: narrowing conversion of '2.06085527e+4' from 'double' to 'uint16_t {aka unsigned int}' inside { } [-Wnarrowing]
/Users/john/Downloads/ArduTester_1_13/Transistortester.h:82:60: warning: narrowing conversion of '1.90859121e+4' from 'double' to 'uint16_t {aka unsigned int}' inside { } [-Wnarrowing]
/Users/john/Downloads/ArduTester_1_13/Transistortester.h:82:60: warning: narrowing conversion of '1.77662012e+4' from 'double' to 'uint16_t {aka unsigned int}' inside { } [-Wnarrowing]
/Users/john/Downloads/ArduTester_1_13/Transistortester.h:82:60: warning: narrowing conversion of '1.6611375e+4' from 'double' to 'uint16_t {aka unsigned int}' inside { } [-Wnarrowing]
/Users/john/Downloads/ArduTester_1_13/Transistortester.h:82:60: warning: narrowing conversion of '1.5592334e+4' from 'double' to 'uint16_t {aka unsigned int}' inside { } [-Wnarrowing]
/Users/john/Downloads/ArduTester_1_13/Transistortester.h:82:60: warning: narrowing conversion of '1.46864453e+4' from 'double' to 'uint16_t {aka unsigned int}' inside { } [-Wnarrowing]
/Users/john/Downloads/ArduTester_1_13/Transistortester.h:82:60: warning: narrowing conversion of '1.38758438e+4' from 'double' to 'uint16_t {aka unsigned int}' inside { } [-Wnarrowing]
/Users/john/Downloads/ArduTester_1_13/Transistortester.h:82:60: warning: narrowing conversion of '1.31462363e+4' from 'double' to 'uint16_t {aka unsigned int}' inside { } [-Wnarrowing]
/Users/john/Downloads/ArduTester_1_13/Transistortester.h:82:60: warning: narrowing conversion of '1.24860498e+4' from 'double' to 'uint16_t {aka unsigned int}' inside { } [-Wnarrowing]
/Users/john/Downloads/ArduTester_1_13/Transistortester.h:82:60: warning: narrowing conversion of '1.18858184e+4' from 'double' to 'uint16_t {aka unsigned int}' inside { } [-Wnarrowing]
/Users/john/Downloads/ArduTester_1_13/Transistortester.h:82:60: warning: narrowing conversion of '1.13377217e+4' from 'double' to 'uint16_t {aka unsigned int}' inside { } [-Wnarrowing]
/Users/john/Downloads/ArduTester_1_13/Transistortester.h:82:60: warning: narrowing conversion of '1.08352412e+4' from 'double' to 'uint16_t {aka unsigned int}' inside { } [-Wnarrowing]
/Users/john/Downloads/ArduTester_1_13/Transistortester.h:82:60: warning: narrowing conversion of '1.03729043e+4' from 'double' to 'uint16_t {aka unsigned int}' inside { } [-Wnarrowing]
/Users/john/Downloads/ArduTester_1_13/Transistortester.h:82:60: warning: narrowing conversion of '9.94607715e+3' from 'double' to 'uint16_t {aka unsigned int}' inside { } [-Wnarrowing]
/Users/john/Downloads/ArduTester_1_13/Transistortester.h:82:60: warning: narrowing conversion of '9.55081348e+3' from 'double' to 'uint16_t {aka unsigned int}' inside { } [-Wnarrowing]
/Users/john/Downloads/ArduTester_1_13/Transistortester.h:82:60: warning: narrowing conversion of '9.18373145e+3' from 'double' to 'uint16_t {aka unsigned int}' inside { } [-Wnarrowing]
/Users/john/Downloads/ArduTester_1_13/Transistortester.h:82:60: warning: narrowing conversion of '8.84191602e+3' from 'double' to 'uint16_t {aka unsigned int}' inside { } [-Wnarrowing]
/Users/john/Downloads/ArduTester_1_13/Transistortester.h:82:60: warning: narrowing conversion of '8.52283984e+3' from 'double' to 'uint16_t {aka unsigned int}' inside { } [-Wnarrowing]
/Users/john/Downloads/ArduTester_1_13/Transistortester.h:82:60: warning: narrowing conversion of '8.22430176e+3' from 'double' to 'uint16_t {aka unsigned int}' inside { } [-Wnarrowing]
/Users/john/Downloads/ArduTester_1_13/Transistortester.h:82:60: warning: narrowing conversion of '7.94437549e+3' from 'double' to 'uint16_t {aka unsigned int}' inside { } [-Wnarrowing]
/Users/john/Downloads/ArduTester_1_13/Transistortester.h:82:60: warning: narrowing conversion of '7.68136865e+3' from 'double' to 'uint16_t {aka unsigned int}' inside { } [-Wnarrowing]
/Users/john/Downloads/ArduTester_1_13/Transistortester.h:82:60: warning: narrowing conversion of '7.43378857e+3' from 'double' to 'uint16_t {aka unsigned int}' inside { } [-Wnarrowing]
/Users/john/Downloads/ArduTester_1_13/Transistortester.h:82:60: warning: narrowing conversion of '7.2003125e+3' from 'double' to 'uint16_t {aka unsigned int}' inside { } [-Wnarrowing]
/Users/john/Downloads/ArduTester_1_13/Transistortester.h:82:60: warning: narrowing conversion of '6.97976416e+3' from 'double' to 'uint16_t {aka unsigned int}' inside { } [-Wnarrowing]
/Users/john/Downloads/ArduTester_1_13/Transistortester.h:82:60: warning: narrowing conversion of '6.7710957e+3' from 'double' to 'uint16_t {aka unsigned int}' inside { } [-Wnarrowing]
/Users/john/Downloads/ArduTester_1_13/Transistortester.h:82:60: warning: narrowing conversion of '6.57336816e+3' from 'double' to 'uint16_t {aka unsigned int}' inside { } [-Wnarrowing]
/Users/john/Downloads/ArduTester_1_13/Transistortester.h:82:60: warning: narrowing conversion of '6.38573975e+3' from 'double' to 'uint16_t {aka unsigned int}' inside { } [-Wnarrowing]
/Users/john/Downloads/ArduTester_1_13/Transistortester.h:82:60: warning: narrowing conversion of '6.20745312e+3' from 'double' to 'uint16_t {aka unsigned int}' inside { } [-Wnarrowing]
/Users/john/Downloads/ArduTester_1_13/Transistortester.h:82:60: warning: narrowing conversion of '6.03782422e+3' from 'double' to 'uint16_t {aka unsigned int}' inside { } [-Wnarrowing]
/Users/john/Downloads/ArduTester_1_13/Transistortester.h:82:60: warning: narrowing conversion of '5.87623291e+3' from 'double' to 'uint16_t {aka unsigned int}' inside { } [-Wnarrowing]
/Users/john/Downloads/ArduTester_1_13/Transistortester.h:82:60: warning: narrowing conversion of '5.72212012e+3' from 'double' to 'uint16_t {aka unsigned int}' inside { } [-Wnarrowing]
/Users/john/Downloads/ArduTester_1_13/Transistortester.h:82:60: warning: narrowing conversion of '5.57497461e+3' from 'double' to 'uint16_t {aka unsigned int}' inside { } [-Wnarrowing]
/Users/john/Downloads/ArduTester_1_13/Transistortester.h:82:60: warning: narrowing conversion of '5.43433154e+3' from 'double' to 'uint16_t {aka unsigned int}' inside { } [-Wnarrowing]
/Users/john/Downloads/ArduTester_1_13/Transistortester.h:82:60: warning: narrowing conversion of '5.2997666e+3' from 'double' to 'uint16_t {aka unsigned int}' inside { } [-Wnarrowing]
/Users/john/Downloads/ArduTester_1_13/Transistortester.h:82:60: warning: narrowing conversion of '5.17089111e+3' from 'double' to 'uint16_t {aka unsigned int}' inside { } [-Wnarrowing]
/Users/john/Downloads/ArduTester_1_13/Transistortester.h:82:60: warning: narrowing conversion of '5.0473501e+3' from 'double' to 'uint16_t {aka unsigned int}' inside { } [-Wnarrowing]
/Users/john/Downloads/ArduTester_1_13/Transistortester.h:82:60: warning: narrowing conversion of '4.92881543e+3' from 'double' to 'uint16_t {aka unsigned int}' inside { } [-Wnarrowing]
/Users/john/Downloads/ArduTester_1_13/Transistortester.h:82:60: warning: narrowing conversion of '4.81498682e+3' from 'double' to 'uint16_t {aka unsigned int}' inside { } [-Wnarrowing]
/Users/john/Downloads/ArduTester_1_13/Transistortester.h:82:60: warning: narrowing conversion of '4.7055874e+3' from 'double' to 'uint16_t {aka unsigned int}' inside { } [-Wnarrowing]
/Users/john/Downloads/ArduTester_1_13/Transistortester.h:82:60: warning: narrowing conversion of '4.60036084e+3' from 'double' to 'uint16_t {aka unsigned int}' inside { } [-Wnarrowing]
/Users/john/Downloads/ArduTester_1_13/Transistortester.h:82:60: warning: narrowing conversion of '4.49907129e+3' from 'double' to 'uint16_t {aka unsigned int}' inside { } [-Wnarrowing]
/Users/john/Downloads/ArduTester_1_13/Transistortester.h:82:60: warning: narrowing conversion of '4.40149854e+3' from 'double' to 'uint16_t {aka unsigned int}' inside { } [-Wnarrowing]
/Users/john/Downloads/ArduTester_1_13/Transistortester.h:82:60: warning: narrowing conversion of '4.30744092e+3' from 'double' to 'uint16_t {aka unsigned int}' inside { } [-Wnarrowing]
/Users/john/Downloads/ArduTester_1_13/Transistortester.h:82:60: warning: narrowing conversion of '4.2167085e+3' from 'double' to 'uint16_t {aka unsigned int}' inside { } [-Wnarrowing]
In file included from /Users/john/Downloads/ArduTester_1_13/ArduTester_1_13.ino:16:0:
/Users/john/Downloads/ArduTester_1_13/Transistortester.h:122:3: warning: narrowing conversion of '9.53993591e+2' from 'double' to 'uint16_t {aka unsigned int}' inside { } [-Wnarrowing]
};
^
/Users/john/Downloads/ArduTester_1_13/Transistortester.h:122:3: warning: narrowing conversion of '9.0311261e+2' from 'double' to 'uint16_t {aka unsigned int}' inside { } [-Wnarrowing]
/Users/john/Downloads/ArduTester_1_13/Transistortester.h:122:3: warning: narrowing conversion of '8.56834229e+2' from 'double' to 'uint16_t {aka unsigned int}' inside { } [-Wnarrowing]
/Users/john/Downloads/ArduTester_1_13/Transistortester.h:122:3: warning: narrowing conversion of '8.14557556e+2' from 'double' to 'uint16_t {aka unsigned int}' inside { } [-Wnarrowing]
/Users/john/Downloads/ArduTester_1_13/Transistortester.h:122:3: warning: narrowing conversion of '7.75782043e+2' from 'double' to 'uint16_t {aka unsigned int}' inside { } [-Wnarrowing]
/Users/john/Downloads/ArduTester_1_13/Transistortester.h:122:3: warning: narrowing conversion of '7.40087158e+2' from 'double' to 'uint16_t {aka unsigned int}' inside { } [-Wnarrowing]
/Users/john/Downloads/ArduTester_1_13/Transistortester.h:122:3: warning: narrowing conversion of '7.07116943e+2' from 'double' to 'uint16_t {aka unsigned int}' inside { } [-Wnarrowing]
/Users/john/Downloads/ArduTester_1_13/Transistortester.h:122:3: warning: narrowing conversion of '6.76568298e+2' from 'double' to 'uint16_t {aka unsigned int}' inside { } [-Wnarrowing]
/Users/john/Downloads/ArduTester_1_13/Transistortester.h:122:3: warning: narrowing conversion of '6.48181335e+2' from 'double' to 'uint16_t {aka unsigned int}' inside { } [-Wnarrowing]
/Users/john/Downloads/ArduTester_1_13/ArduTester_1_13.ino: In function 'void setup()':
/Users/john/Downloads/ArduTester_1_13/ArduTester_1_13.ino:343:14: warning: return-statement with a value, in function returning 'void' [-fpermissive]
/Users/john/Downloads/ArduTester_1_13/ArduTester_1_13.ino:702:22: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
/Users/john/Downloads/ArduTester_1_13/GetESR.ino: In function 'uint16_t GetESR(uint8_t, uint8_t)':
/Users/john/Downloads/ArduTester_1_13/GetESR.ino:145:23: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
if (cap.cval_max < 0) cap_val_nF = -cap.cval_max;
~~~~~~~~~~~~~^~~
/Users/john/Downloads/ArduTester_1_13/GetESR.ino:300:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (esrvalue > esr0) {
~~~~~~~~~^~~~~~
/Users/john/Downloads/ArduTester_1_13/GetESR.ino:304:49: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (((esrvalue + R_LIMIT_TO_UNCALIBRATED) < esr0) && (cap_val_nF > 4500)) {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
/Users/john/Downloads/ArduTester_1_13/GetESR.ino:138:11: warning: variable 'StartADCmsk' set but not used [-Wunused-but-set-variable]
uint8_t StartADCmsk; // Bit mask to start the ADC
^~~~~~~~~~~
/Users/john/Downloads/ArduTester_1_13/ReadBigCap.ino: In function 'void ReadBigCap(uint8_t, uint8_t)':
/Users/john/Downloads/ArduTester_1_13/ReadBigCap.ino:77:56: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if ((ovcnt16 == 0) || ((MIN_VOLTAGE-cap_voltage1) < (cap_voltage1*10/ovcnt16))) {
~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/john/Downloads/ArduTester_1_13/ReadBigCap.ino:82:63: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
} else if ((ovcnt16 > 10) && ((MIN_VOLTAGE-cap_voltage1) > ((cap_voltage1*100)/ovcnt16))){
~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/john/Downloads/ArduTester_1_13/Sampling_cap.ino: In function 'void sampling_cap_calibrate()':
/Users/john/Downloads/ArduTester_1_13/Sampling_cap.ino:250:31: warning: invalid conversion from 'void*' to 'uint16_t* {aka unsigned int*}' [-fpermissive]
eeprom_write_word((void*)(c_zero_tab2_lo+k),c); /* C0 from 0 to 1 */
^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /Users/john/Library/Arduino15/packages/arduino/hardware/avr/1.8.6/cores/arduino/USBAPI.h:25:0,
from /Users/john/Library/Arduino15/packages/arduino/hardware/avr/1.8.6/cores/arduino/Arduino.h:234,
from sketch/ArduTester_1_13.ino.cpp:1:
/Users/john/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/avr/include/avr/eeprom.h:171:6: note: initializing argument 1 of 'void eeprom_write_word(uint16_t*, uint16_t)'
void eeprom_write_word (uint16_t *__p, uint16_t __value);
^~~~~~~~~~~~~~~~~
/Users/john/Downloads/ArduTester_1_13/Sampling_cap.ino:251:31: warning: invalid conversion from 'void*' to 'uint16_t* {aka unsigned int*}' [-fpermissive]
eeprom_write_word((void*)(c_zero_tab2_hi+k),d); /* C0 from 1 to 0 */
^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /Users/john/Library/Arduino15/packages/arduino/hardware/avr/1.8.6/cores/arduino/USBAPI.h:25:0,
from /Users/john/Library/Arduino15/packages/arduino/hardware/avr/1.8.6/cores/arduino/Arduino.h:234,
from sketch/ArduTester_1_13.ino.cpp:1:
/Users/john/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/avr/include/avr/eeprom.h:171:6: note: initializing argument 1 of 'void eeprom_write_word(uint16_t*, uint16_t)'
void eeprom_write_word (uint16_t *__p, uint16_t __value);
^~~~~~~~~~~~~~~~~
/Users/john/Downloads/ArduTester_1_13/ShowData.ino: In function 'void ShowData()':
/Users/john/Downloads/ArduTester_1_13/ShowData.ino:102:33: warning: invalid conversion from 'void*' to 'const uint16_t* {aka const unsigned int*}' [-fpermissive]
cc = eeprom_read_word((void *)(c_zero_tab2_lo+kk));
^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /Users/john/Library/Arduino15/packages/arduino/hardware/avr/1.8.6/cores/arduino/USBAPI.h:25:0,
from /Users/john/Library/Arduino15/packages/arduino/hardware/avr/1.8.6/cores/arduino/Arduino.h:234,
from sketch/ArduTester_1_13.ino.cpp:1:
/Users/john/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/avr/include/avr/eeprom.h:144:10: note: initializing argument 1 of 'uint16_t eeprom_read_word(const uint16_t*)'
uint16_t eeprom_read_word (const uint16_t *__p) __ATTR_PURE__;
^~~~~~~~~~~~~~~~
/Users/john/Downloads/ArduTester_1_13/ShowData.ino:103:33: warning: invalid conversion from 'void*' to 'const uint16_t* {aka const unsigned int*}' [-fpermissive]
dd = eeprom_read_word((void *)(c_zero_tab2_hi+kk));
^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /Users/john/Library/Arduino15/packages/arduino/hardware/avr/1.8.6/cores/arduino/USBAPI.h:25:0,
from /Users/john/Library/Arduino15/packages/arduino/hardware/avr/1.8.6/cores/arduino/Arduino.h:234,
from sketch/ArduTester_1_13.ino.cpp:1:
/Users/john/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/avr/include/avr/eeprom.h:144:10: note: initializing argument 1 of 'uint16_t eeprom_read_word(const uint16_t*)'
uint16_t eeprom_read_word (const uint16_t *__p) __ATTR_PURE__;
^~~~~~~~~~~~~~~~
/Users/john/Downloads/ArduTester_1_13/lcd_routines.ino: In function 'void lcd_next_line_wait(uint8_t)':
/Users/john/Downloads/ArduTester_1_13/lcd_routines.ino:168:20: warning: suggest braces around empty body in an 'if' statement [-Wempty-body]
uart_newline(); // MAURO ('H')
^
/Users/john/Downloads/ArduTester_1_13/lcd_routines.ino: In function 'void lcd_set_pixels(const unsigned char*, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char)':
/Users/john/Downloads/ArduTester_1_13/lcd_routines.ino:1119:42: warning: unused parameter 'pdata' [-Wunused-parameter]
void lcd_set_pixels(const unsigned char *pdata, unsigned char x, unsigned char y,
^~~~~
/Users/john/Downloads/ArduTester_1_13/lcd_routines.ino:1119:63: warning: unused parameter 'x' [-Wunused-parameter]
void lcd_set_pixels(const unsigned char *pdata, unsigned char x, unsigned char y,
^
/Users/john/Downloads/ArduTester_1_13/lcd_routines.ino:1119:80: warning: unused parameter 'y' [-Wunused-parameter]
void lcd_set_pixels(const unsigned char *pdata, unsigned char x, unsigned char y,
^
/Users/john/Downloads/ArduTester_1_13/lcd_routines.ino:1120:15: warning: unused parameter 'options' [-Wunused-parameter]
unsigned char options, unsigned char width, unsigned char height) {
^~~~~~~
/Users/john/Downloads/ArduTester_1_13/lcd_routines.ino:1120:38: warning: unused parameter 'width' [-Wunused-parameter]
unsigned char options, unsigned char width, unsigned char height) {
^~~~~
/Users/john/Downloads/ArduTester_1_13/lcd_routines.ino:1120:59: warning: unused parameter 'height' [-Wunused-parameter]
unsigned char options, unsigned char width, unsigned char height) {
^~~~~~
/Users/john/Downloads/ArduTester_1_13/samplingADC.ino: In function 'uint16_t samplingADC(unsigned int, void*, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char)':
/Users/john/Downloads/ArduTester_1_13/samplingADC.ino:3:1: warning: no return statement in function returning non-void [-Wreturn-type]
}
^
/Users/john/Downloads/ArduTester_1_13/sampling_lc.ino: In function 'unsigned int peaksearch(unsigned int*, unsigned int*)':
/Users/john/Downloads/ArduTester_1_13/sampling_lc.ino:160:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (kdiv >= delta) xx -= ((delta * 64)+ 32) / kdiv;
~~~~~^~~~~~~~
Sketch uses 26820 bytes (83%) of program storage space. Maximum is 32256 bytes.
Global variables use 181 bytes (8%) of dynamic memory, leaving 1867 bytes for local variables. Maximum is 2048 bytes.
Thanks for the answer.
I corrected everything (I don't know if correctly), but now I have a problem with storage space and have no idea how to reduce this value.
Sketch too big; see https://support.arduino.cc/hc/en-us/articles/360013825179 for tips on reducing it.
Sketch uses 29856 bytes (104%) of program storage space. Maximum is 28672 bytes.
Global variables use 321 bytes (12%) of dynamic memory, leaving 2239 bytes for local variables. Maximum is 2560 bytes.
text section exceeds available space in board
Compilation error: text section exceeds available space in board
These are my files: https://github.com/Glenfid/ArduTester1.13__Leonardo/tree/main/ArduTester_1_13
Okay, I have managed to compile and upload the program without the bootloader using the USBasp programmer, but the display shows only this:
The only thing that happens is the built-in LED of pin 13 goes out after about 210 seconds.
Do you have any hints where to look for the problem?
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
