2 Replies Latest reply on Nov 14, 2015 11:51 AM by JamesNagle

    Using Adafruit Motor Shield with Galileo Gen 1

    JamesNagle

      Hi all,

       

      I am having trouble getting the adafruit motorshield to run with my gen 1 galileo. I have added the correct library and made the changes relating to wire1 as shown here:Re: Adafruit Motor Shield v2. The blink sketch runs successfully but then if I attach the motor shield and run the DCMotorTest example I get the "Transfer complete" message (full output added at the end) but nothing happens. The motor doesn't spin and there is no noise from the motor. If i open the Serial Monitor "tick", "tock" and "tech" are being successfully printed. If I plug out the galileo and set up my arduino (changing the board and port) the sketch works fine with the motor spinning.

      At the head of the message when I upload the sketch using arduino ide 1.6.4 is the following:

      WARNING: library Servo claims to run on [i586-uclibc] architecture(s) and may be incompatible with your current board which runs on [i586] architecture(s).

      Could this be causing the problem and if so is there any advice on changing it?

       

      The driver and firmware are up to date, the correct board and port are selected, the blink sketch works normally, the DCMotorTest sketch works on an arduino. There is an SD card in the SDIO slot. Without the SD card in, when i tried this last night, the output was almost identical to that below except for:

       

      #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

       

      which instead ended with something like $tty_port_id 1>TIMEOUT

       

      Any help or advice would be greatly appreciated,

      James

       

       

       

       

       

      The full output from uploading the sketch is as follows:

       

      WARNING: library Servo claims to run on [i586-uclibc] architecture(s) and may be incompatible with your current board which runs on [i586] architecture(s).

       

       

       

       

      Sketch uses 62,214 bytes (0%) of program storage space. Maximum is 10,000,000 bytes.

      #!/bin/sh

      starting download script

       

       

      # clupload script to invoke lsz

      Args to shell: C:\Users\maniacalbrain\AppData\Roaming\Arduino15\packages\Intel\tools\sketchUploader\1.6.2+1.0/x86/bin C:\Users\MANIAC~1\AppData\Local\Temp\build1591216192387565227.tmp/DCMotorTest.cpp.elf COM6

      # 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

      COM PORT 6

      # version 2.1 of the License, or (at your option) any later version.

      #

      Converted COM Port COM6 to tty port /dev/ttyS5

      # This library is distributed in the hope that it will be useful,

      Sending Command String to move to download if not already in download mode

      # 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:" $*

      Deleting existing sketch on target

       

       

      # 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

       

       

      #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 complete

      # 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: DCMotorTest.cpp.elf

       

       

      Bytes Sent:   1024/  61716   BPS:112812   ETA 00:00 

      Bytes Sent:   9216/  61716   BPS:676155   ETA 00:00 

      Bytes Sent:  10240/  61716   BPS:718444   ETA 00:00 

      Bytes Sent:  11264/  61716   BPS:756124   ETA 00:00 

      Bytes Sent:  12288/  61716   BPS:791038   ETA 00:00 

      Bytes Sent:  13312/  61716   BPS:823863   ETA 00:00 

      Bytes Sent:  14336/  61716   BPS:856033   ETA 00:00 

      Bytes Sent:  15360/  61716   BPS:883723   ETA 00:00 

      Bytes Sent:  16384/  61716   BPS:902898   ETA 00:00 

      Bytes Sent:  17408/  61716   BPS:897319   ETA 00:00 

      Bytes Sent:  18432/  61716   BPS:920035   ETA 00:00 

      Bytes Sent:  19456/  61716   BPS:940812   ETA 00:00 

      Bytes Sent:  20480/  61716   BPS:961005   ETA 00:00 

      Bytes Sent:  21504/  61716   BPS:988689   ETA 00:00 

      Bytes Sent:  22528/  61716   BPS:1020520  ETA 00:00 

      Bytes Sent:  23552/  61716   BPS:1047826  ETA 00:00 

      Bytes Sent:  24576/  61716   BPS:1077988  ETA 00:00 

      Bytes Sent:  25600/  61716   BPS:1106356  ETA 00:00 

      Bytes Sent:  26624/  61716   BPS:1134383  ETA 00:00 

      Bytes Sent:  27648/  61716   BPS:1159099  ETA 00:00 

      Bytes Sent:  28672/  61716   BPS:1162975  ETA 00:00 

      Bytes Sent:  29696/  61716   BPS:1159727  ETA 00:00 

      Bytes Sent:  30720/  61716   BPS:1159989  ETA 00:00 

      Bytes Sent:  31744/  61716   BPS:1160657  ETA 00:00 

      Bytes Sent:  32768/  61716   BPS:1158903  ETA 00:00 

      Bytes Sent:  33792/  61716   BPS:1156982  ETA 00:00 

      Bytes Sent:  34816/  61716   BPS:1152236  ETA 00:00 

      Bytes Sent:  35840/  61716   BPS:1148386  ETA 00:00 

      Bytes Sent:  36864/  61716   BPS:1143636  ETA 00:00 

      Bytes Sent:  37888/  61716   BPS:1140037  ETA 00:00 

      Bytes Sent:  38912/  61716   BPS:1133502  ETA 00:00 

      Bytes Sent:  39936/  61716   BPS:1130242  ETA 00:00 

      Bytes Sent:  40960/  61716   BPS:1127349  ETA 00:00 

      Bytes Sent:  41984/  61716   BPS:1124581  ETA 00:00 

      Bytes Sent:  43008/  61716   BPS:1122015  ETA 00:00 

      Bytes Sent:  44032/  61716   BPS:1119495  ETA 00:00 

      Bytes Sent:  45056/  61716   BPS:1113043  ETA 00:00 

      Bytes Sent:  46080/  61716   BPS:1109452  ETA 00:00 

      Bytes Sent:  47104/  61716   BPS:1105935  ETA 00:00 

      Bytes Sent:  48128/  61716   BPS:1101957  ETA 00:00 

      Bytes Sent:  49152/  61716   BPS:1099302  ETA 00:00 

      Bytes Sent:  50176/  61716   BPS:1096048  ETA 00:00 

      Bytes Sent:  51200/  61716   BPS:1093970  ETA 00:00 

      Bytes Sent:  52224/  61716   BPS:1091182  ETA 00:00 

      Bytes Sent:  53248/  61716   BPS:1089205  ETA 00:00 

      Bytes Sent:  54272/  61716   BPS:1087026  ETA 00:00 

      Bytes Sent:  55296/  61716   BPS:1085128  ETA 00:00 

      Bytes Sent:  56320/  61716   BPS:1082431  ETA 00:00 

      Bytes Sent:  57344/  61716   BPS:1080412  ETA 00:00 

      Bytes Sent:  58368/  61716   BPS:1079130  ETA 00:00 

      Bytes Sent:  59392/  61716   BPS:1077718  ETA 00:00 

      Bytes Sent:  60416/  61716   BPS:1074654  ETA 00:00 

      Bytes Sent:  61440/  61716   BPS:1074651  ETA 00:00 

      Bytes Sent:  61716   BPS:897830                         

       

       

      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

      Moving downloaded file to /sketch/sketch.elf on target

       

       

      Transfer complete