I’m a newbie trying to setup my new Pi 2 with GrovePI+ but it appears something is not working or done correct, can you please help me.
I have run the text programs from the troubleshooting folder and attached the log.txt.
I’m able to run the led blink example from the command line and I can also run the simple LCD example, but the rest doesn’t run at all. I’m not sure but it appears like the path to some GrovePI bin files are missing or something.
I get errors like
>>>
Traceback (most recent call last):
File “/home/pi/GrovePI/Software/Python/grove_rgb_lcd/grove_rgb_lcd.py”, line 48, in <module>
import smbus
ImportError: No module named ‘smbus’
>>>
Python 2.7.9 (default, Mar 8 2015, 00:52:26)
[GCC 4.9.2] on linux2
Type “copyright”, “credits” or “license()” for more information.
>>> ================================ RESTART ================================
>>>
Traceback (most recent call last):
File “/home/pi/GrovePI/Projects/home_temp_humi_display/home_temp_hum_display.py”, line 31, in <module>
from grovepi import *
ImportError: No module named grovepi
>>>
I ran into this problem myself.
The problem is that the grovepi.py module is not on the path from where you are running the program you desire.
I posted a complicated debugging session when I hit it, you can find it elsewhere on the forum.
However, I wrote it as I debugged it, and thus is not so easy to follow…
The canned DEXTER image puts the software into the directory ~pi/Desktop/GrovePi and from your posting that means you are not running that canned image.
There is one way to solve the near term problem. Simply burn a new image from Dexter onto a card and then run things.
However, if you want to keep the sdcard image that you have, you can modify a file that will correct the paths…
The file you need to modify is /usr/lib/python2.7/dist-packages/grove.pth . Edit that file and change the paths from ~pi/Desktop/GrovePi to where you installed the tree which looks like is to /home/pi/GrovePi .
I hope that helps, I do not have access to my unit to double check, but from my notes on the forum I think that is correct.