25
Connected sensors & Apps Workshop By Fjodor van Slooten

Connected sensors and Apps - vanslooten.com · •NativeScript (delivers Native App) •PhoneGap (Adobe) •React Native (delivers Native App) •Xamarin (Microsoft, C#) (delivers

  • Upload
    others

  • View
    9

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Connected sensors and Apps - vanslooten.com · •NativeScript (delivers Native App) •PhoneGap (Adobe) •React Native (delivers Native App) •Xamarin (Microsoft, C#) (delivers

Connected sensors & Apps WorkshopBy Fjodor van Slooten

Page 2: Connected sensors and Apps - vanslooten.com · •NativeScript (delivers Native App) •PhoneGap (Adobe) •React Native (delivers Native App) •Xamarin (Microsoft, C#) (delivers

• Recap topics previous workshop

• Physical prototypes• Building wireless connected sensors

• App Development• General intro

• Intro to App Inventor: Creating a connected App

11/26/2019 HTHT Science2Society - From Prototype to Society

CONTENT

2

In this presentation: 'hands-on' tutorials you can work on today

Connected sensors & Apps Workshop

This presentation & tutorials available at: vanslooten.com/hthtContact: [email protected]

Page 3: Connected sensors and Apps - vanslooten.com · •NativeScript (delivers Native App) •PhoneGap (Adobe) •React Native (delivers Native App) •Xamarin (Microsoft, C#) (delivers

• Physical prototypes:• Cardboard, wood, paper

• Electronics: Arduino

• Lego Mindstorms

• LittleBits

• ‘Virtual’ prototypes• User Experience (UX)

design

• Creating App Mockups

11/26/2019 HTHT Science2Society - From Prototype to Society

PREVIOUS

WORKSHOP

3

learn.adafruit.com/adafruit-arduino-lesson-2-leds/breadboard-layout

Full content of previous workshop: vanslooten.com/htht

In ‘From Idea to Prototype’

Page 4: Connected sensors and Apps - vanslooten.com · •NativeScript (delivers Native App) •PhoneGap (Adobe) •React Native (delivers Native App) •Xamarin (Microsoft, C#) (delivers

Arduino lessons

26/11/2019 HTHT Science2Society - From Prototype to Society 4

learn.adafruit.com/series/learn-arduino

Learn more on Arduino programming, with lots of examples at Application Development (APPDEV) course

Eg. in APPDEV Lesson LegoPracticalSession3,learn more about: use of displays and how to use a temperature sensor

At Fjodor's Blog: how to build a rfid-reader & other sensors

Page 5: Connected sensors and Apps - vanslooten.com · •NativeScript (delivers Native App) •PhoneGap (Adobe) •React Native (delivers Native App) •Xamarin (Microsoft, C#) (delivers

EVShield: control Lego Mindstorms with Arduino

26/11/2019 HTHT Science2Society - From Prototype to Society 5

attachments for Lego axles

3 RGB LED’s built-in

4 buttons

4 motor connectors

4 sensor connectors

power connector

dual-use servo header

Arduino headers accessible

• Connect (almost) all Lego motor’s and sensors

Page 6: Connected sensors and Apps - vanslooten.com · •NativeScript (delivers Native App) •PhoneGap (Adobe) •React Native (delivers Native App) •Xamarin (Microsoft, C#) (delivers

LittleBits Examples

26/11/2019 HTHT Science2Society - From Prototype to Society 6

LittleBits resources & interaction examples

Getting started with Arduino using LittleBits

Adding components like Ultrasonic sensor to LittleBits

Page 7: Connected sensors and Apps - vanslooten.com · •NativeScript (delivers Native App) •PhoneGap (Adobe) •React Native (delivers Native App) •Xamarin (Microsoft, C#) (delivers

App mockups

26/11/2019 HTHT Science2Society - From Prototype to Society 7

Tools

• Sketch (Mac only)

• InVision (Online, free with limitations)

• Figma (Online, free with limitations)

• Axure (license available from teacher)

• Adobe XD (free)

Mock-up = a prototype (of a user interface)for usability tests

Start creating a prototype (or mock-up) as soon as possible... and involve the user from day 1!

Learn more about Userinterface Design

Axure tutorial

Full content of previous workshop: vanslooten.com/htht

Page 8: Connected sensors and Apps - vanslooten.com · •NativeScript (delivers Native App) •PhoneGap (Adobe) •React Native (delivers Native App) •Xamarin (Microsoft, C#) (delivers

Figma: quickly create app mockups

26/11/2019 HTHT Science2Society - From Idea to Prototype 8

Prototype

Overview of layers,

components etc

Figma tutorial: create a first app mockup

Design

Full content of previous workshop: vanslooten.com/htht

Page 9: Connected sensors and Apps - vanslooten.com · •NativeScript (delivers Native App) •PhoneGap (Adobe) •React Native (delivers Native App) •Xamarin (Microsoft, C#) (delivers

• Building connected sensors using an ESP module

• What is an ESP module?• A small microcontroller (~ computer)

• Can connect & control electronic circuits

• Has Wifi (& Bluetooth)

• Combination of electronics & wireless communication

26/11/2019 HTHT Science2Society - From Prototype to Society 9

PHYSICAL PROTOTYPES

Page 10: Connected sensors and Apps - vanslooten.com · •NativeScript (delivers Native App) •PhoneGap (Adobe) •React Native (delivers Native App) •Xamarin (Microsoft, C#) (delivers

ESP32 module:Online temperature sensor

26/11/2019 HTHT Science2Society - From Prototype to Society 10

• Build this: “Tutorial: Create a connected sensor”

• Can:• Read temperature & humidity

• Connect to WiFi

• Store values online

• Version with distance sensor & display:

Can connect to cloud services like Blynk, ThingSpeak

Page 11: Connected sensors and Apps - vanslooten.com · •NativeScript (delivers Native App) •PhoneGap (Adobe) •React Native (delivers Native App) •Xamarin (Microsoft, C#) (delivers

26/11/2019 HTHT Science2Society - From Prototype to Society 11

MOBILE APP DEVELOPMENT

• Types of Apps• Web (Webview)

• Hybrid

• Native

• Development environment• Online

• On device (phone or tablet)

• On desktop/laptop

Web Apps are coded in HTML/CSS/JavaScript.

They are served through the internet and run through a browser.+/- Access Native APIs- Distribute through App Stores+ Run on multiple platforms

Hybrid Apps are coded in HTML/CSS/JavaScript.

They are run through an invisible browser (webview) that is packaged into a native application.+ Access Native APIs+ Distribute through App Stores+ Run on multiple platforms

Native Apps are coded in the native language of

the device (e.g. Objective-C for IOS, Java for Android).They are run directly on the device.+ Access Native APIs+ Distribute through App Stores- Run on multiple platforms

Page 12: Connected sensors and Apps - vanslooten.com · •NativeScript (delivers Native App) •PhoneGap (Adobe) •React Native (delivers Native App) •Xamarin (Microsoft, C#) (delivers

App generators

26/11/2019 HTHT Science2Society - From Prototype to Society 12

• App Inventor (online service)

• Sketchware (create Apps on your phone)

• Tasker+Tasker App Factory (Paid App)

Skill level: beginner

Sketchware and App Inventor use Block

Language programming

Graphical User Interface Builder

Page 13: Connected sensors and Apps - vanslooten.com · •NativeScript (delivers Native App) •PhoneGap (Adobe) •React Native (delivers Native App) •Xamarin (Microsoft, C#) (delivers

Hybrid Apps

26/11/2019 HTHT Science2Society - From Prototype to Society 13

• Lots of competition

• HTML/CSS/JavaScript based

• Often immature (version hell, poor documentation, different sub-platforms, mixed-up online info)

• Requires: intermediate programming knowledge, and web tech (HTML/CSS/JavaScript)

• Tools: Code editor/IDE e.g.: Atom, Visual Studio Code, Brackets

• Learn basics: course Web Tech, App Dev, w3schools

Skill level: intermediate

Page 14: Connected sensors and Apps - vanslooten.com · •NativeScript (delivers Native App) •PhoneGap (Adobe) •React Native (delivers Native App) •Xamarin (Microsoft, C#) (delivers

Hybrid Apps Frameworks

26/11/2019 HTHT Science2Society - From Prototype to Society 14

• Ionic

• NativeScript (delivers Native App)

• PhoneGap (Adobe)

• React Native (delivers Native App)

• Xamarin (Microsoft, C#) (delivers Native App)

• jQuery Mobile

Ionic NativeScript

Quick build & test Build/test takes longer (wait each time you change)

Preview in browser or on Phone

Preview on Phone or Emulator

App: renders in Webview

Converts to native (small performance gain)

Create UI based on HTML/CSS

Create UI with own elements

Based on Web Technology

Page 15: Connected sensors and Apps - vanslooten.com · •NativeScript (delivers Native App) •PhoneGap (Adobe) •React Native (delivers Native App) •Xamarin (Microsoft, C#) (delivers

Ionic: getting started

26/11/2019 HTHT Science2Society - From Prototype to Society 15

ionicframework.com/getting-started

npm = package manager for the JavaScript runtime

environment Node.js, install that first! (TLS version)

Change to Documents folder first, eg:

cd %USERPROFILE%\Dropbox\App

Name of your App Template to use

Page 16: Connected sensors and Apps - vanslooten.com · •NativeScript (delivers Native App) •PhoneGap (Adobe) •React Native (delivers Native App) •Xamarin (Microsoft, C#) (delivers

Ionic: getting started

26/11/2019 HTHT Science2Society - From Prototype to Society 16

ionicframework.com/getting-started

Write code in text editor, e.g. Atomor Visual Studio

Code

Test App in browser

Page 17: Connected sensors and Apps - vanslooten.com · •NativeScript (delivers Native App) •PhoneGap (Adobe) •React Native (delivers Native App) •Xamarin (Microsoft, C#) (delivers

Native apps

26/11/2019 HTHT Science2Society - From Prototype to Society 17

• Platform: IOS (Apple), Android (Google)

• Android:

• Andoid Studio (Java)

• IOS

• Xcode (Objective-C)

• Swift

• Requires: programming knowledge, and preferably web tech

• Learn IOS: Everyone can code, App development with Swift

Skill level: pro

developer.android.comdeveloper.apple.com

Page 18: Connected sensors and Apps - vanslooten.com · •NativeScript (delivers Native App) •PhoneGap (Adobe) •React Native (delivers Native App) •Xamarin (Microsoft, C#) (delivers

Android Studio (Java)

26/11/2019 HTHT Science2Society - From Prototype to Society 18

Skill level: pro

• Tutorials:• Android Developer

fundamentals

• developer.android.com

• more

• Requires: Java programming experience

• Learn basics: course App Dev, Udemy, Codecademy, Learnjavaonline, …

Page 19: Connected sensors and Apps - vanslooten.com · •NativeScript (delivers Native App) •PhoneGap (Adobe) •React Native (delivers Native App) •Xamarin (Microsoft, C#) (delivers

Deploy?

26/11/2019 HTHT Science2Society - From Prototype to Society 19

• Deploy: publish in App store

• Requires:• IOS: register ($99) with developer.apple.com/programs

(more info)

• Android: register (for free) with play.google.com/apps/publish

• Test without publishing• Android: distribute .apk to testers

• IOS: have testers get a build via TestFlight: register participants on your team

Page 20: Connected sensors and Apps - vanslooten.com · •NativeScript (delivers Native App) •PhoneGap (Adobe) •React Native (delivers Native App) •Xamarin (Microsoft, C#) (delivers

Game engines

26/11/2019 HTHT Science2Society - From Prototype to Society 20

• Combine with Native App:

• Unity: Mobile solutions

• Unreal: Mobile Development

• Combine with Hybrid framework:

• Phaser.io:• Deploy with Cocoon.io

• Combine with: Ionic, PhoneGap

Learn more about game development:emanueleferonato.comhtml5gamedevs.comgamedev.net

Page 21: Connected sensors and Apps - vanslooten.com · •NativeScript (delivers Native App) •PhoneGap (Adobe) •React Native (delivers Native App) •Xamarin (Microsoft, C#) (delivers

26/11/2019 HTHT Science2Society - From Prototype to Society 21

ai2.appinventor.mit.edu

Learn:App Inventor tutorialApp Inventor 2: Create your own Android Apps

Program

Intro to App Inventor

Page 22: Connected sensors and Apps - vanslooten.com · •NativeScript (delivers Native App) •PhoneGap (Adobe) •React Native (delivers Native App) •Xamarin (Microsoft, C#) (delivers

Programming using Blocks

26/11/2019 HTHT Science2Society - From Prototype to Society 22

Learn:App Inventor tutorialApp Inventor 2: Create your own Android Apps

ai2.appinventor.mit.edu

Designer

Page 23: Connected sensors and Apps - vanslooten.com · •NativeScript (delivers Native App) •PhoneGap (Adobe) •React Native (delivers Native App) •Xamarin (Microsoft, C#) (delivers

26/11/2019 HTHT Science2Society - From Prototype to Society 23

ai2.appinventor.mit.eduTutorial: Creating a connected App

Page 24: Connected sensors and Apps - vanslooten.com · •NativeScript (delivers Native App) •PhoneGap (Adobe) •React Native (delivers Native App) •Xamarin (Microsoft, C#) (delivers

• Build a physical model/practice:• Do a tutorial from previous workshop, or

Create a connected sensor

• Create an App mockup• Do Axure or Figma tutorial

• Build an App• Creating a connected App using App Inventor

• Get help building an App with Android Studio

26/11/2019 HTHT Science2Society - From Prototype to Society 24

LET'S DO…

This presentation & tutorials available at: vanslooten.com/hthtUse examples and references to tutorials in this presentation

Page 25: Connected sensors and Apps - vanslooten.com · •NativeScript (delivers Native App) •PhoneGap (Adobe) •React Native (delivers Native App) •Xamarin (Microsoft, C#) (delivers

QUESTIONS?

26/11/2019 HTHT Science2Society - From Prototype to Society 25

vanslooten.com/htht

[email protected]