@robski generally yes. I can see these examples in UI Flow and I did use them when building the code.
Posts made by rudi15
-
RE: Earth sensor
-
RE: Earth sensor
@ajb2k3 Yes, correct UIFlow 1. Should I switch to UIFlow 2? It's indeed just that piece of code so far as I found some videos that only do that and it seems to work. No initialization or so as I could not find any information or command on initialization etc. Also, I have no idea how I would calibrate the sensor and whether that would help. In case you have any hints on what to do? Thanks again!
-
RE: Earth sensor
@ajb2k3 Sure, thanks. Here is the code:
from m5stack import *
from m5ui import *
from uiflow import *
import time
import unitsetScreenColor(0x222222)
earth_0 = unit.get(unit.EARTH, unit.PORTB)MoistureAnalog = M5TextBox(14, 59, "Analog", lcd.FONT_Ubuntu, 0xFFFFFF, rotate=0)
while True:
MoistureAnalog.setText(str((str('Earth Sensor Analog: ') + str((earth_0.analogValue)))))
wait_ms(500)
wait_ms(2) -
RE: Earth sensor
Update: The readings do not change even when I completely unplug the sensor. The display still gives me similar values above 1000. Thus, it somehow seems as of the sensor might not be providing any data at all? It makes no difference whether or not the sensor is attached to the device.
-
Earth sensor
Hello,
I am a newbie to M5stack and want to use the Earth sensor to display moisture values. I followed the instructions as outlined in this video by exactly rebuilding the respective code: https://www.youtube.com/watch?v=rYi8XLe3X_c
The device now does show data, but it is constantly above 1000 even when just laying on my desk without any contact to water (up to the maximum of 1024 which, as far as I understand, indicates that the sensor detects water (fully wet)). When I put the senor into water, the readings do not change they stay above 1000.
Any idea what I did wrong?