Lecture 9: Programming Beans Topics: Bean Android SDK Date: Mar 29, 2016.

Slides:



Advertisements
Similar presentations
Google Android Introduction to Mobile Computing. Android is part of the build a better phone process Open Handset Alliance produces Android Comprises.
Advertisements

Programming with Android: SDK install and initial setup Luca Bedogni Marco Di Felice Dipartimento di Informatica: Scienza e Ingegneria Università di Bologna.
Permissions.  Applications can protect resources & data with permissions  Applications statically declare permissions  Required of components interacting.
1 Arduino Board: Arduino UNO Arduino Programing Environment: Arduino 0022
Embedded Programming and Robotics Lesson 2 C Programming Refresher C Programming1.
ANDROID PROGRAMMING MODULE 1 – GETTING STARTED
Intel Do-It-Yourself Challenge Hello World with the Arduino IDE Nicolas Vailliet Intel.
UFCFX5-15-3Mobile Device Development Android Development Environments and Windows.
How to make it work? Doncho Minkov Telerik Academy academy.telerik.com Technical Trainer
Arduino Part 2 Topics: Serial Communication Programming Constructs: functions, loops and conditionals Digital Input.
Android Programming. Outline Preparation Create new project Build and Run a project Debug a project Deploy on devices.
Chien-Chung Shen Manifest and Activity Chien-Chung Shen
FUN WITH COOL KIT. Kit Purpose Have fun assembling and programming a simple robot – Includes chassis, wheels, motors, motor driver, IR sensor and arduino.
Mobile Programming Lecture 1 Getting Started. Today's Agenda About the Eclipse IDE Hello, World! Project Android Project Structure Intro to Activities,
DPNM Lab., POSTECH 1/25 CS490K - Internet of Things (IoT) Jonghwan Hyun DPNM Lab. Department of Computer Science and Engineering, POSTECH
Chapter 3 Navigating a Project Goals & Objectives 1.Get familiar with the navigation of the project. How is everything structured? What settings can you.
Develop Apps for Embedded Android Networking
Untethered Walk around your classroom with your Laptop, with no cables connected!
Java Mobile Apps with GWT & PhoneGap Josh Marinacci, webOS Developer Advocate.
PARSING FACEBOOK DATA FOR ANDROID 1. Step by Step  Import Android SDK  Get the hash key  Create a new app  Create a new project in Eclipse 
Android Activities 1. What are Android Activities? Activities are like windows in an Android application An application can have any number of activities.
ANDROID Presented By Mastan Vali.SK. © artesis 2008 | 2 1. Introduction 2. Platform 3. Software development 4. Advantages Main topics.
Rajab Davudov. Agenda Eclipse, ADT and Android SDK APK file Fundamentals – Activity – Service – Content Provider – Broadcast Receiver – Intent Hello World.
DUE Hello World on the Android Platform.
FTP Server API Implementing the FTP Server Registering FTP Command Callbacks Data and Control Port Close Callbacks Other Server Calls.
 Installation of Android Development Environment  Creating the App with OpenGL ES API  Running the App on Emulator Android App Development.
