cancel
Showing results for 
Search instead for 
Did you mean: 

I cant assign a value to variable

demir
Senior II

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

 

1 ACCEPTED SOLUTION

Accepted Solutions

Thanks Andrew.

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

demir_0-1708357674250.png

 

View solution in original post

5 REPLIES 5
Andrew Neil
Evangelist

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

What did your printf output show?

Thanks Andrew.

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

demir_0-1708357674250.png

 

>>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.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

You can mark that as the solution, then.

Thanks for the feedback. I will take this into consideration from now on.