[Solved] Grove Base Hat for Raspberry Pi with a Light sensor and a red LED

I have a Grove Base Hat for Raspberry Pi with a Light sensor and a red LED.

I want to use them with your libraries and clones so the red led will turn on when I use the light sensor.

Where can I find the list and which directories I have to use in the user interface?

What codes do I have to use?

Hi,



You can find the Grove Base Hat for Raspberry Pi full documentation here

Thank you very much.



Now I want to combine a Light sensor with a LED.

Wath should I do to realize this?

Hi,



Which light sensor you are using and what was the application?

I use a Grove-Light sensor v1.2 with a LED Socket Kit v1.5 and a red LED with the application of raspi-config.

I use in the user interface the codes:

ls

cd Grove_Base_Kit_Sketchbook/

ls

cd Tutorial_03-Power_of_Light/

ls

sudo python Power_of_Light.py

ls

cd yourpath/grove.py/grove

ls

python grove_led.py 12



But it doesn’t work

Hi,



Are you getting any error or something ?

Hi,



I am verry confused. I had tried several thinhs now.

I have used:

  1. git clone <LINK_TEXT text=“https://github.com/Seeed-Studio/Grove_B … Sketchbook”>https://github.com/Seeed-Studio/Grove_Base_Kit_Sketchbook</LINK_TEXT>
  2. git clone https://github.com/Seeed-Studio/grove.py

    With the first one I don’t get the Grove_led. Only the Grove_light_sensor as Power_of_Light.py.

    With the second one I see the Grove_led and the Grove_light_sensor_v1_2.



    What should I have to insert in the user Interface to let it work. The light sensor should sent a signal to the led when I use the light sensor.



    What must I change in the commands below:

    ls

    cd Grove_Base_Kit_Sketchbook/

    ls

    cd Tutorial_03-Power_of_Light/

    ls

    sudo python Power_of_Light.py

    ls

    cd yourpath/grove.py/grove

    ls

    python grove_led.py 12



    Thank you very much for your help and good service.

Hi,



What is the output when you run the python code?



I think you didn’t installed the GrovePi python package , You need to install the Grove.py python package, I’ll guide you step by step. You can download the package by entering this command </s> curl -sL https://github.com/Seeed-Studio/grove.py/raw/master/install.sh | sudo bash -s -<e> after installation, try running your code and let us know the feedback.

Installation completed.



Successfully installed grove.py-0.6.



Which clone should I instal next? The first one of the second one? None or both?

  1. git clone https://github.com/Seeed-Studio/Grove_B … Sketchbook
  2. git clone https://github.com/Seeed-Studio/grove.py

When I insert the codes, I wil get to

sudo python Power_of_Light.py and then I see the Light value 633, turn to 113 degree and so on.

This meen that the light sensor works.



I don’t get the chance to insert the code for the led. The led doesn’t work.

What should I do

Can you please look at my problem above

Hi,



Have the same problem with the same configuration !?!

Hi,



You need to turn the led ON using raspberry Pi right?

How can I turn it on? Using right?

Hi,



what is the error right now when you run python grove_led.py 12

python: can’t open file ‘grove_led.py’ : [Errno 2] No such file or directory

It works.

Now I know what you mean with turn right.

Thank you very much

Happy to know that it works :slight_smile: , feel free to post any queries related to technology here .

What you mean with turn right?