Writing Android Apps In C, No Java Required

Older Android devices can be had for a song, and in many cases are still packing considerable computational power. With built in networking, a battery, and a big touch screen, they could easily take the place of a Raspberry Pi and external display in many applications. As it so happens, Google has made it very easy to develop your own Android software. There’s only one problem: you’ve got to do it in Java.

Looking to get away from all that bloat and overhead, [CNLohr] set out to see what it would take to get 100% C code running on an Android device. After collecting information and resources from the deepest and darkest corners of the Internet, he found out that the process actually wasn’t that bad. He’s crafted a makefile which can be used to get your own C program up and running in seconds.

We mean that literally. As demonstrated in the video after the break, [CNLohr] is able to compile, upload, and run a C Android program in less than two seconds with a single command. This rapid development cycle allows you to spend more time on actually getting work done, as you can iterate through versions of your code almost as quickly as if you were running them on your local machine.

[CNLohr] says you’ll still need to have Google’s Android Studio installed, so it’s not as if this is some clean room implementation. But once it’s installed, you can just call everything from his makefile and never have to interact with it directly. Even if you don’t have any problem with the official Android development tools, there’s certainly something to be said for being able to write a “Hello World” that doesn’t clock in at multiple-megabytes.

Continue reading “Writing Android Apps In C, No Java Required”

Android Phone Serves As Arduino Terminal

Looking to use his Arduino when on-the-go, [Oleg] has been working on a way to use the Android ADK terminal emulator with the Arduino. The Android side uses ADK features along with a custom application. [Oleg] received help from his friend [Victor] when developing the program for Android (you can check out our own Android Development tutorials if you’re interested in learning how this is done). The .apk file is available for download, but they’re waiting to release the source code until they can clean it up and get some of the gnarly bugs out of the beta version.

A USB host shield for the Arduino is needed to connect to an Android hand set. You’ll be able to send and receive strings via the terminal, with support for carriage return and life feed characters. Unfortunately this doesn’t allow you to change, compile, or write sketches to the Arduino. But it might come in very handy when trouble shooting a project when a computer is not around, or just for using an Android phone as an output.

Bluescripts Makes Bluetooth Control From Android A Bit Easier

Here’s a way to gain control of your projects using an Android device. Bluescripts is a free app available in the Android market that makes it a bit easier to make interfaces to send customizable messages. If you have a Bluetooth receiver in your project, connecting to it is as easy as putting the MAC address into an XML file on the Android device. Each tag in that file has a name, as well as the address of the target and the message that should be sent. On the receiving end, you just need to make sure your project hardware is ready to receive an ASCII message and act based on what comes through.

Check out the demonstration video after the break. Perhaps it’s not as cool as you could do if you were writing your own Android program, but we can’t think of anything we’ve seen that makes an Android interface this quick and easy.

Continue reading “Bluescripts Makes Bluetooth Control From Android A Bit Easier”

A Breakout Board For Your Android Phone

[sparkfun] announced a new board called the IOIO (pronounced “yo-yo”) this week that allows communication from your Android devices to your upcoming projects.

The board hasn’t been released yet; [sparkfun] is still pulling together documentation and waiting on their first production run. We do know that the board contains a PIC24F MCU, and will give your phone analog input,  and Digital I/O, PWM, I2C, SPI, and UART control. Communication with the board is over the USB port on your phone.

The brilliant thing about this board is that an external programmer isn’t required. Everything you connect to this board can be controlled from within Android apps. We covered Android development in a hackaday tutorial series before, so now it’s possible to put these skills to give your projects a touch screen, internet and bluetooth connections, a camera, or your phone’s accelerometers. Very slick.

Video of some basic functions demonstrating what possible with this board after the jump, but feel free to comment and tell us what you’d like to see done with this board.

Propeller-Android Communications Using Debug Mode

Here’s a new way to connect an Android phone and a Propeller microcontroller. It’s called the PropBridge and uses a very simple circuit with a voltage regulator, a couple of transistors, and a few resistors. The trick to this method lies in creative use of software features that already exist on Android hardware, the Android Debug Bridge (ADB). The ADB was added with development in mind, but since it provides low-level control of certain parts of these devices it was just waiting to be incorporated into a hack.

The Propeller itself uses firmware to make Android think it is one of two different externally connected hardware devices. It can act like a PC running the ADB client or it can mimic a TCP connection. There’s still plenty of room on the uC to add your own firmware, and the majority of the I/O pins are unneeded for the basic connection. Check out the video after the break for a quick overview of the system.

If you need a little help with Android programming before you’re able to use this in your own projects, check out our Android development series.

Continue reading “Propeller-Android Communications Using Debug Mode”

Amarino Makes Android Controlled Robots A Snap

[Lucas Fragomeni] is controlling this robot using the accelerometer on his Android phone (translated). He could have gone through our Android tutorials and developed a custom application but he took the shorter route and used Amarino, an ‘Android meets Arduino’ toolkit, to do it for him. [Lucas] combined an Arduino, a BlueSMiRF Bluetooth modem, and two servo motors to build his robot. Amarino lets him connect to that Bluetooth modem and send sensor data over the connection. In this case it’s only the accelerometer that he chose to use, but he could have gone with the touchscreen, or any other sensor the handheld has to offer. Using this code package got him up and running quickly, only requiring that he writes his own code to turn the received signals into servo motor control routines. See it in action after the break.

Continue reading “Amarino Makes Android Controlled Robots A Snap”

Patching Into Android Music Control

Here’s a look at the TRRS cable that Android phones use. [Rich Kappmeier] want to control the music player on his Nexus One while driving. It’s not necessarily a safe endeavor if you’re staring at the screen and poking away with one hand while trying to stay in your lane. A little bit of research helped him figure out how the hardware in a headphone controller worked and he decided to incorporate that into a connector cable for the car.

The control signals rely on a specific resistance between the TRRS function ring and ground. Once he worked out the chart above and targeted the correct resistance values he built a rocker switch for Fast Forward and Reverse, as well as a Play/Pause button into the connector cable. You should be able to use this for more than just music control. Take a look at our Android Development tutorial and see what else you can come up with.

[Thanks Alastair]