B4R Question Obtain data from I2C

Discussion in 'B4R Questions' started by tonga, Oct 24, 2018.

  1. tonga

    tonga Member Licensed User

    I am acquiring data from a microcontroller by means of I2C. There are 30 total bytes that are grouped into bytes or integers. I get them by means of this function:

    Dim c() As Byte = master.RequestFrom(SLAVE_ADDRESS, 30)

    I see them with oscilloscope but I can not separate them and read them for my use.
    How can I proceed?

    Thanks in advance
  2. Erel

    Erel Administrator Staff Member Licensed User

    Please use [code]code here...[/code] tags when posting code.

    What is the output of:
    Dim bc As ByteConverter 'rRandomAccessFile
  3. tonga

    tonga Member Licensed User

    I don't read nothing in the logs
  4. tigrot

    tigrot Well-Known Member Licensed User

    Read less bytes from I2C. Just to see if you can get at least a few bytes. Is SLAVE_ADDRESS defined correctly?
  5. tonga

    tonga Member Licensed User

    I read only 1 byte. SLAVE _ADDRESS is correct.
  6. rodmcm

    rodmcm Member Licensed User

    There are several Arduino ESP programs that test the I2c network such as I2C scan.. Use these to test the integrity of your connections.
  7. inakigarm

    inakigarm Well-Known Member Licensed User

    tigrot likes this.
  8. rodmcm

    rodmcm Member Licensed User

    Look at that! Too easy.. Thanks for reference
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice