Android to PIC via Bluetooth

Works done? Proud of it? Show off here! Let's see what you've built can help inspire others.

Android to PIC via Bluetooth

Postby Idris » Sat Jun 30, 2012 11:11 pm

This project shows the basic communication interface between Android phone and PIC microcontroller.
DSC01223 [640x480].JPG

I'm using Eclipse software and Java language for Android application.
For PIC microcontroller I'm using MPLAB X IDE and MPLAB XC8 Compiler.

Components:
~ PIC16F876A
~ SK28A + 8x2 LCD
~ Bluetooth Bee Module + XBee Starter Kit without module
(I'm create this module for my own, however you can purchase it at Cytron Website)
*Very basic connection between SK28A and XBee Starter Kit without module for UART communication.

I'm using Galaxy W Android 2.3.3 Gingerbread OS.

Project flow:
1st, pairing Android phone and bluetooth device.
In this project, I have hard code the bluetooth device name and mine is 'OmniTek'.
Then open the Android application click button 'connect'.
It will find the 'OmniTek' bluetooth and connecting.
Once connected, LED on SK28A can be controlled using Android phone by touching the 'LED ON' and 'LED OFF' button.

I'm really new in Java language, so I can't explain well the coding. I just try and error, follow my instinct and finally I got it. Alhamdulillah! :)

This is my references:
How to install Eclipse and SDK: http://www.youtube.com/watch?v=xtsyrKdPZVw
Android - Intro to bluetooth: http://www.youtube.com/watch?v=M5_EJ27xjMU
Android - Turning bluetooth ON and OFF: http://www.youtube.com/watch?v=E6VlPklnQMY
Android - Discovering bluetooth device: http://www.youtube.com/watch?v=X-Z4TiJTtlY
Tutorial: Android to Microcontroller via Bluetooth (Part 2): http://www.ryandebenham.com/?p=131

Android Bluetooth Source Code:
Android Bluetooth.rar
(61.78 KiB) Downloaded 2411 times

PIC Source Code:
AndroidBluetooth.X.rar
(64.08 KiB) Downloaded 2532 times

I will upload the video later. :)
Cytron Technologies invest time and resources providing tutorial, training and support for STEM education and maker movement. We need your support by purchasing products from Cytron Technologies. Thanks.
http://www.cytron.com.my
User avatar
Idris
Moderator
 
Posts: 409
Joined: Thu Mar 22, 2012 5:28 pm
Location: Pulau Pinang

Re: Android to PIC via Bluetooth

Postby Idris » Sat Jun 30, 2012 11:52 pm

This is the video:

http://www.youtube.com/watch?v=GG5byy03j0k&feature=plcp
Sorry for my phone orientation in the video. :D
Cytron Technologies invest time and resources providing tutorial, training and support for STEM education and maker movement. We need your support by purchasing products from Cytron Technologies. Thanks.
http://www.cytron.com.my
User avatar
Idris
Moderator
 
Posts: 409
Joined: Thu Mar 22, 2012 5:28 pm
Location: Pulau Pinang

Re: Android to PIC via Bluetooth

Postby sich » Sun Jul 01, 2012 1:18 am

Nice work Idris! :D
Very informative for beginners! Just love to see you shared the info which got you started *thumbs up*

Looking forward to more smartphone-related projects in this forum...
~> How to ask QUESTIONS the SMART way in FORUM? <~
User avatar
sich
Moderator
 
Posts: 603
Joined: Tue Apr 21, 2009 2:15 pm

Re: Android to PIC via Bluetooth

Postby robosang » Mon Jul 02, 2012 3:13 pm

Wuh.... nice work man! Like it!
robosang
Expert
 
Posts: 1239
Joined: Wed Jun 10, 2009 5:37 pm

Re: Android to PIC via Bluetooth

Postby Idris » Tue Jul 03, 2012 11:29 pm

I have upgrade a little bit so that Android phone can receive and display data.

http://www.youtube.com/watch?v=Ntc0DtuI ... e=youtu.be

