element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Arduino
  • Products
  • More
Arduino
Arduino Forum Sending serial data from Arduino to Android via Bluetooth - NOT ANSWERED Yet
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Arduino to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Verified Answer
  • Replies 23 replies
  • Answers 7 answers
  • Subscribers 396 subscribers
  • Views 5788 views
  • Users 0 members are here
  • bluetooth
  • arduino
Related

Sending serial data from Arduino to Android via Bluetooth - NOT ANSWERED Yet

Former Member
Former Member over 10 years ago

Hi all,

 

I've been working on my Arduino project for quite a while now, managed to process the incoming data in the Arduino and display it on LCD (data is coming from a simulation on the laptop). But I cannot manage to view this data on my Android App (used MIT App Inventor) via Bluetooth (HC-06). I have managed to do this but after a week I tested it again and found some errors (I think problem was with my hardware) therefore (silly me) I didnt save the sketch, therefore blocks in MIT App Inventor are 100% working.

 

Also, I am connecting RX pin of Bluetooth through a voltage divider with pin 7.  Any ideas pls?

 

Arduino sketch:

 

#include <SoftwareSerial.h>

#include <LiquidCrystal.h>

 

byte myByte; // Storing the incoming data from serial port

int txPin = 7;

int rxPin =6;

 

lcd(12,11,5,4,3,2) //pin of lcd   ****I know this is not the exact command

SoftwareSerial BlueToothConnect(txPin, rxPin);

 

pinMode(rxPin, INPUT);

pinMode(txPin, OUTPUT);

 

void setup(){

lcd.begin(16,2);

Serial.begin(9600);  //Serial communication

 

}

void loop(){

if(Serial.available(){

lcd.clear();

while(Serial.available()>0){       //Until data is being found in Serial, turn on serial on Bluetooth

BlueToothConnect.begin(9600);

myByte = Serial.read(); //reading the myByte data

lcd.write(myByte);  //showing data on LCD

Serial.write(myByte) ; //Showing data on serial monitor

 

txPin = digitalWrite(myByte);   //writing myByte content on pin 7 (txPin)

BlueToothConnect.write(txPin);   //  BlueToothConnect.print(txPin);  //displaying content of txPin to be view on Android display

 

}

 

Message was edited by: Lor B

  • Sign in to reply
  • Cancel

Top Replies

  • neilk
    neilk over 10 years ago in reply to Former Member +2 verified
    Hi lorrainebarbara I've never used SoftwareSerial successfully, although I've been trying to recently to reprogram an HC05 (Master/Slave Bluetooth). This requires the use of SoftWare serial ad so far I…
  • Former Member
    Former Member over 10 years ago in reply to neilk +2 suggested
    Hi neilk , Thank you so much I have managed to incorporate (and change) some of the program you ve published, worked Here is my whole sketch. Thanks alot for your help!! //Sending data serially to Android…
  • gadget.iom
    gadget.iom over 7 years ago in reply to happyforever +2 suggested
    Are you trying to send sensor values or text typed into the serial monitor? All of the other references to bluetooth.print are commented out. Try putting: bluetooth.print("Sending Init String"); // Test…
Parents
  • sarath1210
    0 sarath1210 over 6 years ago

    hi neil i have configured my Bluetooth hc-05  it is pairing with android but i m not getting reply to my comments

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • sarath1210
    0 sarath1210 over 6 years ago

    hi neil i have configured my Bluetooth hc-05  it is pairing with android but i m not getting reply to my comments

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
  • neilk
    0 neilk over 6 years ago in reply to sarath1210

    Hi sarath1210

     

    It would be a good idea to post a new question, in the appropriate forum giving more details of your project.

     

    Neil

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube