Wifi/Bluetooth Shield and Software Serial

Hello,

I'm making a hexapod controlled by an app on a smartphone. The spider works well and my movement algorithms are improving but I still have 2 problems.

The first one is that I still didn't decide if I want bluetooth or WIFI. I feel like it's easier to make a connection with bluetooth but I don't know for sure so it will be nice to give me some pointers there and after that recommend me a shield.

The second one is that, while I searched the forum and found some examples of software serial, they are all in python or C and I need Java and by what I found is not really a supported thing.
I suppose the sketch with all the algorithms is uploaded on Arduino and the "remote" simply controls which function is called.

precu92:
I feel like it's easier to make a connection with bluetooth

It certainly is. If you are using serial I/O to communicate with your machine now, you are likely to find that you can use bluetooth and retain your existing code unchanged.

Bluetooth is just serial without wires.

If you use a Bluetooth-4 device like the HM-10, AND you have BT-4 in the controlling device it should be good for 50m or so, i.e. rather comparable with WiFi.

I don't understand your second question, but I bet there is no need to ask it.

Thank you for your help. I will go with bluetooth then.

Regarding the second question, I didn't see any examples of soft serial in Java and I read that Sun didn't care much for integrating a decent library. After further investigation I found out that it is possible and it's not that different form other languages( as I suspected but asked just to be sure ).

.

precu92:
Regarding the second question, I didn't see any examples of soft serial in Java and I read that Sun didn't care

I still don't understand what you are saying, or why you are saying it. I suggest the first thing you should do is question why you would use software serial when every Arduino I am aware of has at least one hardware serial port. Even in the unlikely event that you need to use software serial, it is actually easier to use than I think you think.

I want to control the robot from my smartphone wireless through Bluetooth, from what I read, I have to use software serial in my app to communicate with the arduino.

That is nonsense, and it is not too bombastic to assert that software serial is the exclusive domain of the ignorant, the lazy, and the desperate. The last category are those that need to connect more than one serial device to an Arduino that has only one hardware serial port, i.e. as well as desperate, too ignorant to get an Arduino that has several hardware ports. Even in that event, the desperate may find it preferable to assign the hardware port to Bluetooth.

Similarly, this is an Arduino forum and, until proven otherwise, you can be pretty sure you can do what you want with an Arduino, and all that stuff about Python, C, and Java is probably irrelevant waffle.

I understand that your robot device works fine and thus you already have control, and I assume it is via hardware serial. If you want to control it via bluetooth, you simply disconnect the wires therefrom and connect a bluetooth module to the same port. On that tack, you simply change what is connected to the port, which makes no difference to Arduino, and no change to your programme.

You might find the following background notes useful

http://homepages.ihug.com.au/~npyner/Arduino/GUIDE_2BT.pdf
http://homepages.ihug.com.au/~npyner/Arduino/BT_2_WAY.ino