Photon to Arduino Bluetooth

Hi guys,

Currently researching the best way to to create a server for my project and have decided the Photon would be the best way to implement this, however I was wondering two things.

Firstly, Is it possible to create an app from within MIT App inventor 2 that will communicate with the photon via Wifi? I know this might be a question for a different forum but thought I would ask anyway!

Secondly, is it possible for me to add a bluetooth module to the photon that can forward the data received from the app to an Arduino (over bluetooth) and then send data back to the photon?

Lastly, if these are capable how easily would it be to implement these,

Thanks for any help!

I think I might have put this in the wrong forum, could a mod move it?

There are some threads with App Inventor posts - just have a search.

Bluetooth: Yes you can attach a BT device too.

And it's not too hard if you have some Arduino experience :wink:


You could alter the category of your own posts yourself by clicking on the pencil symbol next to the topic title.

Iā€™m also working on a similar problem. My solution (and I have not wired it up yet) would be to get the bluetooth add on board for the Photon, and let it be the Master. Then get a battery power bluetooth board like the ones from Punch Through to be the Slave. The Slave takes the data you collect (eg. temperature) and transmits it to the Photonā€™s bluetooth receiver, and then of course the Photon can take the data and push it to the cloud using WiFi.

If youā€™ve moved this thread to another place, let me know. Otherwise Iā€™ll try and post back here with my results.

1 Like

This is exactly the way I would like to do my project, Iā€™ve bought a hm10 to be used as one bluetooth device as it is able to do both master/slave. I will research into the bluetooth board for the photon. Please do report back with any results and I shall do the same!

edit: what is the bluetooth add on board for photon called?

@douy, here is another possible solution. I am only sharing this because they are Particle partners:

:smile:

1 Like

This would be perfect and might come in useful for future projects however as it doesnā€™t ship until January I will need to have a vast majority of the project completed by then, maybe this can go in the ā€˜future improvementsā€™ of my report? :smile:

1 Like

The other thing to have a look at might be bluz (also :particle: Particle partners)

http://www.bluz.io/

1 Like

@douy: why you decide to use bluetooth for communication between Photon and Arduino? It requires you add on board. Easier to use wifi because both Photon and Arduino support wifi.

I've had a look at the bluz previously, its a nifty little add on that would suit my project perfectly but it doesn't ship until January unfortunately and I hope to have the bluetooth part completed by that point :grinning:

I plan on using bluetooth as the device will be in hard to access and require frequent updates from the sensors, Iā€™ll be using wifi so I can connect the data to the cloud and have the sensor information available when Iā€™m away home. Wifi would drain the battery much faster as you know so bluetooth is the next best solution!

Itā€™s called ā€œLightBlue Beanā€. They are also working a a more powerful version thatā€™s slightly larger.

Iā€™ve also ordered a Duo (see above) and Bluz boards (master & salve), but these, as stated above, donā€™t ship for another 30-60 days. The Bean is shipping now, so itā€™s what I am testing over the holidays.

The great part about bluetooth is that, with only a few exceptions, itā€™s compatible across boards. So you can design the slave to talk to the master and swap either hardware later on with minimal impact. Just keep the bluetooth versions the same, such as sticking with BLE.

Iā€™ll post my results here when I can.

So I have my LightBlue Bean, and itā€™s exactly as advertised. Itā€™s small, battery operated, and I had it talking to my iPhone (with their free app) in just a few minutes. Writing the code to have it poll itā€™s internal thermometer was easy, and pushing data out via BLE was just as easy (1 line of code for each). So itā€™s thumbs-up for the Bean!

Iā€™m now learning about the different mode of BLE communication. One is more of a broadcast for very small data (like ā€œT=55Fā€) and is uber simple. If a BLE receiver is listening, it can pick it up. The other is a full serial communication for largeĀ® data packets, and is more complex. For a temp & humidity monitor, I think the broadcast would be fine.

I got the RedBear Labs board, but canā€™t figure out if itā€™s DOA, or just my beginner knowledge. The board powers up, but I canā€™t see it from the Arduino IDE or from the connected USB. So no luck with it, but I am still trying.

Iā€™ll post news when I have it.

I have gone down a different route to yourself, I have purchased two hm-10 bluetooth modules, I am currently getting them to connect with each other after a few days of tinkering it finally worked. So now I am trying to send serial data received from the cloud to arduino over wifi, will update later with my progress!

@douy,

I am trying to find an example like those two below:

http://blog.blecentral.com/2015/05/05/hm-10-peripheral
http://www.openhwdesign.com/ble-hm-10

Could you, please, post your example using Photon with the HM-10?

The Arduino language to send data to a bluetooth device is the same as that of the photon however instead of

Serial.print("Arduino");  for the arduino

it is

 Serial1.print("Photon") for the photon

@douy,

Oh! I see! Thanks!