Is it possible to install the IOTA library on a micro-controller such as ESP (
ESP8266)? such that it can write in the Tangle by sending a transaction?
It is feasible to use the microcontroller as an IOTA wallet. For example, you can store your IOTA seed on the flash, generate addresses from it, generate sign transactions. One option to get started is to use the IOTA Ledger Blue / Nano wallet code. It is a lightweight C library that can be easily ported to different hardware targets.
It is not feasible to compute the Proof-of-Work on microcontrollers due to their limited computational speed. Furthermore, the official CCurl implementation (Proof-of-Work computation in C) uses the
pthreads library and other functionality which are not typically available on microcontrollers.
It is, in my opinion, not feasible to run IOTA in battery powered embedded devices due to the large amount of energy it takes to sign transactions, even if the Proof-of-Work is done elsewhere.
Source: personal experimentation.