How connect EV3 to Arduino using Bluetooth

This is where you talk about the EV3 hardware related topics such as the brick, sensors, LEGO pieces, etc.

Moderators: roger, gloomyandy, skoehler

wilsonfleite
New User
Posts: 1
Joined: Wed Jan 06, 2016 4:07 pm

How connect EV3 to Arduino using Bluetooth

Postby wilsonfleite » Wed Jan 06, 2016 4:23 pm

Hello,

please, I'm trying to connect EV3 and Arduino using bluetooth. I already can to pair them, but I don't know how to send or receive data.
Someone can help me?

Code: Select all


import lejos.hardware.LocalBTDevice;
import lejos.utility.Delay;

public class Principal {

   public static void main(String[] args) {
      
      System.out.println("Paring...");
      
      LocalBTDevice teste = new LocalBTDevice();

      teste.authenticate("20:13:11:29:03:46", "1234");
      System.out.println("Paread!");
      
      
      Delay.msDelay(1000);
      
   }
}


User avatar
gloomyandy
leJOS Team Member
Posts: 5899
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Re: How connect EV3 to Arduino using Bluetooth

Postby gloomyandy » Wed Jan 06, 2016 6:31 pm

What sort of Bluetooth module do you have attached to the Arduino? What protocol are you expecting to be able to use to talk to it?
leJOS news https://lejosnews.wordpress.com/

kak3n
New User
Posts: 9
Joined: Sat Jun 20, 2015 8:12 pm

Re: How connect EV3 to Arduino using Bluetooth

Postby kak3n » Tue Jul 04, 2017 7:50 pm

Hi I am trying to achieve the same thing. The code above works but I have no idea how to send data, as far as the protocol goes it does not matter I just need to send integers and I use arduino bluetooth module hc-05.

User avatar
gloomyandy
leJOS Team Member
Posts: 5899
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Re: How connect EV3 to Arduino using Bluetooth

Postby gloomyandy » Tue Jul 04, 2017 8:40 pm

Sorry I can't really help I'm not really familiar with any of the Arduino stuff. You may be able to get something working on the EV3/leJOS side by hacking the code we use to talk to an NXT (which has a very simple Bluetooth module). See:
https://sourceforge.net/p/lejos/ev3/cod ... ction.java
https://sourceforge.net/p/lejos/ev3/cod ... ector.java

Other than that I can't help much sorry!
leJOS news https://lejosnews.wordpress.com/

kak3n
New User
Posts: 9
Joined: Sat Jun 20, 2015 8:12 pm

Re: How connect EV3 to Arduino using Bluetooth

Postby kak3n » Tue Jul 04, 2017 10:05 pm

gloomyandy wrote:Sorry I can't really help I'm not really familiar with any of the Arduino stuff. You may be able to get something working on the EV3/leJOS side by hacking the code we use to talk to an NXT (which has a very simple Bluetooth module). See:
https://sourceforge.net/p/lejos/ev3/cod ... ction.java
https://sourceforge.net/p/lejos/ev3/cod ... ector.java

Other than that I can't help much sorry!

Thanks.


Return to “EV3 Hardware”

Who is online

Users browsing this forum: No registered users and 1 guest