Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to send and receive data using 1sheeld and arduino??

Status
Not open for further replies.

Qasim Khokhar

Member level 1
Joined
Aug 15, 2013
Messages
35
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
Lahore
Activity points
1,514
I am trying to send data to my arduino uno using Android phone, for interfacing i am using 1sheeld bluetooth.

i am using blueterm app for development on my android phone, when i press any key from my phone LED light (RXD) on 1sheeld blink but i am unable to get data in MCU UART. please guid me how to fix it. my code is below.

**broken link removed**

Code:
#define CUSTOM_SETTINGS
#define INCLUDE_PUSH_BUTTON_SHIELD

/* Include 1Sheeld library. */
#include <OneSheeld.h>

/* A name for the LED on pin 13. */
int ledPin = A0;

void setup()
{
  /* Start communication. */
  
  /* Set the LED pin as output. */
  Serial.begin(115200);
  Serial.print("\r\nAT+ORGL\r\n");
//  Serial.print("\r\n+STBD1=115200\r\n");
  Serial.print("\r\nAT+ROLE=1\r\n");
  Serial.print("\r\nAT+RESET\r\n");
  
}

void loop()
{
  if(Serial){
    Serial.print('#');
    
    Serial.print('\n');
    Serial.print('\r');
    delay(250);
    Serial.flush();
  }
  

}
 

Your code do nothing in regard to the serial data received.
There is not present neither function available() of read().
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top