redone unsafe pointers, working flash AND adc