i’m curious how people understand what a language is.
one difference I see is that the IDE must wrap the .ino file within another more standard c/cpp file with additional includes (one reason it’s not a .c/cpp file). One include is Arduino.h (hardware/arduino/avr/cores/arduino/Arduino.h). I need to explicitly include arduino.h in my .c/cpp files in multi-file projects.
Arduino.h includes several standard includes (e.g. stdlib, string, math), common Arduino #defines (e.g. HIGH, INPUT_PULLUP), typedefs (e.g. boolean, byte), and function declarations (e.g. pinMode, analogWrite, delay).
these things (e.g. HIGH, byte, delay()) are not part of the language, they are conventional customizations for the Arduino environment.
arduino.h uses typedefs to define new data types from existing ones:
typedef unsigned int word;
typedef bool boolean;
typedef uint8_t byte;
bool is a standard C++ data type and uint8_t is typedef’d in stdint.h as unsigned char. Unsigned int is standard C which doesn’t define the size of an int.
I have taken Arduino code, added these typedefs and stubs for pinMode(), digitalWrite(), …, and compiled an Arduino application with the standard GNU compiler (I use cygwin on windows). This is a good way to simulate and save time during embedded program development.
Our small-cell project is required to use stdint.h which defines uint8_t, int16_, uint32_t, … for variabl