Iphone Bluetooth Control Arduino

43,047

96

27

Step 1: How-To

Components:

- Arduino (im used nano)

- HM-10 BLE module

- Iphone 4S or later, and Ipad with BLE (maybe from the "air"?)

- LightBlue app from App Store (Free)

Wiring:

Its similar as other bluetooth modules (HC-05/06) See image if not clear.

Arduino RX to Bluetooth TX

Arduino TX to Bluetooth RX

Bluetooth GND to Arduino GND

Bluetooth VCC to Arduino 3v3 (if basic BLE module without power shield)

If you connect the BLE module to the arduino, and using long time, then place 1K resistor between the

Arduino TX and BLE RX pin, and 2K resistor from between 1K and the GND.

IOS app:

The LightBlue app, very easy use.

After connected to the BLE module, change the "HEX" in the top right corner to "STRING"

Then can send any character or word to the arduino.

With the "Write new value" button can add the strings, what you want to send to the arduino.

If you create a new string, th app send it to the arduino immediately.

Turn on the "listen for notifications", then you can see the data from the arduino side too.

Watch the video for more details.

EDIT: Arduino code download link in video description.

Happy controlling :)

Share

    Recommendations

    • Sweet Treats Challenge

      Sweet Treats Challenge
    • Build a Tool Contest

      Build a Tool Contest
    • Paper Contest

      Paper Contest

    27 Discussions

    0
    None
    LeongJ6

    1 year ago

    Hi, I am new to the arduino stuff. One quick qs, is it ok to use arduino uno for this project?

    2 replies
    0
    None
    majorhunting

    2 years ago

    Will the HM-10 and HM-11 work on both android and ios? I am working on something that will require access from and android and ios devices

    0
    None
    tanveer mahmood

    2 years ago

    I was using samsung s6 for year and now i have iphone 7 but the problem in with ios is HC-06 is not working so please help me that and i made a home door lock through bluetooth,rfid,fingerprint and voice activation. which bluetooth module do i use HC-06 or HM-10

    1 reply
    0
    None
    licheong

    2 years ago

    Hi, I'm using HC-08, which is probably a clone of HM-10 according to internet.
    My iphone detected it with Lightblue, but it doesn't show up on the bluetooth device list on my Macbook. Does Macbook (pro retina, Yosemite) support Bluetooth LE device too?

    2 replies
    0
    None
    planetleaklicheong

    Reply 2 years ago

    H, sorry, don't know, i have no Mac device.

    0
    None
    licheonglicheong

    Reply 2 years ago

    And I wonder if it is possible to send UART messages to the module? I've tried sending messages like AT, AT+RX and it doesn't reply at all.

    0
    None
    villacu

    2 years ago

    Would it work if I use an HC-06 instead of the hm 10???? Thanks ;)

    3 replies
    0
    None
    planetleakvillacu

    Reply 2 years ago

    Nope. HC-06 is not BLE (4.0) module. With iphone, need to use HM-10 or HM-11 or other BLE module.

    0
    None
    villacuplanetleak

    Reply 2 years ago

    Ok so is there any way to use the HC-06 with an iOS device?? or do i have to get the HM-10?

    Again, thank you very much!

    0
    None
    licheongvillacu

    Reply 2 years ago

    1. Get a HC-08, which is a BLE module.
    2. A workaround is using Macbook to connect with your HC-06, and then connect your iOS device with Macbook via wifi. e.g. You can send keystroke or MIDI message by an app called TouchOSC to Macbook, and on the Macbook you can use CoolTerm or other software to establish serial connection with HC-06. I've tried that before. It kind of works but a bit too complicated.

    0
    None
    ShivaganeshguptaS

    2 years ago

    can you please tell me the code for ios app i want develope the app. can u please send me code to my mail id gupta.sunkari@gmail.com

    thank you.

    waiting for reply.

    1 reply
    0
    None
    licheongShivaganeshguptaS

    Reply 2 years ago

    The link of the code is here. I wonder why he has put it in the youtube description but not here:
    https://drive.google.com/file/d/0B6GR9Hj5Ut61NzN5UEhQbGxVUkU/view

    0
    None
    seungmin lee

    2 years ago

    HI, I couldn't open the file in youtube description. is there somebody copy and paste the code in here? or please send it to my email. Thanks!!

    addjake@gmail.com

    0
    None
    KDLaun

    4 years ago on Introduction

    I got this working yesterday, thanks for sharing!

    Since the connections on the HM-10 are pretty fine, I ended up mounting it on a small piece of perfboard so I could break out the pins and add the voltage divider resistors for the TX/RX line. One thing to note: disconnect pin 0 when you are uploading a sketch to Arduino to avoid an avrdude error.

    2015-01-02 09.32.28.jpg
    3 replies
    0
    None
    jimiredwingKDLaun

    Reply 4 years ago on Introduction

    Thanks for posting this. I have a question about how you are wiring the resistors. I get the 1k between BLE Rx and Arduino Tx, but where exactly does the 2k go?

    FYI for others trying this, I have it working well with no resistors, but after an hour or so it starts to draw way too much current (100 mA) which leads to my arduino voltage regulator burning up.

    Thanks for any help on this!

    0
    None
    KDLaunjimiredwing

    Reply 3 years ago on Introduction

    Hi jimredwing,

    The 2K resistor should go between the RX/TX connection and ground. You are essentially trying to get 5.0v down to 3.3v using a voltage divider. I just randomly searched online and came up with this calculator that illustrates it pretty well.

    https://www.abelectronics.co.uk/tools/resistor-voltage-divider.aspx

    If you put 5v in the input, 1000 ohms for R1 and 2000 ohms for R2, you will see that the calculated result is 3.3v. In my case, I didn't have a 2K resistor, so I just used two 10K resistors in series in place of R2. Hope that helps.

    0
    None
    planetleakKDLaun

    Reply 4 years ago on Introduction

    Yes better with board.

    Forgot write yet, to remove module when upload the code if using RX/TX pins.

    With softwareserial, you can stay connected when uploading the code.