Catch an OOM when we can't encode JSON to a string.
Increase the heap size of the PIC32 from 2K to 32K (it has 128K RAM).

This fixes the raw passthrough mode which uses dynamic memory
allocation.