aron-bordin / android-with-arduino-bluetooth Goto Github PK
View Code? Open in Web Editor NEWArduino and Android classes to easily connect your mobile device with an Arduino board
License: GNU General Public License v2.0
Arduino and Android classes to easily connect your mobile device with an Arduino board
License: GNU General Public License v2.0
Hi,
Your android code not working even not sending messages or receiving.
What I did here???
I upload your arduino code in my arduino nano board. Then develop arduino app for simply connect and send message using your code. But no luck.
How I know???
I try S2 terminal App It's working. Your arduino code well responding with S2 terminal.
Problem:
Device is connecting well with arduino but not sending & Receiving msg even not throwing any exception.
Here is my activity...
public class MainActivity extends Activity {
BluetoothArduino mBlue ;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
mBlue = BluetoothArduino.getInstance(this,"Arduino");
mBlue.Connect();
Toast.makeText(this,mBlue.getLastMessage(),Toast.LENGTH_SHORT).show();
Button b=(Button)findViewById(R.id.buttonOn);
Button c=(Button)findViewById(R.id.buttonSearch);
b.setOnClickListener(new OnClickListener(){
@Override
public void onClick(View p1)
{
mBlue.SendMessage("Hi from Android!");
}
});
c.setOnClickListener(new OnClickListener(){
@Override
public void onClick(View p1)
{
Toast.makeText(getApplicationContext(),mBlue.getLastMessage(),Toast.LENGTH_SHORT).show();
}
});
}
}
It will be a good addition to implement serialEvent function of the SoftwareSerial class to use the advantage of separating the serial events from the loop function.
I can't find BC417 Module for sale on Amazon. Can you direct me to a place I can buy it. I would like to contribute to your repo.
hi i tried your library, but i get this error when i call Connect() method
[#]Error while conecting: Attempt to invoke virtual method 'android.bluetooth.BluetoothSocket android.bluetooth.BluetoothDevice.createRfcommSocketToServiceRecord(java.util.UUID)' on a null object reference
Function "run", beginning at line 111 in BluetoothArduino.java program file, has never been called during the execution. Due to which no message received or delivered in the app.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.