In this guide, you'll upload an example sketch to your Bean, edit it, and save a copy to your Android device. You'll also walk through the different features in Bean Loader for Android.
To start building with Bean on your Android device, you'll need:
Download Bean Loader from the Play Store here:
Once Bean Loader is installed on your Android device, launch it to get started!
Bean Loader opens to the list of example sketches. From here, you can select a sketch to upload from the included examples. You can also load an Arduino sketch from your phone's filesystem.
The toolbar icons, from left to right, are:
The sketch list is divided into three sections:
Tap the BeanBlinkPowerSaving sketch under the Examples header to open the power-saving Blink example sketch.
Tap the Bluetooth icon in the upper right to open the Select Bean menu.
Your Beans are listed with signal strength on the left. This helps you figure out which Bean you're connecting to.
To rename or blink a Bean, tap the 3 vertical dots icon to the right of a Bean in the list. If you are renaming a Bean and there are many Beans around, it's a good idea to first blink your Bean's LED to make sure you have selected the right device.
If your Bean doesn't change its name right away, try closing Bean Loader and opening it again. It may take some time for you too see the proper name on your device. This is particularly due to caching on iOS and Android devices, which is unavoidable.
Once you're ready to continue, tap your Bean to select it for programming.
In the Sketch Editor, tap Upload to Bean to verify and upload your sketch to Bean:
Once your sketch uploads, your Bean will start running the Blink sketch and you'll get a success message. Hooray! Watch your Bean's LED and make sure it's blinking cyan every 10 seconds.
If your sketch upload fails for some reason, Bean Loader will display an error instead:
Using example sketches can be fun, but you probably want to write your own code and upload that to Bean. We'll download a text editor for code, open the example sketch in it, save a modified copy, and upload that to Bean.
There are lots of Android text editors meant for editing code, but our favorite is DroidEdit. It's a simple code editor that does a good job.
Download DroidEdit Free from the Play Store here:
Go back to Bean Loader and select the BeanBlinkPowerSaving sketch we used earlier. Then select Export to Editor to open the sketch in a different application, and select DroidEdit Free:
The contents of the BeanBlinkPowerSaving example sketch will open in DroidEdit.
Let's change the blink cycle to be 1 second between blinks instead of 10 seconds. That way, it will be easy to tell if our sketch has been uploaded properly.
Change line 9 from
Once that's done, tap the drive icon above the keyboard on the left, then select Save:
DroidEdit will ask you where you want to save your sketch. Select Local to save to your phone's local filesystem:
DroidEdit opens to your Android phone's home directory. Most apps open to the same directory, so it's a safe place to put files you want to find later.
Enter the filename FasterBlink.ino and select Create to save your sketch:
Close DroidEdit and return to Bean Loader. (You can just hit the Back button a few times too.)
On the main screen of Bean Loader, select Choose Sketch.... A file browser will pop up.
Select FasterBlink.ino and tap OK to select it for uploading. You'll see your sketch show up in the main menu:
Select FasterBlink, then tap Upload to Bean to send your new sketch to Bean.
Once the upload completes, your Bean's LED should be blinking every second instead of every 10 seconds!
In this guide, you programmed your Bean with an example sketch, copied the example to your local sketches, and edited and saved your own version of Blink. You should be ready to get started writing and uploading sketches to your Bean!
Bean Loader for Android doesn't have Arduino installed locally. Instead, it sends sketches to the Bean Cloud Compiler to compile them into hex code for your Bean.
If you're working on a sketch and you need to use a library, it might be available on the Bean Cloud Compiler. Check out this thread on Beantalk to see what libraries are available and to request new libraries for the Cloud Compiler.