Smartphone-based optical and electrochemical sensing