1

I'm learning Arduino (school and from myself).

We have the following code:

temp = Wire.read();
temp = ~temp;
temp = temp - 1;

This code is made to read, then print positive and negative values from a temp sensor. If you need more parts of the code, let me know.

I don't understand what does the ~ symbol, can someone help me?

Thanks.

4

As always, ~ in C++ is bitwise negation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.