Grove - Electromagnet - Play With Raspberry Pi

Hi,



I have followed the instructions on the the seedstudio website but I cannot get the electromagnet to run with my raspberry pi. When changing into the directory and running sudo python grove_electromagnet.py I get the following message back.



Traceback (most recent call last):

File “grove_electromagnet.py”, line 38, in

import grovepi

File “/home/pi/GrovePi/Software/Python/grovepi.py”, line 52, in

import di_i2c

File “build/bdist.linux-armv7l/egg/di_i2c.py”, line 27, in

ImportError: No module named periphery



Any ideas how to fix this issue?

Thanks

Hi,



can you share the documentation link that you are following?

Thanks for the reply,



I was following this link,



http://wiki.seeedstudio.com/Grove-Electromagnet/



But I was getting a lot of errors during compiling and updating software etc.



I haven’t tried anything else to be honest.



Thanks

Hi,



Thanks for the replay, which version of python you are using?



If you are using python3 you can install the periphery package with this command.

</s>sudo pip3 install python-periphery <e>

or



for python 2 try with

</s>sudo pip install python-periphery <e>

and try to run the code again and please let me know the feedback.

It works!



Thank you.

Great, happy to know that.