Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Novice
1,247 Views

Using Adafruit Motor Shield with Galileo Gen 1

Jump to solution

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: 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...


Accepted Solutions
Highlighted
Employee
17 Views

Hello JamesNagle,

It seems that the issue is because of the library used. The library was written based on the Arduino boards' architecture. This means that it won't work on Galileo. The workaround you made allows the Arduino IDE to compile the library but it doesn't mean that the code will work as it should.

Anyhow, where did you get the library? I would like to take a look at it. Hopefully we can do something to make it work.

Regards,

Diego.

View solution in original post

2 Replies
Highlighted
Employee
18 Views

Hello JamesNagle,

It seems that the issue is because of the library used. The library was written based on the Arduino boards' architecture. This means that it won't work on Galileo. The workaround you made allows the Arduino IDE to compile the library but it doesn't mean that the code will work as it should.

Anyhow, where did you get the library? I would like to take a look at it. Hopefully we can do something to make it work.

Regards,

Diego.

View solution in original post

Highlighted
Novice
17 Views

Thanks for your response,

I eventually got the library to work after completely uninstalling and reinstalling the Galileo and IDE. I have had to do so again recently and have not checked is the library still working.

Thanks,

James

0 Kudos