SENIOR DESIGN 1 FALL 2015 HOME SECURITY SYSTEM [1]
Processing TYWu. Where can I download? 2.0b9 Windows 32-bit.
ANDROID – A FIRST PROGRAM L. Grewe Using AndroidStudio –basic Android  Lets do a “Hello World Project”  Start up AndroidStudio (assume you have installed.
Programming, Serial and Virtual Prototyping. Code if ( You like semicolons ) { Stay here for intro to Arduino code } else { Join the MODKit group for.
Introduction to Android Android Club Agenda Set development environment “Hello Android” app Device connection Debugging.
ROBOTIC ARM 2 Wilmer Arellano © Hardware  Next slide shows sensor connection to analog pin 0 and Motor 1 connection. Lecture is licensed under.
USING HARDWARE DEVICES When building a mobile application, it's important that you always test your application on a real device before releasing it.
Basic Circuits – Lab 5 Wireless Networking Xmedia Spring 2011.
Installation of Visual Studio Android emulator and Android Studio
TCS Internal Maps. 2 TCS Internal Objective Objective :  MAPS o Integration of Maps.
Lecture 2: Android Concepts
Cosc 5/4735 YouTube API. YouTube The YouTube Android Player API enables you to incorporate video playback functionality into your Android applications.
Mobile Software Development for Android - I397 IT COLLEGE, ANDRES KÄVER, WEB:
ME 120: Arduino PWM For Loops in Arduino ME 120 Mechanical and Materials Engineering Portland State University
Lecture 9: Introduction to Arduino Topics: Arduino Fundamentals, Bean Date: Mar 22, 2016.
Programming in Arduino Materials:Arduino Board Casperelectronics Pre Pres. Notes Photos from workshop?
Arduino + Bluetooth TYWu. Connection Arduino + Bluetooth Module.
Microcontroller basics
Lecture 5: Location Topics: Google Play Services, Location API Date: Feb 16, 2016.
Infrared Proximity Sensors & Liquid Crystal Display Instructor Dr Matthew Khin Yi Kyaw.
LOGO iPhone to Galaxy Note Transfer Transfer iPhone Data to Galaxy Note 3/Note 4/Note 5/Note Edge.
Arduino Programming. THE ARDUINO IS A MICROCONTROLLER – A LOW COST, LOW PERFORMANCE COMPUTER.
Mobile Device Development
Lecture 5: Location Topics: Google Play Services, Location API
Google VR (gvr) CardBoard and DayDream With OpenGL
INFO 448: Android Development
Lecture 2: Android Concepts
European Robotic LABoratory
Android Runtime – Dalvik VM
APK Downloader
Development-Introduction
Arduino Part 1 Topics: Microcontrollers Programming Basics
Lecture 2-2: Arduino Programming
Sensors, maps and fragments:
Mobile Device Development
Programming, Serial and Virtual Prototyping
Wireless Communication between Android Application and Sensors
Arduino: For Loops.
Topics: Programming Constructs: loops & conditionals Digital Input
Programming 2: The Arduino IDE & First Sketches
Lecture 2: Android Concepts
Cosc 4730 An Introduction.
Model Blimp Design Competition Programming Workshop by Youth College (International) / VTC May
Arduino程式範例.
Presentation transcript:

Lecture 9: Programming Beans Topics: Bean Android SDK Date: Mar 29, 2016

References (study these)

We will use a ‘Bean’ To get a Bean for free:

Installation/Setup Coding: Install Arduino + Bean IDE Patch (for laptop) Install DroidEdit App (coding on the phone!) Loading/Running Code on Bean: Install BeanLoader App (Phone or Laptop)

Coding and Loading: Way #1 Coding + Wireless loading Arduino studio + Bean patch + Beanloader (laptop)

Coding and Loading: Way #2 Wireless Loading Arduino studio + Bean Patch Android BeanLoader App File Copy

Coding and Loading: Way #3 Wireless Loading Android BeanLoader App File Select DroidEdit App

Let’s see BeanLoader in action

Programming: Bean + Android Write code for Arduino Write code for Android (need new lib) BLE

Code for Arduino Write code: Read Acceleration Send over Serial void setup() { Serial.begin(57600); } void loop() { AccelerationReading reading = Bean.getAcceleration(); char x = abs(reading.xAxis) / 2; char y = abs(reading.yAxis) / 2; char z = abs(reading.zAxis) / 2; Bean.setLed(x, y, z); Serial.println(x); //Serial.println(y); //Serial.println(z); }

Code for Android Setup Android Project: /app/build.grade (dependencies) /app/build.grade (defaultConfig) AndroidManifest.xml Permissions compile 'com.punchthrough.bean.sdk:sdk:1.0.1' minSdkVersion 18 targetSdkVersion 22

Code for Android Bean Discovery Listener: BeanManager.getInstance().startDiscovery(bdl); BeanDiscoveryListener bdl = new BeanDiscoveryListener() public void onBeanDiscovered(Bean bean, int rssi) { Log.v("NIRJON", "" + bean.getDevice() + ", " + rssi); b = bean; // Bean b was declared in Activity. public void onDiscoveryComplete() { } };

Code for Android Bean Listener: b.connect(getBaseContext(), blsnr); BeanListener blsnr = new BeanListener() public void onConnected() { Log.v("NIRJON", "Bean is connected!!!"); } //several other auto generated functions }

Code for Android Bean Reading Acceleration: b.readAcceleration(new Callback () public void onResult(Acceleration result) { Log.v("NIRJON", "" + result.x() + ", " + result.y() + ", " + result.z()); } });

DIY and Remarks 1 Bean per group Install BeanLoader App and RENAME bean Test today’s Android code with your Bean Handle the Bean with care Do not keep the battery ON Do not lose the Bean, battery, plastic, or package.