Skip to main content
Graduate II
February 19, 2024
Solved

I cant assign a value to variable

  • February 19, 2024
  • 1 reply
  • 1647 views

Hi,

I am trying to assign Adc.Raw[0] and Adc.Raw[1] to Vref and Vtemp as in below code snippet. But, Vref and Vtemp gets 0. These variables never updated with Adc.Raw values.

Could you please point me in the right direction ?

demir_0-1708356711425.pngdemir_1-1708356733689.png

 

    This topic has been closed for replies.
    Best answer by demir

    Thanks Andrew.

    I suspect it is a bug, as it is working now.

    demir_0-1708357674250.png

     

    1 reply

    Super User
    February 19, 2024

    The assignment is inside an 'if' - was that code actually executed?

    What did your printf output show?

    demirAuthorAnswer
    Graduate II
    February 19, 2024

    Thanks Andrew.

    I suspect it is a bug, as it is working now.

    demir_0-1708357674250.png

     

    Graduate II
    February 19, 2024

    >>I suspect it is a bug, as it is working now.

    Real hard to know with very limited screen shots of code. Troubleshooting problems like this through the key-hole isn't going to garner much assistance. It's usually not with the code you choose to show.

    Provide code in a reviewable / editable manner. Attach code using the code formatting tool </>, or as attached file(s), or preferably a github repo.