With Instructables you can share what you make with the world, and tap into an ever-growing community of creative experts.
Tell us about yourself!
I'm not sure exactly what problem you're encountering, but it's been awhile since we wrote this code and it's likely that some of the libraries have changed in the meantime. Please make sure that you're set up to install some other example on your board (e.g., blink), and that our code compiles. Please feel free to post any compilation or uploading errors and I'll see if I can help you resolve them.
The bluetooth module we used allowed us to replace the built-in serial port functionality that is usually used for USB. If you're using a different module, you'll need to find a tutorial for how to set it up and then replace our Serial.write lines with the equivalent for your module (usually there's a library you can pull in that has a nearly identical function, so a simple find and replace should suffice).
We mostly used the app to help us visualize the sensor readings, it's not really necessary for changing the mode. The simplest solution would be to hard-code the mode that you want to use, or else change it via the Arduino Serial Port window. You'd need to connect it to a computer whenever you wanted to change the mode, though.Another possibility is to add a push button, and then replace the Serial port reading code with a check for whether or not the button is down. If it is, then switch to the next mode. You'll probably also want to add some logic to check for the button release, or a limit on the amount of time that must elapse before it increments the mode again (otherwise it may cycle through the events too quickly).
Hidden USB Storage
Let your inbox help you discover our best projects, classes, and contests. Instructables will help you learn how to make anything!
© 2016 Autodesk, Inc.