The Debug window ignored the tab and multiple (\n\n\t)new line characters and a tab, nothing was printed. Restarting the IDE solved the problem as the print out was correct from the previous compile that gave the missed characte4rs.
Another problem is it appears to destroy itself. When entering auto format from the menu after a successful compile I get this:
arduino-builder -dump-prefs -logger=machine -hardware /usr/share/arduino/hardware -hardware /home/gil/.arduino15/packages -tools /usr/share/arduino/hardware/tools/avr -tools /home/gil/.arduino15/packages -libraries /home/gil/Desktop/C_source/libraries -fqbn=arduino:avr:nano:cpu=atmega328old -vid-pid=1A86_7523 -ide-version=10819 -build-path /tmp/arduino_build_772931 -warnings=none -build-cache /tmp/arduino_cache_468036 -prefs=build.warn_data_percentage=75 -verbose /home/gil/Desktop/C_source/ReadAnalogVoltage/ReadAnalogVoltage.ino
arduino-builder -compile -logger=machine -hardware /usr/share/arduino/hardware -hardware /home/gil/.arduino15/packages -tools /usr/share/arduino/hardware/tools/avr -tools /home/gil/.arduino15/packages -libraries /home/gil/Desktop/C_source/libraries -fqbn=arduino:avr:nano:cpu=atmega328old -vid-pid=1A86_7523 -ide-version=10819 -build-path /tmp/arduino_build_772931 -warnings=none -build-cache /tmp/arduino_cache_468036 -prefs=build.warn_data_percentage=75 -verbose /home/gil/Desktop/C_source/ReadAnalogVoltage/ReadAnalogVoltage.ino
Using board 'nano' from platform in folder: /usr/share/arduino/hardware/arduino/avr
Using core 'arduino' from platform in folder: /usr/share/arduino/hardware/arduino/avr
Detecting libraries used...
"/usr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-I/usr/share/arduino/hardware/arduino/avr/cores/arduino" "-I/usr/share/arduino/hardware/arduino/avr/variants/eightanaloginputs" "/tmp/arduino_build_772931/sketch/ReadAnalogVoltage.ino.cpp" -o "/dev/null"
Generating function prototypes...
"/usr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-I/usr/share/arduino/hardware/arduino/avr/cores/arduino" "-I/usr/share/arduino/hardware/arduino/avr/variants/eightanaloginputs" "/tmp/arduino_build_772931/sketch/ReadAnalogVoltage.ino.cpp" -o "/tmp/arduino_build_772931/preproc/ctags_target_for_gcc_minus_e.cpp"
"/usr/bin/arduino-ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "/tmp/arduino_build_772931/preproc/ctags_target_for_gcc_minus_e.cpp"
Compiling sketch...
"/usr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-I/usr/share/arduino/hardware/arduino/avr/cores/arduino" "-I/usr/share/arduino/hardware/arduino/avr/variants/eightanaloginputs" "/tmp/arduino_build_772931/sketch/ReadAnalogVoltage.ino.cpp" -o "/tmp/arduino_build_772931/sketch/ReadAnalogVoltage.ino.cpp.o"
Compiling libraries...
Compiling core...
Using precompiled core
Linking everything together...
"/usr/bin/avr-gcc" -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p -o "/tmp/arduino_build_772931/ReadAnalogVoltage.ino.elf" "/tmp/arduino_build_772931/sketch/ReadAnalogVoltage.ino.cpp.o" "/tmp/arduino_build_772931/../arduino_cache_468036/core/core_arduino_avr_nano_cpu_atmega328old_1621df717313d057c92202babd71649a.a" "-L/tmp/arduino_build_772931" -lm
"/usr/bin/avr-objcopy" -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 "/tmp/arduino_build_772931/ReadAnalogVoltage.ino.elf" "/tmp/arduino_build_772931/ReadAnalogVoltage.ino.eep"
"/usr/bin/avr-objcopy" -O ihex -R .eeprom "/tmp/arduino_build_772931/ReadAnalogVoltage.ino.elf" "/tmp/arduino_build_772931/ReadAnalogVoltage.ino.hex"
Sketch uses 3512 bytes (11%) of program storage space. Maximum is 30720 bytes.
Global variables use 286 bytes (13%) of dynamic memory, leaving 1762 bytes for local variables. Maximum is 2048 bytes.
/usr/bin/avrdude -C/etc/avrdude.conf -v -patmega328p -carduino -P/dev/ttyUSB0 -b57600 -D -Uflash:w:/tmp/arduino_build_772931/ReadAnalogVoltage.ino.hex:i
avrdude: Version 7.1
Copyright the AVRDUDE authors;
see https://github.com/avrdudes/avrdude/blob/main/AUTHORS
System wide configuration file is /etc/avrdude.conf
User configuration file is /home/gil/.avrduderc
User configuration file does not exist or is not a regular file, skipping
Using Port : /dev/ttyUSB0
Using Programmer : arduino
Overriding Baud Rate : 57600
AVR Part : ATmega328P
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PC2
RESET disposition : possible i/o
RETRY pulse : SCK
Serial program mode : yes
Parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Alias Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- -------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 65 20 4 0 no 1024 4 0 3600 3600 0xff 0xff
flash 65 6 128 0 yes 32768 128 256 4500 4500 0xff 0xff
lfuse 0 0 0 0 no 1 1 0 4500 4500 0x00 0x00
hfuse 0 0 0 0 no 1 1 0 4500 4500 0x00 0x00
efuse 0 0 0 0 no 1 1 0 4500 4500 0x00 0x00
lock 0 0 0 0 no 1 1 0 4500 4500 0x00 0x00
signature 0 0 0 0 no 3 1 0 0 0 0x00 0x00
calibration 0 0 0 0 no 1 1 0 0 0 0x00 0x00
Programmer Type : Arduino
Description : Arduino for bootloader using STK500 v1 protocol
Hardware Version: 2
Firmware Version: 1.16
avrdude: AVR device initialized and ready to accept instructions
avrdude: device signature = 0x1e950f (probably m328p)
avrdude: reading input file /tmp/arduino_build_772931/ReadAnalogVoltage.ino.hex for flash
with 3512 bytes in 1 section within [0, 0xdb7]
using 28 pages and 72 pad bytes
avrdude: writing 3512 bytes flash ...
Writing | ################################################## | 100% 1.07s
avrdude: 3512 bytes of flash written
avrdude: verifying flash memory against /tmp/arduino_build_772931/ReadAnalogVoltage.ino.hex
Reading | ################################################## | 100% 0.79s
avrdude: 3512 bytes of flash verified
avrdude done. Thank you.
Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: 'java.lang.String cc.arduino.packages.formatter.AStyleInterface.AStyleMain(java.lang.String, java.lang.String)'
at cc.arduino.packages.formatter.AStyleInterface.AStyleMain(Native Method)
at cc.arduino.packages.formatter.AStyle.run(AStyle.java:80)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
This is a new install on Linux Mint 22.1.
Here is the test code:
/*
ReadAnalogVoltage
Reads an analog input on pin 0, converts it to voltage, and prints the result to the Serial Monitor.
Graphical representation is available using Serial Plotter (Tools > Serial Plotter menu).
Attach the center pin of a potentiometer to pin A0, and the outside pins to +5V and ground.
This example code is in the public domain.
https://www.arduino.cc/en/Tutorial/BuiltInExamples/ReadAnalogVoltage
*/
float voltage = 0;
int sensorValue = 0;
void showvolt(){
voltage = sensorValue * (5.0 / 1023.0); // Convert the analog reading (which goes from 0 - 1023) to a voltage (0 - 5V):
Serial.print(voltage); // print out the value you read:
Serial.print(F(" "));
}
// the setup routine runs once when you press reset:
void setup() {
// initialize serial communication at 115200 bits per second:
Serial.begin(115200);
Serial.print("\n\n\n\tHi Gil!\n\tFile: ");
Serial.print(__FILE__);
}
// the loop routine runs over and over again forever:
void loop() {
Serial.print(F("\n\t"));
sensorValue = analogRead(A0); // read the input on analog pin 0:
showvolt();
sensorValue = analogRead(A1); // read the input on analog pin 0:
showvolt();
sensorValue = analogRead(A2); // read the input on analog pin 0:
showvolt();
sensorValue = analogRead(A3); // read the input on analog pin 0:
showvolt();
sensorValue = analogRead(A4); // read the input on analog pin 0:
showvolt();
sensorValue = analogRead(A5); // read the input on analog pin 0:
showvolt();
sensorValue = analogRead(A6); // read the input on analog pin 0:
showvolt();
sensorValue = analogRead(A7); // read the input on analog pin 0:
showvolt();
// Serial.print(F("\n\t"));
delay(500);
}
This is modification of one of the examples to try out the install.