more ideas, initial import of serial code from Marlin