Is it possible to set a variable to a range of values? PID TVC Attempt
Data types for UNO R4 etc
Q: Why is " A0 " a int type ?
How many integers can be stored in the Array function at a time in Arduino Uno? can I store around 5000 integers in a single array variable?
Hello, i'm just starting in the arduino world, also in the C world ( I only know a little bit of Python )
I'm in the 3 project of the official starter kit book ( in spanish ). They start with the constants, and the code they write is this:
const int sensorPin = A0;
constants are variables that can not change, OK.
const is for declaring a constant, OK.
int is for declaring the type of the data stored in the constant, OK
sensorPin is the name of the constant, OK
= is to assign the value, OK
A0 is the value of the constant , mmmmmm
; this is for telling that is the end of the constant, OK
As far as I know a " A0 " is not a integer, in the Arduino UNO a integers are a range of -32,768 to 32,767 (16-bit) ( int - Arduino Reference ).
So my question is why const int sensorPin = A0; don't give me an error if A0 is not a int ?