Android Bluetooth Source Code:
Android Bluetooth.rar
(66.59 KiB) Downloaded 1185 times

PIC Source Code:
AndroidBluetooth.X.rar
(104.12 KiB) Downloaded 1154 times
Cytron Technologies invest time and resources providing tutorial, training and support for STEM education and maker movement. We need your support by purchasing products from Cytron Technologies. Thanks.
http://www.cytron.com.my
User avatar
Idris
Moderator
 
Posts: 409
Joined: Thu Mar 22, 2012 5:28 pm
Location: Pulau Pinang

Re: Android to PIC via Bluetooth

Postby zin985 » Thu Oct 11, 2012 7:45 pm

hai idris :D
can i get ur scehematic or circuit diagram for module for bluetooth bee module .. ^^ please2
can list component ur used it???
i hope u will help me ..... need help urgent for my psm..hu3
zin985
Greenhorn
 
Posts: 3
Joined: Thu Oct 11, 2012 7:21 pm

Re: Android to PIC via Bluetooth

Postby Idris » Fri Oct 12, 2012 10:13 am

zin985 WROTE:hai idris
can i get ur scehematic or circuit diagram for module for bluetooth bee module .. ^^ please2
can list component ur used it???
i hope u will help me ..... need help urgent for my psm..hu3

Hi zin985, I have list all the components at the 1st post.
1. PIC16F876A
2. SK28A + 8x2 LCD
3. Bluetooth Bee Module + XBee Starter Kit without module (SKXBEE-BOARD)
All this item you can found at Cytron website.

Connection for UART:
SK28A (5V) - SKXBEE-BOARD (5V)
SK28A (GND) - SKXBEE-BOARD (GND)
SK28A (RC6) - SKXBEE-BOARD (RX)
SK28A (RC7) - SKXBEE-BOARD (TX)
Cytron Technologies invest time and resources providing tutorial, training and support for STEM education and maker movement. We need your support by purchasing products from Cytron Technologies. Thanks.
http://www.cytron.com.my
User avatar
Idris
Moderator
 
Posts: 409
Joined: Thu Mar 22, 2012 5:28 pm
Location: Pulau Pinang

Re: Android to PIC via Bluetooth

Postby zin985 » Fri Oct 12, 2012 12:35 pm

^^ i mean component list for circuit module u build by ur self.... ^^
can i have list component eletronik and schematic for that module u make by ur self... please2.. i hope u will help me... :|
zin985
Greenhorn
 
Posts: 3
Joined: Thu Oct 11, 2012 7:21 pm

Re: Android to PIC via Bluetooth

Postby zin985 » Fri Oct 12, 2012 12:46 pm

Idris WROTE:
zin985 WROTE:hai idris
can i get ur scehematic or circuit diagram for module for bluetooth bee module .. ^^ please2
can list component ur used it???
i hope u will help me ..... need help urgent for my psm..hu3

Hi zin985, I have list all the components at the 1st post.
1. PIC16F876A
2. SK28A + 8x2 LCD
3. Bluetooth Bee Module + XBee Starter Kit without module (SKXBEE-BOARD)
All this item you can found at Cytron website.

Connection for UART:
SK28A (5V) - SKXBEE-BOARD (5V)
SK28A (GND) - SKXBEE-BOARD (GND)
SK28A (RC6) - SKXBEE-BOARD (RX)
SK28A (RC7) - SKXBEE-BOARD (TX)



^^ i mean component list for circuit module u build by ur self.... ^^
can i have list component eletronik and schematic for that module u make by ur self... please2.. i hope u will help me...
zin985
Greenhorn
 
Posts: 3
Joined: Thu Oct 11, 2012 7:21 pm

Re: Android to PIC via Bluetooth

Postby j6433 » Tue Oct 16, 2012 2:12 pm

newbie here...would want to communicate between android (2.1) and adruino.. can this be possible? :roll:
j6433
Novice
 
Posts: 20
Joined: Tue Oct 16, 2012 2:08 pm

Next

Return to Project Showcase

Who is online

Users browsing this forum: No registered users and 4 guests