Community
cancel
Showing results for 
Search instead for 
Did you mean: 
ICust28
New Contributor I
3,120 Views

Servo motor is not working

Iam using Galileo board and IOT devkit image installed on SDcard.Nomarlly, the servo motor runs ok but recently, it is not working.

 

I tried on Adruino board and it runs ok.I tried to buy a new servo but the new one still not working.I dont know why.It is really strange.

Here is my code (i use Eclipse IDE)

# include "lcm1602.h"

# include

# include "opencv2/core/core.hpp"

# include

# include

// servo motor

int main(int argc, char **argv) {

upm::ES08A *servoMotor = NULL;

servoMotor = new upm::ES08A(5);

servoMotor->setAngle(90);

sleep(1);

servoMotor->setAngle(0);

delete servoMotor;

return 0;

}

13 Replies
ICust28
New Contributor I
142 Views

Additional information,

 

This afternoon, when i try to borrow my friend's SDcard that i installed IOT image for him before and it runs ok.I am so confused about this bug

 

i tried to write IOT image to my sd card again following this guide

https://software.intel.com/en-us/programming-blank-sd-card-with-yocto-linux-image-windows Making a bootable micro SD Card with Windows* | Intel® Developer Zone

And after that, i run program...It is not working again.

Do i forgot something ?Someone knows my case?

Sergio_A_Intel
Employee
142 Views

Hi,

Just to check I understand you correctly, your servo and code were running fine in Eclipse and it suddenly stopped working. You used another SD card with the same image and your project worked without any modifications. You then used your SD card again and it still didn't work.

If this is the case then the problem is most likely with the SD card. Can you try to format your SD card with FAT32 format and follow the steps from the guide you posted above? Does your and your friend's SD card have the same image version? You can check the version with cat /etc/version.

Sergio

ICust28
New Contributor I
142 Views

Hi Sergio,

 

I have checked the image version.Its 201506210418.my friend's SD card version is same to mine.i tried to format my sdcard as fat32 type and followed that guide.

 

But it still not working...i have "ghost" my laptop because of virus.I don't know whether that makes something go wrong or not.What should i do next?
ICust28
New Contributor I
142 Views

Now i have 2 SdCard, one is mine, one is his.Both of them use same devices.They have same version 201506210418.

One of them runs ok.The other can't make servo motor work(i still use it to control led, sensor,...except servo motor).

 

I tried to write IOT image to my sdcard many times but its still not working...

Any help?

Sergio_A_Intel
Employee
142 Views

If both SD cards have the same images, have the same modifications, have been formatted to FAT32 and are tested under the same conditions and one works and the other doesn't then the problem is most likely with the SD card.

Is there any chance you can try with a third SD card? Format it to FAT32, follow the guide to boot from the IoT image and try again.

Let us know your results.

Sergio

ICust28
New Contributor I
142 Views

i try another sdcard but ít still not working.do i have any way to check the servo libraries?

 

Iam finding the different between two sdcard.The old sdcard i made for him is ok but mine is not.I dont know whether my updating libraries make servo motor lib not work or not.

 

Do u need further information to detect what the problem is here?
ICust28
New Contributor I
142 Views

I have updated the sdcard image by using opkg update, opkg upgrade.I have downloaded the lastest IOT image.I tried to update everything but the servo is still not working.

 

I bought a new sdcard and tested but no luck...

 

Other sensors, devices run ok.Only the servo motor is not working.

Some additional pics when i run the newest version.

 

I think the issue is the servo library but i dont know how to fix it

 

 

Here is my log file from putty

"

root@galileo:~# login as: root

root@galileo:~# opkg update

Downloading http://iotdk.intel.com/repos/1.5/iotdk/all/Packages http://iotdk.intel.com/repos/1.5/iotdk/all/Packages.

Updated list of available packages in /var/lib/opkg/iotdk-all.

Downloading http://iotdk.intel.com/repos/1.5/iotdk/i586/Packages http://iotdk.intel.com/repos/1.5/iotdk/i586/Packages.

Updated list of available packages in /var/lib/opkg/iotdk-i586.

Downloading http://iotdk.intel.com/repos/1.5/iotdk/quark/Packages http://iotdk.intel.com/repos/1.5/iotdk/quark/Packages.

Updated list of available packages in /var/lib/opkg/iotdk-quark.

Downloading http://iotdk.intel.com/repos/1.5/iotdk/x86/Packages http://iotdk.intel.com/repos/1.5/iotdk/x86/Packages.

