ionread to icallback
refactoring
add calibration