have you upgraded libmraa / UPM? Which versions do you have?
# opkg info libmraa0 | head -n 2
# opkg info upm | head -n 2
If it's an old version you might have to setup opkg with something like
> /etc/opkg/mraa-upm.conf <<EOF
src mraa-upm http://iotdk.intel.com/repos/1.1/intelgalactic
opkg update && opkg upgrade
Actually the Eclipse IDE has libmraa.so - otherwise you couldn't have compile the LED blink sample. You can check the compilation in the Eclipse Build console (replaced the actual path with <iotdk home>) which should look like:
i586-poky-linux-g++ "-I<iotdk home>/devkit-x86/sysroots/i586-poky-linux/usr/include" "-I<iotdk home>/devkit-x86/sysroots/i586-poky-linux/usr/include/c++" "-I<iotdk home>/devkit-x86/sysroots/i586-poky-linux/usr/include/c++/i586-poky-linux" "-I<iotdk home>/devkit-x86/sysroots/i586-poky-linux/usr/include/upm" -Os -g3 -Wall "--sysroot=<iotdk home>\devkit-x86\sysroots\i586-poky-linux" -m32 -march=i586 -c -ffunction-sections -fdata-sections -o "src\6_cpp_upm_i2c_grove_LCD.o" "..\src\6_cpp_upm_i2c_grove_LCD.cpp"
i586-poky-linux-g++ "--sysroot=<iotdk home>\devkit-x86\sysroots\i586-poky-linux" -lupm-i2clcd -o 6_cpp_upm_i2c_grove_LCD "src\6_cpp_upm_i2c_grove_LCD.o"
The library libupm-i2clcd itself depends on libmraa0 as you can see running ldd
# ldd /usr/lib/libupm-i2clcd.so
libmraa.so.0 => /usr/lib/libmraa.so.0 (0xb76f0000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb7606000)
libm.so.6 => /lib/libm.so.6 (0xb75b9000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb75a5000)
libc.so.6 => /lib/libc.so.6 (0xb742e000)
libpthread.so.0 => /lib/libpthread.so.0 (0xb7412000)
So something seems wrong with your setup on Eclipse.
That said: the unmodified version of grove lcd won't run on Intel(R) Edison Arduino board. You'd have to replace the I2C channel 0 to 6. You can do like following (this is the version I'll update some time to the Eclipse samples):
* Author: Yevgeniy Kiveish <email@example.com>
* Matthias Hahn <firstname.lastname@example.org>
* Copyright (c) 2014 Intel Corporation.
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// 0x62 RGB_ADDRESS, 0x3E LCD_ADDRESS
mraa_platform_t platform = mraa_get_platform_type();
upm::Jhd1313m1(6, 0x3E, 0x62);
upm::Jhd1313m1(0, 0x3E, 0x62);
You would have to additionally link to libmraa in order to run this
where do i run this command ? I tried it on my computer it's not found.
Opps sorry. I meant this command:\
Thanks a lot matthias-hahn (Intel). You are right. I was running on my local. Now the program is running on Edison. Sorry I am a noob haha. Btw, when I tried the Grove LCD demo, it said Segmentation fault. Any idea?
pierre w. wrote:
Thanks a lot matthias-hahn (Intel). You are right. I was running on my local. Now the program is running on Edison. Sorry I am a noob haha.
No problem. Good it's running now
pierre w. wrote:
Btw, when I tried the Grove LCD demo, it said Segmentation fault. Any idea?
Sure. That's why I mentioned the program wouldn't run unmodified on Edison. I put the other source code. If it's just for Edison you will have to only change the I2C channel from 0 to 6 (see my code)
Thank you very much. Now the LCD sample is running. Thanks a lot!
Good to see you have it working.
On more thing I forgot to mention: We started putting updates for libmraa and upm to http://iotdk.intel.com/sdk/mraa-update/, and http://iotdk.intel.com/sdk/upm-update/ respectively to keep the IDE up to date. You can take the latest of those zips each and extract in the home folder of your IDE installation. It will by purpose overwrite existing files. Within the IDE you might have to right click a project -> Index -> Rebuild in order to make Eclipse aware of those changes.
Running the 3_c_onboard_LED_blink eclipse project, but there is no blinking.
Updated libmraa, UPM on the Edison Arduino board.
root@edison1:~# opkg info libmraa0 | head -n 2
root@edison1:~# opkg info upm | head -n 2
Extracted win-mraa-0.5.2.6.zip and win-upm-0.1.8.55.zip in the home folder of my IDE installation, updating mraa and upm.
Added section to identify the Edison board.
gpio = mraa_gpio_init(13);
Rebuild indexes and projects. When running, getting this output, but now blinks.
Any help is greatly appreciated.