I don't think my code is uploading to my Arduino

I use an Intel Galileo. Whenever I try to upload code to me Arduino, it just simply doesn't. I have no idea why, and I have been trying to figure it out for a while now. What I am trying to do is start with pin 3 LOW, and loop [wait 1000 milliseconds], [pin 3 HIGH], [wait 1000 milliseconds], [pin 3 LOW]. I have Digital Pin 3 connected to an LED, with the LED grounded. I am connected to COM3 Serial Port.
Code:

void setup() {
  digitalWrite(3, LOW); //Digital Pin 3 LOW (Off)
}

void loop() {
  delay(1000); //Wait 1000 Milliseconds
  digitalWrite(3, HIGH); //Digital Pin 3 HIGH (On)
  delay(1000); //Wait 1000 Milliseconds
  digitalWrite(3, LOW); //Digital Pin 3 LOW (Off)
}

Output:

Sketch uses 57998 bytes (0%) of program storage space. Maximum is 10000000 bytes.
cygwin warning:
  MS-DOS style path detected: C:\Users\LawfulDmcBoo\AppData\Local\Arduino15\packages\Intel\tools\sketchUploader\1.6.2+1.0/clupload/cluploadGalileo_win.sh
  Preferred POSIX equivalent is: /cygdrive/c/Users/LawfulDmcBoo/AppData/Local/Arduino15/packages/Intel/tools/sketchUploader/1.6.2+1.0/clupload/cluploadGalileo_win.sh
  CYGWIN environment variable option "nodosfilewarning" turns off this warning.
  Consult the user's guide for more details about POSIX paths:
    http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
#!/bin/sh

# clupload script to invoke lsz 
# Copyright (C) 2014 Intel Corporation
# 
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
# 
# This library 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
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
#

echo "starting download script"
echo "Args to shell:" $*

# ARG 1: Path to lsz executable.
# ARG 2: Elf File to download
# ARG 3: COM port to use.

