Due to high demand expect some shipping delays at this time, orders may not ship for 1-2 business days.
0

Relay control with soil sensor
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Relay control with soil sensor

by tim_bob on Sat Oct 16, 2021 8:45 pm

Hi,
I am working on a project with my students, automating watering of a plant using a relay, based on moisture readings from the i2c soil sensor. When I tried writing code to use GPIO pins to switch the relay, I got an error saying the pins already have a format or something like that.

I have had a good look for projects using this hardware but I didn't find any that took the data and used it to switch a relay. Any ideas what went wrong?

tim_bob
 
Posts: 2
Joined: Sat Oct 16, 2021 8:42 pm

Re: Relay control with soil sensor

by dastels on Sat Oct 16, 2021 10:54 pm

No ideas at all.

But with more details on what you're doing we can probably figure it out. What controller/MCU board? Which relay? care to post your code? The *exact* text of the error?

Dave

dastels
 
Posts: 7983
Joined: Tue Oct 20, 2015 3:22 pm

Re: Relay control with soil sensor

by tim_bob on Sun Oct 17, 2021 1:25 am

Hi Dave,

I have been locked out of my pi after forgetting the password and it's also not booting, so I'm working on reproducing the error using a different SD card - I'll post it when I do!

Thanks

tim_bob
 
Posts: 2
Joined: Sat Oct 16, 2021 8:42 pm

Please be positive and constructive with your questions and comments.