File tree 1 file changed +3
-4
lines changed
1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 2
2
# Code adapted from Tony Dicola's CircuitPython code using the DS18x20 temp sensor
3
3
# as well as John Park's CircuitPython code determining soil moisture from nails
4
4
5
+ import time
5
6
from adafruit_onewire .bus import OneWireBus
6
7
from adafruit_ds18x20 import DS18X20
7
- import time
8
8
import board
9
- import simpleio
10
9
import touchio
11
10
import neopixel
12
11
import analogio
32
31
# Initialize the light senor on board to use for neopixel brightness later
33
32
light = analogio .AnalogIn (board .LIGHT )
34
33
35
- # Main loop
34
+ # Main loop
36
35
while True :
37
36
38
37
# SOIL MOISTURE READINGS
99
98
print ("Not hot enough, right moisture level" )
100
99
101
100
# ALL GREEN = COMPOST AT OPTIMUM TEMPERATURE & MOISTURE
102
- elif ( compostTemp > tempThreshhold ) :
101
+ elif compostTemp > tempThreshhold :
103
102
pixels .fill ((0 ,255 ,0 )) # green
104
103
print ("Compost Ready" )
105
104
You can’t perform that action at this time.
0 commit comments