DigiSpark ATtiny85is small but very effective breakout board. This board is very popular because of its size and easy to use offerings. If you want to know about DigiSpark visit digistump.com for more products information.
In this blog post I will show how to connect the ATtiny85 module with HC-05 Bluetooth module and blink an LED using Android phone.
For this project you would need the following components.
- DigiSpark ATtiny85 breakout module (1x)
- HC 05 Bluetooth module (1x)
- LED any color (1x)
- 220 Ohms register (1x)
- Breadboard
- Some jumper wires
Schematics:
HC-05 Tx => DigiSpark ATtiny85 P1
HC-05 Rx => DigiSpark ATtiny85 P2
LED Anode => DigiSpark ATtiny85 P4
LED cathode = > GND via 220 Ohms register
HC-05 Vcc => +5 Volts Supply
HC-05 GND => GND
Before making the connection, you must configure your HC05 Bluetooth module to accept the AT commands. I will write another post of how to configure HC05 AT mode.
Once you wire up the circuit and power on, HC 05 will start blinking quickly. Roughly once in a second. This indicates that module is ready to pair with your smart phone. Now open your smartphone's Bluetooth option and search for HC05 as a named device. Tap to pair it. the default passkey is '0000' OR '1234'.
Now its time to upload some code in ATtiny85 module so remove it from the circuit for a while. Use Arduino IDE to upload the sketch. Make sure that you have selected the correct board type. For this example it should be DigiSpark ( 8Mhz- No USB).
Loading ....
Now you have to install the Android Application for Bluetooth terminal. Here is the link to download the app.
Now reconnect the ATtily85 module back to the circuit and power on. Open the smartphone Bluetooth and pair it with the HC05 module. Once it will be paired the led of HC05 module will blink twice with some interval.
Now open the Bluetooth terminal app in your smart phone and send any text and your LED should turn on and off.
this code is not working
ReplyDeleteIts work for me..thx..but how to get data from digispark to android?i use bluetooth.write() but i failed..please help me..thx
ReplyDelete