Shop OBEX P1 Docs P2 Docs Learn Events
iPhone to Prop interface — Parallax Forums

iPhone to Prop interface

Hello, this has probably been asked a million times.... cause when I do a search i get a million results lol
Looking for help choosing a wireless comm device for the prop, then with how to create a gui on the iphone and link with it.

I am decent with general spin programming & circuit design and would like to setup a few basic home-automation devices to control with my iPhone.
Trouble is... I have never programmed an iphone app, nor do I know how to wirelessly link the prop to it.

After some research it looks like I have 2 options for wireless:
wifi : https://www.parallax.com/product/32420s
bluetooth : https://www.parallax.com/product/30086

After reading as much as I could... it appears that bluetooth would by far be the least painless option for iphone ease-of-use, even though it costs much more than wifi.
reasoning behind my decision is that wifi would involve using a 3rd party iphone app to connect to the xbee, then accessing a webserver created on the prop.... whereas bluetooth allows for the iphone to connect via a single custom app.
I prefer the use to be as simple as possible, so friends and family (who are extremely limited on technical experience) can also access and control without trouble.

So I guess to break it down...
1) should I go with the bluetooth module?
2) how do I link this to an iphone?
3) how do I create a gui to send simple control instructions to the remote prop?

Thanks in advance!

Comments

  • You don't need a third-party iphone app to talk to the Parallax Wi-Fi module. You just need a web browser. The Wi-Fi module runs a web browser that can either serve pages from its own internal flash or from the attached Propeller. You can then do HTTP requests from the browser on the iPhone (or anything that supports a browser) and have those HTTP requests passed on the the Propeller to manipulate your hardware.
  • JB,
    For a while I had a propeller driven HTML ap running on a wireless link through my router. I was able to use the ap with a browser in both my ipad and my android phone. The new wifi adapter looks like that would be a whole lot easier than what I went through to make it work.
    Jim
  • but if i use bluetooth, could I avoid using a webbrowser?
    I would prefer just having a simple, custom app you click on to bring up the desired menu options... as long as the device is in range, it works
  • Duane DegnDuane Degn Posts: 10,588
    edited 2016-12-15 03:09
    Sorry I don't know much about interfacing with an iPhone but I've used Android apps with Propellers a bunch of times.

    I use $3 HC-05 modules. The HC-05 works great with both the Propeller and Android devices.

    I don't know how hard writing a custom app for an iPhone would be but writing apps for Android devices isn't too hard.

    MIT's App Inventor 2 (AI2) make writing apps pretty easy but AI2 get very frustrating to use once an app gets large.

    Here's a link to the first of three videos I made about using AI2.

    The production quality of these videos is so poor they're almost unwatchable. Sorry about that. The third video shows an app I made turning on some LEDs.

    AI2 now has a "backpack" feature which allows blocks of code to be copied between screens and programs. This is a big improvement but I ended up switching to Android Studio to develop apps. Android Studio is a lot harder to learn to use but it's not nearly as frustrating to use as AI2.

  • Well Im looking at this as 4 different components:
    4) prop out = Prop Signal out to manipulate led/light/motor/....
    3) Prop In = Bluetooth transcieve
    2) iPhone out = Bluetooth transcieve
    1) iPhone in = GUI (display buttons translate to numerical value i.e. 0-255)
  • You could use something like a Red Bear Labs BLE Mini or Ada Fruit Bluefruit LE UART Friend where you interface the BLE Mini from an iPhone or Android App and the BLE device communicates with the Propeller via serial comm. On the Prop, you could code it so that it performs the functions you need such as light an LED, run a motor and such based on values you send to the BLE device.

    Example from an App to BLE Device
    ' M 5 F' -> M=Motor, 5=Pin number, F=forward

    On the prop, you would read in the serial data and have a decision block that performs the functions accordingly.

    Another device is the TI CC2650 which could be used in BLE to Uart mode but would require some coding.

    There are plenty of iPhone app tutorials out there and courses on sites such as Udemy in case you are not familiar with app dev.
    Or go this route: http://codewithchris.com/how-to-make-iphone-apps-with-no-programming-experience/
  • I think the rasberry Pi would be a better option. Or just download a remote control app from Apple and use a xbee module or Bluetooth with the prop. Take a look at rasberry Pi garage door opener you can set up a dns on afraid.org then you are just going to a web page that you set up on/ off buttons on so there are Apple Xcode apps you need to design.
  • The RN-42 doesnt have any spin code in obex :/

    DigitalBOB: can you recommend any remote control app names? Just need one or two to get started with learning how to use them
  • The RN-42 doesnt have any spin code in obex :/

    DigitalBOB: can you recommend any remote control app names? Just need one or two to get started with learning how to use them
  • Oh cool thanks JonM, Ill start reading that tomorrow :)
Sign In or Register to comment.