working on server/arduino code in daemon some more. separated into methods, loop code