Seeed-Studio / grove.py

Python library for Seeedstudio Grove devices
MIT License
146 stars 96 forks source link

Can't Run Examples #62

Open dooley-ch opened 1 year ago

dooley-ch commented 1 year ago

It seems that mraa and upm libraries and not maintained anymore. So you cannot use mraa and upm related Grove modules. FIX THIS BLOODY ISSUE AND DO NOT CLOSE IT AGAIN UNTIL IT IS FIXED.

jbazala commented 1 year ago

Hello, I have same issue, I bought Grove Base Kit for Raspberry Pi on August to learn how IoT works and then for using sensors and LCD in future project.. but nothings works.. all documentations, instructions and examples are out of date and I cannot figure how to get it working.. I am pretty disapointed. any sugestions? e.g. How did I get LCD running? I am using Raspberry Pi OS (bullseye).

dooley-ch commented 1 year ago

Honestly I have no idea. If you have the time you could try and replace their code with your own, but it is a time consuming exercise.

For the moment I have just given up on it.

On 2 Nov 2022, at 15:53, jbazala @.***> wrote:

Hello, I have same issue, I bought Grove Base Kit for Raspberry Pi on August to learn how IoT works and then for using sensors and LCD in future project.. but nothings works.. all documentations, instructions and examples are out of date and I cannot figure how to get it working.. I am pretty disapointed. any sugestions? e.g. How did I get LCD running? I am using Raspberry Pi OS (bullseye).

— Reply to this email directly, view it on GitHub https://github.com/Seeed-Studio/grove.py/issues/62#issuecomment-1300589955, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATOJFDVZXIZMPJVFWCSXYY3WGJ57VANCNFSM6AAAAAARRZGPP4. You are receiving this because you authored the thread.

jbazala commented 1 year ago

I find a solution - I bought Arduino Uno and grove shield for it… And than I was able to run all grove sensors… But it is shame, that it does not work any more on RPi… Grove Base Kit for RPi is still on the stock, also at original e-shop, you can get it very easily. But it is very difficult to find out, that it will not work anymore. Especially for a newbie like me it is really time waste.

dooley-ch commented 1 year ago

I’m glad you found a solution.

I’m actually retired and just play around with this stuff. Perhaps when the mood takes me I will have a go at coding up a solution for the RPI. I did it for some of the components for the BBC micro in the past.

https://github.com/dooley-ch/microbit-grove https://github.com/dooley-ch/microbit-grove

On 29 Nov 2022, at 16:38, jbazala @.***> wrote:

I find a solution - I bought Arduino Uno and grove shield for it… And than I was able to run all grove sensors… But it is shame, that it does not work any more on RPi… Grove Base Kit for RPi is still on the stock, also at original e-shop, you can get it very easily. But it is very difficult to find out, that it will not work anymore. Especially for a newbie like me it is really time waste.

— Reply to this email directly, view it on GitHub https://github.com/Seeed-Studio/grove.py/issues/62#issuecomment-1330841193, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATOJFDRM7JPR423BH5S2FNTWKYPPVANCNFSM6AAAAAARRZGPP4. You are receiving this because you authored the thread.

jonrot1906 commented 1 year ago

I actually found that to be very frustrating as well, as we have a few dozens of LCD displays and sensors sitting here, apparently without software support. After trying to build and install mraa and upm for hours without any luck (script for mraa and upm installation), I decided to go on and found the GrovePi repo from DexterIndustries. While not covering all sensors, I think that's a good starting point and helped me at least.

CurtisMJ commented 11 months ago

Just in case someone finds this useful, I had managed to successfully compile UPM from source, but a few caveats needed resolving:

libmraa: Seemed to go perfectly fine following the official build instructions on the Pi itself

UPM: Needed to use clang to avoid errors with linking atomic symbols (GCC standard library for ARM is weird?? Really don't know) Needed to manually copy the python parts like "pyupm.py" to the dist-packages/upm folder,__init__.py seemed blank for some reason Needed to export LD_LIBRARY_PATH to the upm lib folder before running python examples. Could probably be solved by setting the install prefix correctly for Debian when running cmake Needed to pass "DWERROR=OFF" because clang is more pedantic than whatever they usually compile with Also passed "DSWIGNODE=OFF" because I wasn't using Node All of this was done on Raspian (RPI OS?) 11 bullseye, with Python 3.9. I can now use the Grove LCD module (the white on blue one) just fine with the Grove hat. This was on a Raspberry Pi Zero, so I left it to compile overnight, cross-compiling may have been easier... but it worked lol

takanotume24 commented 6 months ago

Just in case someone finds this useful, I had managed to successfully compile UPM from source, but a few caveats needed resolving:

libmraa: Seemed to go perfectly fine following the official build instructions on the Pi itself

UPM: Needed to use clang to avoid errors with linking atomic symbols (GCC standard library for ARM is weird?? Really don't know) Needed to manually copy the python parts like "pyupm.py" to the dist-packages/upm folder,init.py seemed blank for some reason Needed to export LD_LIBRARY_PATH to the upm lib folder before running python examples. Could probably be solved by setting the install prefix correctly for Debian when running cmake Needed to pass "DWERROR=OFF" because clang is more pedantic than whatever they usually compile with Also passed "DSWIGNODE=OFF" because I wasn't using Node All of this was done on Raspian (RPI OS?) 11 bullseye, with Python 3.9. I can now use the Grove LCD module (the white on blue one) just fine with the Grove hat. This was on a Raspberry Pi Zero, so I left it to compile overnight, cross-compiling may have been easier... but it worked lol

@CurtisMJ Thanks so much for sharing useful information. I too was able to get it to work with RasPi 4 (RasPi OS bullseye 32bit) + Grove Base Hat + Grove tempareture sensor, but not with RasPi OS bookworm, probably due to its dependency on Python2. It is not working on RasPi OS bookwarm, probably because it depends on Python2.

takanotume24 commented 3 months ago

I have published a bash script to solve this dependency issue. Please feel free to use it as a reference if you find it helpful. https://github.com/takanotume24/grove_py_installer