There is an A & B pulse from each wheel.
I think you'll need to acquaint yourself with Quadrature Encoders.
A quick check to do:
Try to make two temporary but firm mechanical stops with say 100 degrees distance (not important to know the exact angle between them) and then repeatedly move the wheel between the stops. You should get the same two values (+/- 1 or 2) every time at each stop.
It works!!
Thank you for the suggestion @gavin67890!
The temperature is about 6 over and the humidity is 10% less than what my desk station is showing me, but I am glad that the hardware is ok.
Now, to inspect the Python code and see where is the problem.
0_1695909425730_20230928_164927_resize_resize.jpg
Also, one important aspect I was missing: the GitHub code was trying to read a SHT20 while the PM2.5 (K023-B) has a SHT30.
I've tested the SIM card from a phone and it's 1MB/s download and upload.
Your phone might be using 3g/4g/5g/LTE and not NB-Iot or Cat-M. In fact Ive never seen a phone that uses NB-Iot or Cat-M (Doesn't mean they might not exist though)
M5Stack does sell an LTE module if you want LTE speeds though.
@teflon121 If you are measuring temperature in an environment where the temperature is stable such as at my desk(!) you can, for sure, just add an "offset". Just measure the ambient with a known and trusted thermometer and add or subtract this to the raw measurement.
If the device is going to be subjected to a wide range of temps, then you need to see if offset is satisfactory over that range.
If not...the second half of calibration is "span" which is accomplished by multiply or dividing the raw measurement. This gets fiddly and can be enjoyable like tuning a carburetor!
display = raw * span + offset, or depending on characteristics of the sensor, display = (raw + offset) * span
Span is usually a very low number like 1.2 or 0.98
-Terry
by default port A is for external I2C; however M5Core2 uses two dedicated GPIOs (32/33) for port A so it should be possible to use it for anything as by default external I2C is not being initialized.