Coder Social home page Coder Social logo

ESP32 Support about arduinomodbusslave HOT 8 OPEN

tinkering4fun avatar tinkering4fun commented on July 22, 2024
ESP32 Support

from arduinomodbusslave.

Comments (8)

yaacov avatar yaacov commented on July 22, 2024

Thank you for the issue

from arduinomodbusslave.

tinkering4fun avatar tinkering4fun commented on July 22, 2024

Update: I try to re-sort my fork into different branches ...

  • issue98: is the fix where this issue is about.

The rest goes way beyond this ...

  • kernel: A class which already provides some which I would expect from any of my workable slaves.
    The idea is to have a consistent set of kernel functionality and code the dedicated application functions in a derived class.

  • kernel-examples: Examples using the above concept.

  • allnew: Merging all of the above

  • EP32: Will finally only contain the addition in library.properties file. ESP32 architecture is currently not listed, but the library seems to work.

from arduinomodbusslave.

Erfan12699 avatar Erfan12699 commented on July 22, 2024

hi Werner
thanks for good issue.
please tag simpleESP32.ino.
text is not correct to open.

from arduinomodbusslave.

tinkering4fun avatar tinkering4fun commented on July 22, 2024

Hi Erfan, sorry for not exactly understanding your message ...
Do you have issues when trying to open attached simpleESP32.ino.txt ?
Of course it needs to be renamed after download. I took the .txt naming by intention to get only a quick preview in text editor when clicking on it (avoid immediate start of Arduino IDE). As mentioned, I'm still a Github newbie ...

btw: In the meantime I re-organized my fork https://github.com/tinkering4fun/ArduinoModbusSlave-ESP32-fork
See branch 'specific-examples' and example 'plainSlave'

ArduinoModbusSlave-ESP32-fork/examples/specific/ESP32/plainSlave

from arduinomodbusslave.

Erfan12699 avatar Erfan12699 commented on July 22, 2024

thanks dear Werner

I want to put an ESP32 module as a slave by Yaacov's library (Modbusslave.h) and read the analog data by Modbus pull in my pc.

can you help me?

from arduinomodbusslave.

Erfan12699 avatar Erfan12699 commented on July 22, 2024

dear Werner.
Does this library (Modbusslave.h) work on STM32 (bule pill)?

from arduinomodbusslave.

tinkering4fun avatar tinkering4fun commented on July 22, 2024

Hi Erfan,
i guess my mentioned example ArduinoModbusSlave-ESP32-fork/examples/specific/ESP32/plainSlave
does exactly what you asked for ...?

See line 445
slave->writeRegisterToBuffer(i, analogRead(adc_pins[address + i]));

I assume you are already familiar with Modbus and have some Modbus client software at your PC-
If so, just use FC04 to read the input registers 0 and 1, which will return the values from pins ADC_0 and ADC_1.

There is also a straight-forward and simple example in Yaacov's lib
ArduinoModbusSlave/examples/simple

It is made for Arduino board, but the code should also run on ESP32 after changing the ADC pin definitions.
Just 150 lines of code, so it should be a good starter.

I never used STM32, if you own one, just give it a try and see ...

btw:
If you never used Modbus before, it may be too complex to learn for just just pulling ADC values into an PC.
Sorry, but I will not guide you to a final Modbus end to end solution for your specific problem.

Hope this helped to some extend.

Regards
Werner

from arduinomodbusslave.

Erfan12699 avatar Erfan12699 commented on July 22, 2024

Thanks dear Werner.

yes, i used Yaacov's lib and read analog on Modbus pull.

i could use from Yaakov's library on ESP32 with your guide. very good issue.

thank you and dear Dr zemir

Regards
Erfan

from arduinomodbusslave.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.