Create an IPhone App That Talks to Particle Mesh
by jaredwolff in Circuits > Arduino
1009 Views, 2 Favorites, 0 Comments
Create an IPhone App That Talks to Particle Mesh
In this project, you'll learn how to load an app on your iPhone that talks directly to a 3rd Generation Particle Mesh board. It will take less than 20 minutes of your time. Plus, you can start tinkering right away!!
Let's get started.
Things you'll need
- Particle Mesh (Xenon, Argon, Boron) board
- Newer iPad or iPhone. (That's it!)
Getting setup
Getting setup will be the trickiest part.
- Install Xcode. You can download it from the App store here.
- Install Particle Workbench. You can download it here.
- You'll also need an Apple login. I use my iCloud email. You can create a new account within Xcode if you don't have one yet.
If you prefer video, check out the one above. Otherwise, follow along in this step-by-step guide. :)
Clone the Repos
Clone the RGB firmware code to your computer
git clone git@github.com:jaredwolff/particle-bluetooth-rgb.git
Clone the App example code to your computer as well
git clone git@github.com:jaredwolff/swift-bluetooth-particle-rgb.git
Load to Particle Mesh Board
- The fastest way to get started is to compile and load locally.
- Plug your Particle device into USB
- Click on ble-rgb-control.ino in the left menu
- Select the Particle device you're using in the bottom right corner. (I'm using a Xenon in this example)
- Select the deviceOS version as 1.3.0-rc.1 in the same area.
- Put the device into DFU mode.
Here are some handy ways to do it without touching a single button on the mesh board:
For Mac (tested)/Linux (untested)
stty -f /dev/tty.usbserial1234 14400
For PC:
mode COMx 14400
(x being the auto-assigned port number)
Once you run the command, you may notice your device is blinking yellow! Good stuff! -
Command + Shift + P and then click Flash application (local)
Note: if you are unsure which version is on your device it's best to do a CloudFlash instead of a Flash application (local). That way your OS is updated in the process as well.
Load to IPhone
- Open the project in Xcode
- Plug in and select your device
-
Press play to load it
Having trouble? Check out the Troubleshooting step.
Time to Play
At this point the firmware should be loaded on your device. The app is loaded on your phone. You can take a look through the code and see how things were connected.
If you're curious about all the details you can check out my step-by-step post here:
https://www.jaredwolff.com/the-ultimate-how-to-bluetooth-swift-with-hardware-in-20-minutes/
All the troubleshooting steps are there as well:
Also! This is a preview of some of the content from my upcoming Ultimate Guide to Particle Mesh. You can subscribe to my list for more details, exclusive content and a discount when it comes available here:
https://www.jaredwolff.com/the-ultimate-guide-to-particle-mesh/
Thanks for check this project out. If you enjoyed it, consider hitting that heart button. It really helps me out. ❤