4-20 mA Unit with wemos S2 mini ESP32
-
-
@obstbauer yeah thats the registers table, I used Uiflow2 with calibration block but you are using not M5Stack controller I see
-
@robski what value do you take for "index" in the function
void MODULE_4_20MA::setCalCurrent(uint8_t index, uint16_t value) -
@obstbauer haven't used index value
in uiflow2 ..ain4_20ma_0.set_cal_current(10) to set 10mA
ain4_20ma_0.set_cal_current(20) to set 20mA -
@robski yes maybe in uiflow2 but the function for the c program asks for an index and a value
-
I see really strange behaviour and I don't know the reason and I get no answers from the support.....
The example code from M5Stack say that the currentvalue should be divided by 100:canvas.printf("Current:%.2fmA", (float)(meter.getCurrentValue(0)) / 100.0);The values I get I have to divide by 10 to get the right current in mA.... and the other issue is that I can only use half of the measurement range, at 12.5 mA the ADC sends 65520...
maybe someone has an idea ?
-
change to a raspberry PI4 seems to be no solution too.....
it woud be nice if there would be a better documentation for people who want to use the units outside the m5stack universum.... -
@obstbauer this is uiflow example with raw value and float too


-
thank you, but I am still not able to read out or to set the cal current
M5Stack support doesn`t answer my mails... and it seems that there is nobody from the company around here, I think I will change to another board with better support -
@obstbauer TBH if you are using M5Stack modules/units with not M5Stack controllers maybe its worth to have at least one M5Controller (atom?stick? )to be able to check module functionality
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login