background preloader

Programming

Facebook Twitter

GitHub - googlesamples/android-BluetoothChat. Bluetooth/Client_Fragment.java at master · JimSeker/bluetooth. Wirsing SendingAndReceivingDataViaBluetoothWithAnAndroidDevice. Android Send/Receive data with Arduino using Bluetooth – Part 2 – Harry's Developer Blog. Package com.example.arduinosensors; import java.io.IOException;

Android Send/Receive data with Arduino using Bluetooth – Part 2 – Harry's Developer Blog

All about opengl es 2x. OpenGL ES. Android includes support for high performance 2D and 3D graphics with the Open Graphics Library (OpenGL®), specifically, the OpenGL ES API.

OpenGL ES

OpenGL is a cross-platform graphics API that specifies a standard software interface for 3D graphics processing hardware. Android Lesson One: Getting Started. This is the first tutorial on using OpenGL ES 2 on Android.

Android Lesson One: Getting Started

In this lesson, we’re going to go over the code step-by-step, and look at how to create an OpenGL ES 2 context and draw to the screen. We’ll also take a look at what shaders are and how they work, as well as how matrices are used to transform the scene into the image you see on the screen. Finally, we’ll look at what you need to add to the manifest to let the Android market know that you’re using OpenGL ES 2.

Prerequisites Before we begin, you’ll want to make sure you have the following tools installed on your machine: Displaying Graphics with OpenGL ES. Dependencies and prerequisites Android 2.2 (API Level 8) or higher Experience building an Android app You should also read OpenGL Try it out The Android framework provides plenty of standard tools for creating attractive, functional graphical user interfaces.

Displaying Graphics with OpenGL ES

This class walks you through the basics of developing applications that use OpenGL, including setup, drawing objects, moving drawn elements and responding to touch input. Design. Android Custom 2D Graphics & Games Programming. How to Draw a 2D Object in Android With a Canvas. There are two basic ways of drawing 2D objects in Android.

How to Draw a 2D Object in Android With a Canvas

Drawing to a View, as described in the last tutorial, is the best option only when your object is static. Untitled. Examples Java Code Geeks - 2016. Android provides a set of APIs for 2D-drawing that allow you to render your custom graphics on a canvas or modify the existing Views.

Examples Java Code Geeks - 2016

When drawing 2D graphics, you have two choices to work with: Draw your graphics or animations into a View object from your layout. In this way, the drawing of your graphics is handled by the system’s normal View hierarchy drawing process and you simply define the graphics to go inside the View.Draw your graphics directly to a Canvas. This way, you personally call the appropriate class’s onDraw() method (passing it Canvas), or one of the Canvas draw…() methods. In doing so, you are also in control of any animation. When we have an activity that uses 2d graphics, such a video game application, drawing to a Canvas, is the best way to work with, as our application will meet the need to regularly re-draw itself. For our example will use the following tools in a Windows 64-bit or an OS X platform: Classroom. Custom Drawing. The most important part of a custom view is its appearance.

Custom Drawing

Custom drawing can be easy or complex according to your application's needs. This lesson covers some of the most common operations. Override onDraw() Before you can call any drawing methods, though, it's necessary to create a Paint object. Canvas. Class Overview The Canvas class holds the "draw" calls.

Canvas

Canvas. Bluetooth. The Android platform includes support for the Bluetooth network stack, which allows a device to wirelessly exchange data with other Bluetooth devices.

Bluetooth

The application framework provides access to the Bluetooth functionality through the Android Bluetooth APIs. These APIs let applications wirelessly connect to other Bluetooth devices, enabling point-to-point and multipoint wireless features. Using the Bluetooth APIs, an Android application can perform the following: Scan for other Bluetooth devices Query the local Bluetooth adapter for paired Bluetooth devices Establish RFCOMM channels Connect to other devices through service discovery Transfer data to and from other devices Manage multiple connections. Android Bluetooth Connection Demo. Objective.

Android Bluetooth Connection Demo

Create a Bluetooth Scanner With Android's Bluetooth API - Envato Tuts+ Code Tutorial. How to Develop Simple Bluetooth Android Application To Control A Robot Remote – Into Robotics. The wireless-networking standard technology called Bluetooth has quietly become a common way to replace the wires on short distances. With a gadget such as a smartphone or a tablet featured with a Bluetooth module, a wireless connection is the easiest way to send and receive information. And because this technology spread in the prototyping culture, it’s often used to control things wirelessly. In this article, we explore a series of materials and resources so you can learn how to develop an Android application and control a robot wirelessly over the Bluetooth technology at the flick of a wrist. With an open architecture and a large community, Android allows anyone to build applications with simple tools and resources. PortManipulation. Reference Language | Libraries | Comparison | Changes Port registers allow for lower-level and faster manipulation of the i/o pins of the microcontroller on an Arduino board.

The chips used on the Arduino board (the ATmega8 and ATmega168) have three ports: B (digital pin 8 to 13) C (analog input pins) D (digital pins 0 to 7) Each port is controlled by three registers, which are also defined variables in the arduino language. The DDR register, determines whether the pin is an INPUT or OUTPUT. DDR and PORT registers may be both written to, and read.

SPI Arduino Library, connecting SPI devices to Teensy. The SPI library allows you to communicate with one or more SPI (Serial Peripheral Interface) devices. Download: SPI is included with Arduino. Often SPI is used by other libraries (like Ethernet) which provide easy access to a specific SPI device. A faster SPI library for Teensy 3.0 is available. This page documents a newer SPI library, released in Arduino 1.0.6 and Teensyduino 1.20, with beginTransaction() and endTransaction(). These new transaction functions prevent SPI bus conflicts, so their use it recommended for all new projects. Hardware Requirements SPI has 4 signals: SS, SCK, MOSI, MISO. Multiple SPI devices use the same SPI SCK, MISO and MOSI signals but each device will need it's own SS pin. Arduino automatically defines "SS", "SCK", "MOSI", and "MISO" as the pin numbers for the selected board. Basic Usage.