ORIGINALLY POSTED IN
DIY USTHAD
In this tutorial, we are going to build a simple OTG Phone Thermometer using Digispark ATtiny85 that can connect to our mobile phone via an OTG adaptor and read the real-time temperature of anything and display it on the serial monitor.
How it works!The Digispark ATtiny85 will connect to the phone using the DigiCDC library which allows the Digispark to appear to a mobile or computer as a Virtual Serial Port when connected by USB. This makes it appear just like a standard Arduino and allows the use of the Serial Monitor. Then we read the temperature using a Precision thermistor and we use the Serial print function to print it on the serial monitor.
Download and install Serial USB Terminal from google play store https://play.google.com/store/apps/details?id=de.kai_morich.serial_usb_terminal
The connections are very straightforward, follow the below steps.
- Connect one terminal of the thermistor to PIN P2 of Digispark ATtiny85.
- Connect the other terminal of the thermistor to the GND.
- Then connect a 10K resistor between the PIN P2 and 5V.
Upload the provided code to Digispark attiny85 using the Arduino IDE.
For more info on using Digispark attiny85 with Arduino IDE follow this tutorial
https://www.hackster.io/alaspuresujay/use-an-attiny85-with-arduino-ide-07740c
Step4:- Open the serial USB terminal app.
- Click the connect icon, when prompted to give access click OK
- To start receiving the temperature values we need to send some string, so just type something and click send.
- That's it now we can read the real-time temperature of any objects from our phone.
In the below video I'm checking the temperature of a cup of tea. ENJOY!
Comments