Last but not least, the sensing kinetics can be followed also by FTIR. Indeed, the strong absorption of the carbonyl group, shifts towards lower wavenumbers, confirming that a reaction occurs between the ester group (1730 cm -1 ) that is possibly converted into an amide (1650 cm -1 ) for ethylamine already after 30 seconds. Therefore, we were keen on figuring out what happens to the red carbon films after exposure, and we exploited as a model sample ethylamine after 24 hours of exposure. The surface morphology, evaluated by SEM, reveals that the exposure to ethylamine vapors causes the formation of some dot-like surface defects attributed to the chemical reaction, and by means of EDX we could prove further that the N is successfully incorporated into the thin film material (SI maybe). In terms of thermal stability, at lower temperature the material is stable up to 160°C, a bit lower than the bare red carbon film with, however, a larger leftover product at 1000°C (25.5% in nitrogen atmosphere). TGA profile of the bare red carbon and after exposure to ethylamine for 24 hours, reveal the possibility to prepare carbon materials as thin films, with the possibility to selectively introduce nitrogen functionalities. Indeed, as shown in the following (fig ), SEM and EDX confirm that the film is still present after treatment at 400°C, with some surface defects occurring due to the thermal process (SI?!!). The presence of the thin film on the glass surface can be confirmed though where a scratch was done with the tweezers and the film partially is removed (SI). Furthermore, EDX once more confirms the presence of C, O, and, for the sample exposed to ethylamine, N. These products were further analyzed via absorbance, FTIR, and XPS. The absorbance spectra show an increased optical absorption in the visible range for the bare RC film further condensed at 400 °C, whereas a high transparency for the one exposed to ethylamine was preserved. FITR shows, as expected, a quite low absorption for both samples, in the range 4000-1300cm -1 . In both samples, however, three features can be easily distinguished and attributed to C=C bonds (1600 cm -1 ), condensed allene bonds that appears as a doublet at about 1970 and 2015 cm -1 , and ketene units at 2179 cm -1 (Figure ). 48 to the case of the RC film the O1s peak reveals similar behavior, with the appearance of the peak attributed to the SnO substrate, due to thinning and cracks formation during the carbonization. When raising the temperature, the N1s peak is present and clearly detectable until 400°C, whereas at 500°C cannot be detected anymore. The thermal treatment induces also for the nitrogen a major change between 200°C and 300°C, with the appearance of a feature at lower binding energies (398.2 eV) together with the amide bond at 400.4 eV. The 398.2 eV feature was previously attributed to pyridinic nitrogen, therefore, confirming the possibility to successfully introduce nitrogen within the material structure. It is worth pointing out that in this case the material obtained at 400°C has a high transparency in the visible range as confirmed by the sample picture and absorbance spectrum (SI), with a higher conjugation degree including pyridinic and amide functional groups. This is supported also by the low absorption in the NIR spectrum (supporting info), typical of carbon materials which show a major peak appearing at 1620 cm -1 , attributed to the C=C stretching, in good agreement with XPS results (the absorption at wavenumbers below 1500 cm-1 is due to the glassy substrate). Furthermore, we could define the CNO composition (excluding the oxygen attributed to the substrate) as ca.