Grove temp sensor 1.2.py

Grove is a modulated, ready-to-use tool set.
Much like Lego, it takes a building block approach to assembling electronics.

Moderators: lily.li, violet, jeremy882, crail.lyu969

Post Reply
Anonymous
Kindergarten
Kindergarten
Posts: 92
Joined: Mon Jun 03, 2019 10:58 am

Post by Anonymous » Tue Apr 23, 2019 4:08 am

Hello iv been messing with the sample code for
https://github.com/Seeed-Studio/grove.py/blob/master/grove/grove_light_sensor_v1_2.py

And it is working well but was curious if there’s a way to print just an integer? Currently it returns

“Hat Name = ‘Grove Bade Hat RPi’
As a header to every sensor iv worked with. How do I remove that? Thanks
Sent from my iPhone

Seeed Tech Support
Pre-kindergarten
Pre-kindergarten
Posts: 0
Joined: Mon Jun 03, 2019 10:51 am

Post by Seeed Tech Support » Tue Apr 23, 2019 10:06 am

Hell,
pls check this file and change the line of code:

print("Hat Name = '{}'".format(self.name))


Thanks

best rgds
Mancy


Anonymous
Kindergarten
Kindergarten
Posts: 92
Joined: Mon Jun 03, 2019 10:58 am

Post by Anonymous » Tue Apr 23, 2019 1:30 pm

Thanks I tried that but it’s still giving me the same issue, is there anything else I need to remove?
Sent from my iPhone

Seeed Tech Support
Pre-kindergarten
Pre-kindergarten
Posts: 0
Joined: Mon Jun 03, 2019 10:51 am

Post by Seeed Tech Support » Tue Apr 23, 2019 1:37 pm

Hello,
Pls tell me that after you modify the code, have you installed it?


Thanks

best rgds
Mancy


Anonymous
Kindergarten
Kindergarten
Posts: 92
Joined: Mon Jun 03, 2019 10:58 am

Post by Anonymous » Tue Apr 23, 2019 1:44 pm

Yes I updated the file to pi but it still gives “Hat Name = ‘Grove Base Hat RPi’
Thankyou
Sent from my iPhone

Seeed Tech Support
Pre-kindergarten
Pre-kindergarten
Posts: 0
Joined: Mon Jun 03, 2019 10:51 am

Post by Seeed Tech Support » Tue Apr 23, 2019 2:14 pm

Hello,

after you upload, have you installed it? like the following steps:


Install grove.py


From source code


git clone https://github.com/Seeed-Studio/grove.py
cd grove.py
# Python2
sudo pip install .
# Python3
sudo pip3 install .
Thanks

best rgds
Mancy


Anonymous
Kindergarten
Kindergarten
Posts: 92
Joined: Mon Jun 03, 2019 10:58 am

Post by Anonymous » Tue Apr 23, 2019 3:38 pm

Do I need to install helper.py from terminal?
When I tried I got:
“Could not find a version that satisfies the requirement helper.py.......”

I replaced the original on the pi with the edited one with ssh

Thankyou for the help

Seeed Tech Support
Pre-kindergarten
Pre-kindergarten
Posts: 0
Joined: Mon Jun 03, 2019 10:51 am

Post by Seeed Tech Support » Wed Apr 24, 2019 10:20 am

Hello,
pls find the folder  /grove.py/grove/helper/  and find if there is file named "***.pyc", pls delete it and try again.
Thanks

best rgds
Mancy


Anonymous
Kindergarten
Kindergarten
Posts: 92
Joined: Mon Jun 03, 2019 10:58 am

Post by Anonymous » Thu Apr 25, 2019 8:17 am

It seems to have worked when I retired to install it, thankyou. Do you know if the cheaper basehat for rpi works with node red? Tried using that but it won’t output the sensor data
Sent from my iPhone

Seeed Tech Support
Pre-kindergarten
Pre-kindergarten
Posts: 0
Joined: Mon Jun 03, 2019 10:51 am

Post by Seeed Tech Support » Thu Apr 25, 2019 3:00 pm

Hi there,

Sorry, it does not support the node-red.  Thanks.

best rgds
Bill


Post Reply