#path contains \ need to change all to /
path_to_exe=$1
fixed_path=${path_to_exe//\\/\/}

#COM ports are not always setup to be addressed via COM for redirect.
#/dev/ttySx are present. Howwever, COMy -> /dev/ttySx where x = y - 1

com_port_arg=$3
com_port_id=${com_port_arg/COM/}
echo "COM PORT" $com_port_id
tty_port_id=/dev/ttyS$((com_port_id-1))
echo "Converted COM Port" $com_port_arg "to tty port" $tty_port_id

echo "Sending Command String to move to download if not already in download mode"
echo "~sketch downloadGalileo" > $tty_port_id
starting download script
Args to shell: C:\Users\LawfulDmcBoo\AppData\Local\Arduino15\packages\Intel\tools\sketchUploader\1.6.2+1.0/x86/bin C:\Users\LawfulDmcBoo\AppData\Local\Temp\arduino\sketches\74CBFD6E853A3DB15DD37B6E87301E6D/Pin3Blink.ino.elf COM3
COM PORT 3
Converted COM Port COM3 to tty port /dev/ttyS2
Sending Command String to move to download if not already in download mode
Deleting existing sketch on target

#Move the existing sketch on target.
echo "Deleting existing sketch on target"
"$fixed_path/lsz.exe" --escape -c "mv -f /sketch/sketch.elf /sketch/sketch.elf.old" <> $tty_port_id 1>&0

Transfer incomplete
# Execute the target download command

#Download the file.
host_file_name=$2
"$fixed_path/lsz.exe" --escape --binary --overwrite $host_file_name <> $tty_port_id 1>&0
Sending: Pin3Blink.ino.elf

Bytes Sent:   1024/  57840   BPS:21698    ETA 00:02  
Bytes Sent:   9216/  57840   BPS:166932   ETA 00:00  
Bytes Sent:  10240/  57840   BPS:176493   ETA 00:00  
Bytes Sent:  11264/  57840   BPS:186012   ETA 00:00  
Bytes Sent:  12288/  57840   BPS:199044   ETA 00:00  
Bytes Sent:  13312/  57840   BPS:211728   ETA 00:00  
Bytes Sent:  14336/  57840   BPS:223755   ETA 00:00  
Bytes Sent:  15360/  57840   BPS:234553   ETA 00:00  
Bytes Sent:  16384/  57840   BPS:245707   ETA 00:00  
Bytes Sent:  17408/  57840   BPS:256823   ETA 00:00  
Bytes Sent:  18432/  57840   BPS:266751   ETA 00:00  
Bytes Sent:  19456/  57840   BPS:278767   ETA 00:00  
Bytes Sent:  20480/  57840   BPS:290979   ETA 00:00  
Bytes Sent:  21504/  57840   BPS:303274   ETA 00:00  
Bytes Sent:  22528/  57840   BPS:314575   ETA 00:00  
Bytes Sent:  23552/  57840   BPS:319700   ETA 00:00  
Bytes Sent:  24576/  57840   BPS:330562   ETA 00:00  
Bytes Sent:  25600/  57840   BPS:340651   ETA 00:00  
Bytes Sent:  26624/  57840   BPS:347408   ETA 00:00  
Bytes Sent:  27648/  57840   BPS:348918   ETA 00:00  
Bytes Sent:  28672/  57840   BPS:349918   ETA 00:00  
Bytes Sent:  29696/  57840   BPS:355283   ETA 00:00  
Bytes Sent:  30720/  57840   BPS:360161   ETA 00:00  
Bytes Sent:  31744/  57840   BPS:364479   ETA 00:00  
Bytes Sent:  32768/  57840   BPS:362971   ETA 00:00  
Bytes Sent:  33792/  57840   BPS:361473   ETA 00:00  
Bytes Sent:  34816/  57840   BPS:365456   ETA 00:00  
Bytes Sent:  35840/  57840   BPS:369221   ETA 00:00  
Bytes Sent:  36864/  57840   BPS:373223   ETA 00:00  
Bytes Sent:  37888/  57840   BPS:377175   ETA 00:00  
Bytes Sent:  38912/  57840   BPS:381060   ETA 00:00  
Bytes Sent:  39936/  57840   BPS:384813   ETA 00:00  
Bytes Sent:  40960/  57840   BPS:382900   ETA 00:00  
Bytes Sent:  41984/  57840   BPS:385758   ETA 00:00  
Bytes Sent:  43008/  57840   BPS:377922   ETA 00:00  
Bytes Sent:  44032/  57840   BPS:381288   ETA 00:00  
Bytes Sent:  45056/  57840   BPS:384768   ETA 00:00  
Bytes Sent:  46080/  57840   BPS:388107   ETA 00:00  
Bytes Sent:  47104/  57840   BPS:391385   ETA 00:00  
Bytes Sent:  48128/  57840   BPS:387691   ETA 00:00  
Bytes Sent:  49152/  57840   BPS:389785   ETA 00:00  
Bytes Sent:  50176/  57840   BPS:392754   ETA 00:00  
Bytes Sent:  51200/  57840   BPS:395583   ETA 00:00  
Bytes Sent:  52224/  57840   BPS:398346   ETA 00:00  
Bytes Sent:  53248/  57840   BPS:400990   ETA 00:00  
Bytes Sent:  54272/  57840   BPS:403743   ETA 00:00  
Bytes Sent:  55296/  57840   BPS:406462   ETA 00:00  
Bytes Sent:  56320/  57840   BPS:408930   ETA 00:00  
Bytes Sent:  57344/  57840   BPS:407851   ETA 00:00  
Bytes Sent:  57840   BPS:389943                          
Moving downloaded file to /sketch/sketch.elf on target

Transfer complete

#mv the downloaded file to /sketch/sketch.elf 
target_download_name="${host_file_name##*/}" 
echo "Moving downloaded file to /sketch/sketch.elf on target"
"$fixed_path/lsz.exe" --escape -c "mv $target_download_name /sketch/sketch.elf; chmod +x /sketch/sketch.elf" <> $tty_port_id 1>&0

Transfer complete

Any help with this would be amazing. Thanks!

one suggestion is to configure pin 3 as an OUTPUT in setup() instead is digitalWrite()

pinMode (3, OUTPUT);

curious about your use of cygwin. i use cygwin but use the Arduino IDE to locate the libraries, compile and download the code

I'm new to Arduino, so I'm just trying to get things going. I'm not exactly sure what cygwin is, though.

what environment/IDE are you using ? aren't you using the Arduino IDE?

i don't understand what you posted? where did it come from?

i see the following when i download the code with the pinMode() correction on my Uno

Sketch uses 924 bytes (2%) of program storage space. Maximum is 32256 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.

Yes, I am using the Arduino IDE. What I posted came from its console.

looks like they may be doing something different because of the intel process

make that pinmode change and try again. it may be downloading correctly, you're just not seeing the results you can expect

try using Serial.begin (9600), Serial.println ("Hello World") and see if something is displayed on the IDE's serial monitor

Hmm. Still not working. Maybe it has to do something with whatever cygwin is.

wiki Intel_Galileo
Cool looking old board..
Is that what you have??

~q

What is arduino board you using?

???

Hi, @lawfuldmcboo
Welcome to the forum.

Can you please post an image of your controller?

Have you selected your board in the IDE?

What version of the IDE are you using?

Have you been able to successfully program the Galileo before?

Have you programmed any other controller with the IDE?

Thanks.. Tom.. :smiley: :+1: :coffee: :australia:

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.