Entries Tagged 'Embedded' ↓

Getting started with Android NDK

Per-Erik Bergman

You want to try out the Android NDK? I have gotten a lot of questions about how to setup and work with the NDK and I decided to write down how I do it. My goal with this entry is to gather all the information you need to get started with the Android NDK. I [...]

Tags: , , ,

Open links from Text-elements in QtQuick

From day one, QtQuick’s Text-element sports opening URL:s in an external application, typically a web page. It’s very easy to use this feature and probably most of you have already been close to or have used it. The only thing that is required is that you set the Text.textFormat property to Text.RichText. Default, textFormat is [...]

Tags:

Arduino UNO and the Google ADK – part III

Tomas Nilsson

Preparing the Arduino The Arduino firmware is a simple program receiving a toggle LED command from the connected Android device. Some parts are taken from the USB Host Shield 2.0 library. Connect the USB Host Shield 2.0 to the Arduino UNO (note that the picture above does not show the connected host shield, but it will [...]

Tags: , , ,

Arduino UNO and the Google ADK – part II

Tomas Nilsson

Getting into detail The Android application is a  simple demo that toggles a LED connected to the accessory (the Arduino UNO). The Android code can be found under the java directory in the source git: git clone git://github.com/joekickass/Arduino-Uno-Android-Accessory.git Below I will highlight parts of the code. Most of the information given can be found in the [...]

Tags: , , ,

Arduino UNO and the Google ADK – part I

Tomas Nilsson

This is the first post in a serie describing how to get started with the Google ADK using an Arduino UNO and the Circuits@Home USB host shield. The title of the post actually lies a bit, because we will not use niether the ADK board nor the ADK software provided by Google, since the ADK software only works on [...]

Tags: , , ,

Arduino on Ubuntu without IDE

Tomas Nilsson

This is a small post on how to set up your Arduino development environment without using the crappy Arduino IDE. The setup uses an Arduino Uno. The current version of Ubuntu (at this time it is Ubuntu 11.04) offers the latest version of the Arduino library through the Universe repository. This means that installation is as simple as [...]

Tags: ,

Using QtCreator for Arduino development

Introduction I’ve been using QtCreator for some time now, mostly for Qt projects, and I really like the environment. It’s fast and have plenty of features for c/c++ development such as code completion, symbol navigation, and git integration. Today I decided to try if I could use QtCreator for Arduino development and it turned out [...]

Tags: ,

OpenGL ES Tutorial for Android – Part VI – Textures

Per-Erik Bergman

Last tutorial we worked a bit more on meshes and we have also talked about adding colors to our mesh. The most common way of adding colors to your mesh is to add a texture. There is a couple of different steps involved with adding a texture to the mesh I will try to go [...]

Tags: , ,

Exceptions and Errors on iOS

Fredrik Olsson

Cocoa, and by inheritance Cocoa Touch on iOS makes a clear distinction between what is an exception, and what is an error in your application. This should be obvious since NSException and NSError both inherit from the NSObject root class with no relations at all. Programmer vs. User Exceptions are intended for signaling programming errors [...]

Tags: , , , ,

Rewriting a Public Cocoa Touch API

Fredrik Olsson

Cocoa Touch added API for presenting a view controller in a popup bubble in iPhone OS 3.2, the responsible class is named UIPopoverController. One would guess that this new class is a subclass of UIViewController, just like UINavigationController is, but that is not the case. One would also guess that in functionality many ideas for [...]

Tags: , , , , , ,

Performing any Selector on the Main Thread

Fredrik Olsson

Many UI frameworks, including AppKit for Mac OS X and UIKit for iPhone OS, require that all methods to UI components are sent on the main UI thread. Cocoa and Cocoa Touch make this quite easy by providing for example -[NSObject performSelectorOnMainThread:withObject:waitUntilDone:] in Foundation. Making updating the text for a text field a snap: [someTextField [...]

Tags: , , , , , , , , ,

OpenGL ES Tutorial for Android – Part V – More on Meshes

Per-Erik Bergman

I have a feeling that some of you have tried my tutorials and then thought “This is a 3D tutorial, but why is everything in 2D?”. So in this tutorial we will make some real 3D meshes. This is also necessary for the following tutorials. When I started I had problems with finding out how [...]

Tags: , ,

Boosting Android performance using JNI

Mattias Rosberg

JNI or Java Native Interface is the interface between the Java code running in a JVM and the native code running outside the JVM. It works both ways, that is you can use JNI to call native code from your Java programs and to call Java code from your native code. The native code normally [...]

Tags: ,

Learn to Stop Worrying and Love the Singleton

Fredrik Olsson

Enterprise applications and mobile applications have quite different requirements. Starting an enterprise application is just something you do once before it continue running for months or years. On the other side of the spectrum most mobile applications seldom runs for more than minutes, run by a bored users standing in line or riding the bus. [...]

Tags: , , , , ,

OpenGL ES Tutorial for Android – Part IV – Adding colors

Per-Erik Bergman

Last tutorial was about transformations. This tutorial will be a short one. I’m going to talk about adding color to your mesh. I will continue with the source code from tutorial II. Adding color 3D models with no colors are pretty boring so let’s add some color to it. In general colors need no explanation. [...]

Tags: , ,