Giter Club home page Giter Club logo

Comments (6)

nices0325 avatar nices0325 commented on May 17, 2024

It is a question category, sorry for not to know how to change it to question category

from elmduino.

PowerBroker2 avatar PowerBroker2 commented on May 17, 2024

The new built-in functions should cover this one. Otherwise, do you have a specific question?

from elmduino.

nices0325 avatar nices0325 commented on May 17, 2024

actually I'm wondering that how could you calculate A and B byte values only using 'findResponse' although it is up to 4byte pid
so that for beginners like me, it's a little bit hard to find out what's value A and B... sorry for ignorance..
my final question is, even if the final calculation is using A,B values , how to calculate with only 'findResponse' ... It's too hard for me to get it.

e.g. for get the rpm value the formula is {256A + B} / {4}.. otherwise I can find out in the cpp file that you just divide 'findResponse' by 4.0 .. does the 256A+B automatically calculated by the findResponse function?? for being
Newbie,, really sorry to keep asking you a lot. thank you

from elmduino.

PowerBroker2 avatar PowerBroker2 commented on May 17, 2024

In the RPM function, A is the most significant byte (of meaningful bits) and B is the least significant byte of the value returned by findResponse(). This means (256*A + B) is already taken care of by findResponse(). Note that A * 256 is the same as left shifting A by 8 bits.

byte A = 25;
byte B = 30;
uint16_t ex1 = 256*A + B;
uint16_t ex2 = (A << 8) + B;

In the above snippet, ex1=ex2.

Your code in your first post in this issue looked good, you just didn't do anything with A and B once you found them. However, like I said, you don't really need to now that I added a built-in function for this PID

from elmduino.

nices0325 avatar nices0325 commented on May 17, 2024

ummm.. a liitle bit confusing in my knowledge.. Would it be easier to just understand 'findResponse' automatically find out the required values?Should it be more helpful to understand "uint64_t ELM327::findResponse() " in cpp file that how it functions?

Anyway, I'm gonna study about MSB and LSB and plz let me ask you again in a few hours.. thanks.
I'm at south korea.. It's about 5 am here. I should take a sleep though sorry

from elmduino.

nices0325 avatar nices0325 commented on May 17, 2024

sorry for another question mr.POWERBORKER2
Can I use this library with stn1110? I heared that stn1110 totally compatible with elm327
Cause, ELM327 only works at 38400 baudrate over UART serial..
would it be okay?

from elmduino.

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.