Does Arduino have objects?

I am looking for objects, of variables, with unique values each.

Something like in a lot of other programming languages have.

I just can't seem to find it for the life of me. Only where the values are equal to the value from a pin, which is not what I am looking for. I want to assign int's from the beginning of the program.

Does this exist in Arduino?

read a C or C++ language tutorial and you'll probably find what you need.
(It's unclear exactly what it is - but variables do exist :wink: )

int x = 3; // x is a variable and its initial value is 3
x = x + 1; // now x is worth 4

Worth a read …

Can you explain the "unique" part ?

The DS18B20 temperature sensor has a unique ID number. That is the easiest way to have a guaranteed unique number assigned to a Arduino board.
Unless you have a fake DS18B20. Most of the cheap ones seems to be fake, they can't go up to 125°C, but already fail at 75°C and there can't be too many of them on a long wire.

The other common option is to store a unique number in EEPROM. The Arduino can read that at startup.

Some microcontrollers/processors have unique data or manufacturer's information. I think for the Leonardo it is unique and for the Uno it is not. But all the Uno boards that I have have different numbers. I have forgotten what they are called, perhaps "signature bytes" ?

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.