Updated list of available packages in /var/lib/opkg/iotdk-x86.

Downloading http://iotdk.intel.com/repos/1.5/intelgalactic/Packages http://iotdk.intel.com/repos/1.5/intelgalactic/Packages.

Updated list of available packages in /var/lib/opkg/mraa-upm.

root@galileo:~# opkg upgrade

Multiple replacers for libmraa-dev, using first one (libmraa0).

Multiple replacers for libmraa-doc, using first one (libmraa0).

Multiple replacers for upm-dev, using first one (upm).

Multiple replacers for upm-dev, using first one (upm).

Upgrading upm from 0.3.1-r0 to 0.3.2 on root.

Downloading http://iotdk.intel.com/repos/1.5/intelgalactic/upm_0.3.2_i586.ipk http://iotdk.intel.com/repos/1.5/intelgalactic/upm_0.3.2_i586.ipk.

Installing libmraa0 (0.7.3) on root.

Downloading http://iotdk.intel.com/repos/1.5/intelgalactic/libmraa0_0.7.3_i586.ipk http://iotdk.intel.com/repos/1.5/intelgalactic/libmraa0_0.7.3_i586.ipk.

Upgrading upm from 0.3.1-r0 to 0.3.2 on root.

Installing libmraa0 (0.7.2-r0.0) on root.

Downloading http://iotdk.intel.com/repos/1.5/iotdk/i586/libmraa0_0.7.2-r0.0_i586.ipk http://iotdk.intel.com/repos/1.5/iotdk/i586/libmraa0_0.7.2-r0.0_i586.ipk.

Collected errors:

* check_data_file_clashes: Package libmraa0 wants to install file /usr/lib/python2.7/site-packages/mraa.py

But that file is already provided by package * mraa

* check_data_file_clashes: Package libmraa0 wants to install file /usr/lib/python2.7/site-packages/_mraa.so

But that file is already provided by package * mraa

* check_data_file_clashes: Package libmraa0 wants to install file /usr/lib/libmraa.so.0

But that file is already provided by package * mraa

* check_data_file_clashes: Package libmraa0 wants to install file /usr/lib/pkgconfig/mraa.pc

But that file is already provided by package * mraa-dev

* check_data_file_clashes: Package libmraa0 wants to install file /usr/lib/libmraa.so

But that file is already provided by package * mraa-dev

* check_data_file_clashes: Package libmraa0 wants to install file /usr/lib/node_modules/mraa/package.json

But that file is already provided by package * mraa

* check_data_file_clashes: Package libmraa0 wants to install file /usr/lib/node_modules/mraa/mraa.node

But that file is already provided by package * mraa

* check_data_file_clashes: Package libmraa0 wants to install file /usr/include/mraa/types.h

But that file is already provided by package * mraa-dev

* check_data_file_clashes: Package libmraa0 wants to install file /usr/include/mraa/aio.hpp

But that file is already provided by package * mraa-dev

* check_data_file_clashes: Package libmraa0 wants to install file /usr/include/mraa/spi.hpp

But that file is already provided by package * mraa-dev

* check_data_file_clashes: Package libmraa0 wants to install file /usr/include/mraa/gpio.h

But that file is already provided by package * mraa-dev

* check_data_file_clashes: Package libmraa0 wants to install file /usr/include/mraa/gpio.hpp

But that file is already provided by package * mraa-dev

* check_data_file_clashes: Package libmraa0 wants to install file /usr/include/mraa/aio.h

But that file is already provided by package * mraa-dev

* check_data_file_clashes: Package libmraa0 wants to install file /usr/include/mraPassword: a

* check_data_file_clashes: Package libmraa0 wants to install file /usr/share/mraa/examples/c++/Uart-example.cpp

But that file is already provided by package * mraa-doc

* check_data_file_clashes: Package libmraa0 wants to install file /usr/share/mraa/examples/c++/I2c-compass.cpp

But that file is already provided by package * mraa-doc

* check_data_file_clashes: Package libmraa0 wants to install file /usr/share/mraa/examples/c++/Spi-pot.cpp

But that file is already provided by package * mraa-doc

* check_data_file_clashes: Package libmraa0 wants to install file /usr/share/mraa/exampLogin incorrect"

Sergio_A_Intel
Employee
142 Views

Take a look at the first error message you received. "The repository version detected on the target is older than the Eclipse version". What repository are you using and what Eclipse version are you using? The latest Eclipse version is Luna SR2 (4.4.2). Can you try to update to repository 1.1 instead of 1.5: http://iotdk.intel.com/repos/1.1/iotdk/ iotdk/ ?

