Write a function to handle data input/output in a constrained environment for an embedded system at Panasonic.