Hello I'm new in the arduino world, so I'am trying to write my first blink program
With the IDE I can compile and upload it. But with the CLI , it Generating this output:
code:
void setup()
{
pinMode(22, OUTPUT);
}
void loop()
{
// turn the LED on (HIGH is the voltage level)
digitalWrite(22, HIGH);
delay(1000); // Wait for 1000 millisecond(s)
// turn the LED off by making the voltage LOW
digitalWrite(22, LOW);
delay(1000); // Wait for 1000 millisecond(s)
}
output:
avrdude: Version 6.3-20190619
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "/home/xxx/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf"
User configuration file is "/home/xxx/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : /dev/ttyUSB0
Using Programmer : wiring
Overriding Baud Rate : 115200
AVR Part : ATmega2560
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PA0
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 65 10 8 0 no 4096 8 0 9000 9000 0x00 0x00
flash 65 10 256 0 yes 262144 256 1024 4500 4500 0x00 0x00
lfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
efuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
lock 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
Programmer Type : Wiring
Description : Wiring
Programmer Model: AVRISP
Hardware Version: 15
Firmware Version Master : 2.10
Vtarget : 0.0 V
SCK period : 0.1 us
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.01s
avrdude: Device signature = 0x1e9801 (probably m2560)
avrdude: reading input file "/tmp/arduino/sketches/7C8AAA777F9E7DDAEFDB5D1880A1A0BA/Shine.ino.hex"
avrdude: writing flash (1536 bytes):
Writing | ################################################## | 100% 0.24s
avrdude: 1536 bytes of flash written
avrdude done. Thank you.
However I want flash it by avrdude CLI, so installed it and I used the tried this: sudo avrdude -c wiring -P /dev/ttyUSB0 -v -x delay=9000 -b 115200 -p atmega2560 -U flash:w:Shine.ino.hex:i
resulting in the following error,
Avrdude version 8.0-20240901 (30e19f23)
Copyright see https://github.com/avrdudes/avrdude/blob/main/AUTHORS
System wide configuration file is /usr/local/etc/avrdude.conf
User configuration file /root/.avrduderc does not exist
Using port : /dev/ttyUSB0
Using programmer : wiring
Setting baud rate : 115200
Error: timeout
Error: timeout
Error: timeout
Error: timeout
Error: timeout
Error: timeout
Error: timeout communicating with programmer
Error: stk500v2_getsync() failed; try -x delay=n with some n in [-80, 100]
Error: unable to open port /dev/ttyUSB0 for programmer wiring
Avrdude done. Thank you.
I'm trying to do that for some time now so a little help is very much appreciated
Thank you in advance for your Time
PS: English is not my primary language so so sorry for any grammatical issues