Let us know your results.

Sergio

ICust28
New Contributor I
142 Views

Today, i tried to update repository 1.1 instead 1.5 but have no luck.(i tried repository 2.0 too).The repository i am using is 1.5.My Eclipse versions i tried are both Luna SR2 (4.4.2) and Luna SR1 (4.4.1)

 

I downloaded the newlest version of Eclipse, install the newlest iot image on my sdcard but it seems the new library of upm is not compatible with my generic servo motor.

 

Now, i just run my servo motor successfully with my friend sdcard(i installed iot image for him 3 months ago).

Here is the content of file mraa-upm.conf on my sdcard :"src mraa-upm http://iotdk.intel.com/repos/1.5/intelgalactic http://iotdk.intel.com/repos/1.5/intelgalactic"

I tried to replace the content of directory opkg on my sdcard by the old sdcard.After that i update library using opkg update and opkg upgrade but my servo is still not working.(3 months ago, i did the same and its working).

 

I want to install the old upm library(same my friend sdcard) but i don't know how to do it.
ICust28
New Contributor I
142 Views

Here is my upm and mrra lib info on old sdcard(run ok with servo motor)

 

UPM:

 

"login as: root

root@galileo:~# opkg info upm

Package: upm

Version: 0.3.1-r0

Depends: libgcc1 (>= 4.9.1), libpython2.7-1.0 (>= 2.7.3), libc6 (>= 2.20), python-core, libstdc++6 (>= 4.9.1), mraa (>= 0.7.2)

Status: unknown ok not-installed

Section: libs

Architecture: i586

Maintainer: Intel IoT Devkit team <</span>mailto:meta-intel@yoctoproject.org meta-intel@yoctoproject.org>

MD5Sum: 9c38c6a23db13fbeb8c687336d473200

Size: 10344826

Filename: upm_0.3.1-r0_i586.ipk

Source: git://github.com/intel-iot-devkit/upm.git;protocol=git;rev=3d453811fb7760e14da1a3461e05bfba1893c2bd file://0001-adafruitms1438-CMakeLists.txt-stop-RPATH-being-added.patch

Description: Sensor/Actuator repository for Mraa Sensor/Actuator repository for Mraa.

Package: upm

Version: 0.3.2

Depends: libmraa0 (>= 0.6.2)

Provides: upm-dev, upm-dbg, upm-doc

Replaces: upm-dev, upm-dbg, upm-doc

Conflicts: upm-dev, upm-dbg, upm-doc

Status: install user installed

Section: libs

Architecture: i586

Maintainer: Intel IoT-Devkit

MD5Sum: 7cdf6f1fbe1f19131c5b6715cdb62c5f

Size: 6700570

Filename: upm_0.3.2_i586.ipk

Source: https://github.com/intel-iot-devkit/upm https://github.com/intel-iot-devkit/upm

Description: upm built using CMake

Installed-Time: 1446741253"

 

MRAA:

"root@galileo:~# opkg info libmraa0

Package: libmraa0

Version: 0.7.2-r0.0

Depends: libgcc1 (>= 4.9.1), python-core, libpython2.7-1.0 (>= 2.7.3), libstdc++6 (>= 4.9.1), libc6 (>= 2.20)

Provides: mraa

Status: install ok not-installed

Section: libs

Architecture: i586

Maintainer: Yocto Devkit <</span>mailto:yocto-devkit@linux.intel.com yocto-devkit@linux.intel.com>

MD5Sum: 644cad13dfe4dca86f79f537c57fe4ea

Size: 458022

Filename: libmraa0_0.7.2-r0.0_i586.ipk

Source: git://github.com/intel-iot-devkit/mraa.git;protocol=git;rev=299bf5ab27191e60ea0280627da2161525fc8990

Description: Low Level Skeleton Library for Communication on Intel platforms Low

Level Skeleton Library for Communication on Intel platforms.

Package: libmraa0

Version: 0.7.3

Provides: libmraa-dev, libmraa-dbg, libmraa-doc

Replaces: libmraa-dev, libmraa-dbg, libmraa-doc

Conflicts: libmraa-dev, libmraa-dbg, libmraa-doc

Status: install prefer,user not-installed

Section: libs

Architecture: i586

Maintainer: Intel IoT-Devkit

MD5Sum: 0a8a748d6d31f1c9e7968cca068f24df

Size: 285260

