Android to PIC via Bluetooth

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

Re: Android to PIC via Bluetooth

Postby Idris » Tue Oct 16, 2012 3:24 pm

I think it is possible. But you need to check whether Android 2.1 SDK can support bluetooth library.
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 longcrystal » Fri Jan 18, 2013 12:39 pm

hi idris , may i help with android sdk... i try to compile your java code can success,but after in emulator ...i cannot be success open ...keep come out the application has stopped..... but i transfer apk file into phone no problem ... just dontknow why about the emulator ...do u have face this problem experience?
longcrystal
Freshie
 
Posts: 4
Joined: Thu Aug 16, 2012 9:07 pm

Re: Android to PIC via Bluetooth

Postby Idris » Tue Feb 05, 2013 2:38 pm

I have go through some forum and most of case they can't run in existing emulator. What they do is find another emulator that can support the device OR you can make your phone as emulator (recommended). Look at this video:
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 longcrystal » Sun Feb 24, 2013 7:53 am

Idris。thank for sharing this guide
longcrystal
Freshie
 
Posts: 4
Joined: Thu Aug 16, 2012 9:07 pm

Re: Android to PIC via Bluetooth

Postby imaadak » Wed Dec 23, 2015 9:41 pm

Idris WROTE: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

PIC Source Code:
AndroidBluetooth.X.rar

I will upload the video later. :)


Please explain how can i do the same project using PIC184520 instead if PIC16
imaadak
Fledgling
 
Posts: 1
Joined: Wed Dec 23, 2015 9:34 pm

Re: Android to PIC via Bluetooth

Postby Idris » Tue Dec 29, 2015 11:29 am

Hi imaadak,

If you want to use PIC18F4520, you need to change certain registers in the program to be compatible with your PIC model.
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

Previous

Return to Project Showcase

Who is online

Users browsing this forum: No registered users and 5 guests

cron