LED Matrix Failed to Build

  1. Your code is completely C/C++ wrong (define functions inside function).

  2. Mongoose OS provides a limited Arduino compatibility layer and some compatible libraries. Search for arduino- in https://github.com/mongoose-os-libs

  3. md-parola and md-max72xx are already ported to Mongoose OS. However, there are some porting errors and if you need them, use my forks for the moment. Add the following lines in your mos.yml

  - origin: https://github.com/nliviu/md-max72xx
    version: master
  - origin: https://github.com/nliviu/arduino-md-parola
    version: master

4 - Don’t use the Arduino style setup. Move the initialization code in mgos_app_init.

5 - Some references:
Quick start
Develop in C
How to port an Arduino library