Filename: libmraa0_0.7.3_i586.ipk

Source: https://github.com/intel-iot-devkit/mraa https://github.com/intel-iot-devkit/mraa

Description: mraa built using CMake"

 

When i try to update new upm lib on new sdcard but not succeed

 

"root@galileo:~# opkg install upm

Upgrading upm from 0.3.1-r0 to 0.3.2 on root.

Downloading http://iotdk.intel.com/repos/1.5/intelgalactic//upm_0.3.2_i586.ipk http://iotdk.intel.com/repos/1.5/intelgalactic//upm_0.3.2_i586.ipk.

Installing libmraa0 (0.7.3) on root.

Downloading http://iotdk.intel.com/repos/1.5/intelgalactic//libmraa0_0.7.3_i586.ipk http://iotdk.intel.com/repos/1.5/intelgalactic//libmraa0_0.7.3_i586.ipk.

Collected errors:

* check_data_file_clashes: Package libmraa0 wants to install file /usr/lib/python2.7/site-packages/mraa.py

But that file is already provided by package * mraa

* check_data_file_clashes: Package libmraa0 wants to install file /usr/lib/python2.7/site-packages/_mraa.so

But that file is already provided by package * mraa

* check_data_file_clashes: Package libmraa0 wants to install file /usr/lib/libmraa.so.0

But that file is already provided by package * mraa

* check_data_file_clashes: Package libmraa0 wants to install file /usr/lib/pkgconfig/mraa.pc

But that file is already provided by package * mraa-dev

* check_data_file_clashes: Package libmraa0 wants to install file /usr/lib/libmraa.so

But that file is already provided by package * mraa-dev

* check_data_file_clashes: Package libmraa0 wants to install file /usr/lib/node_modules/mraa/package.json

But that file is already provided by package * mraa

* check_data_file_clashes: Package libmraa0 wants to install file /usr/lib/node_modules/mraa/mraa.node

But that file is already provided by package * mraa

* check_data_file_clashes: Package libmraa0 wants to install file /usr/include/mraa/types.h

But that file is already provided by package * mraa-dev

* check_data_file_clashes: Package libmraa0 wants to install file /usr/include/mraa/aio.hpp

But that file is already provided by package * mraa-dev

* check_data_file_clashes: Package libmraa0 wants to install file /usr/include/mraa/spi.hpp

But that file is already provided by package * mraa-dev

* check_data_file_clashes: Package libmraa0 wants to install file /usr/include/mraa/gpio.h

But that file is already provided by package * mraa-dev

* check_data_file_clashes: Package libmraa0 wants to install file /usr/include/mraa/gpio.hpp

But that file is already provided by package * mraa-dev

* check_data_file_clashes: Package libmraa0 wants to install file /usr/include/mraa/aio.h

But that file is already provided by package * mraa-dev

* check_data_file_clashes: Package libmraa0 wants to install file /usr/include/mraa/uart.hpp

But that file is already provided by package * mraa-dev

* check_data_file_clashes: Package libmraa0 wants to install file /usr/include/mraa/common.hpp

But that file is already provided by package * mraa-dev

* check_data_file_clashes: Package libmraa0 wants to install file /usr/include/mraa/i2c.h

But that file is already provided by package * mraa-dev

* check_data_file_clashes: Package libmraa0 wants to install file /usr/include/mraa/pwm.h

But that file is already provided by package * mraa-dev

* check_data_file_clashes: Package libmraa0 wants to install file /usr/include/mraa/spi.h

But that file is already provided by package * mraa-dev

* check_data_file_clashes: Package libmraa0 wants to install file /usr/include/mraa/i2c.hpp

But that file is already provided by package * mraa-dev

* check_data_file_clashes: P...

Sergio_A_Intel
Employee
142 Views

The libraries in the IoT image of Galileo can be found in /usr/lib/. Check what libraries are on your SD card and compare it to the SD card in which the servo works.

If I run opkg info upm I get a newer version, I have installed 0.4.0

My image version is also different, if I run cat /etc/version I get 201510010732.

Download the newest version of the image to see if you get these upm and mraa versions. Then run opkg update again to see if you get different results.

Sergio

Sergio_A_Intel
Employee
142 Views

Were you able to follow the suggestions from our latest post? Have you managed to get the servo working?

Sergio

ICust28
New Contributor I
142 Views

I tried all your suggestions but i still not have been successful.

 

Finally, the temporary solution is that i copied my friend's sd card but it is not the real answer.
Reply