Workshop: Arduino for makers - Strumenti SW per la prototipazione elettronica: VIPER, The Python IoT...

35
Workshop: Arduino for Makers DAY #1 – SESSION #4 STRUMENTI SW PER LA PROTOTIPAZIONE ELETTRONICA: VIPER, THE PYTHON IOTDESIGN SUITE FOR EMBEDDED SYSTEMS

Transcript of Workshop: Arduino for makers - Strumenti SW per la prototipazione elettronica: VIPER, The Python IoT...

Page 1: Workshop: Arduino for makers - Strumenti SW per la prototipazione elettronica: VIPER, The Python IoT Suite for Embedded Systems

Workshop: Arduino for MakersDAY #1 – SESSION #4

STRUMENTI SW PER LA PROTOTIPAZIONE ELETTRONICA:

VIPER, THE PYTHON IOT DESIGN

SUITE FOR EMBEDDED SYSTEMS

Page 2: Workshop: Arduino for makers - Strumenti SW per la prototipazione elettronica: VIPER, The Python IoT Suite for Embedded Systems

Workshop: Arduino for Makers

Organizzatore: Gestionali in Opera (GiO) Pisa

Supervisor: Dott. Luigi Francesco Cerfeda

Sommario:

• Day #1: introduzione alla prototipazione elettronica. Strumenti HW, SW e risorse online utili per la prototipazione elettronica.

• Day #2: programmazione elettronica con la suite VIPER: casi studio ed esercitazione pratica.

21 November 2015 - Day #1 Session #4 Workshop:“Arduino for Makers” - Luigi Francesco Cerfeda 2

Powered by

Page 3: Workshop: Arduino for makers - Strumenti SW per la prototipazione elettronica: VIPER, The Python IoT Suite for Embedded Systems
Page 4: Workshop: Arduino for makers - Strumenti SW per la prototipazione elettronica: VIPER, The Python IoT Suite for Embedded Systems

DAY #1

1. INTRODUZIONE ALLA PROTOTIPAZIONE ELETTRONICA

Nascita ed evoluzione di Arduino e del Movimento Maker

2. STRUMENTI HARDWARE PER LA PROTOTIPAZIONE ELETTRONICA

Presentazione delle principali board di prototipazione (Arduino, Raspberry Pi, UDOO), sensoristica, attuatori e “shield”.

3. CENNI DI PROGETTAZIONE ELETTRONICA ED UTILIZZO DI SOFTWARE ECADRealizzazione e simulazione di un semplice circuito tramite LTSpice. Utilizzo di Fritzing e KiCAD.

4. STRUMENTI SOFTWARE PER LA PROTOTIPAZIONE ELETTRONICA

Presentazione di VIPER, download, installazione dell’IDE e “viperizzazione” di una board.

21 November 2015 - Day #1 Session #4 Workshop:“Arduino for Makers” - Luigi Francesco Cerfeda 4

Page 5: Workshop: Arduino for makers - Strumenti SW per la prototipazione elettronica: VIPER, The Python IoT Suite for Embedded Systems

The Python IoT Development Suite

viper.thingsoninternet.biz

[email protected]

Page 6: Workshop: Arduino for makers - Strumenti SW per la prototipazione elettronica: VIPER, The Python IoT Suite for Embedded Systems

THINGS ON INTERNET

Page 7: Workshop: Arduino for makers - Strumenti SW per la prototipazione elettronica: VIPER, The Python IoT Suite for Embedded Systems

OPPORTUNITY

“6 billions 32bit microcontrollers sold in 2013, expected 14 billions in 2020”** *EMC Digital Universe with Research & Analysis by IDC

**grandviewresearch.com

“Data from Embedded Systems Will Account for 10% of the Digital Universe by 2020”*

INTERNET OF THINGS: WHAT’S UP BEHIND THESE “THINGS”?

Page 8: Workshop: Arduino for makers - Strumenti SW per la prototipazione elettronica: VIPER, The Python IoT Suite for Embedded Systems

“I need a flexible and low-cost solution for developing and implementing

customized monitoring and control systems to my business customers”

Mike, IoT System Integrator

“We need to decrease time and resources for the development on new boards,

improving Real-time capability and keeping high hardware and software reliability”

Jeff, Embedded Producer

“I would like to bring interactivity in my products but developing and managing C

code”

Roberto, Interaction Designer

A SOFTWARE CHALLENGE

Page 9: Workshop: Arduino for makers - Strumenti SW per la prototipazione elettronica: VIPER, The Python IoT Suite for Embedded Systems

Product Designers and

Manufacturers

System integrators of IoT

Solutions

Embedded Producers

� Usage Analytics

� Speed up the adoption

NEEDS

A SOFTWARE CHALLENGE

� Time to Market reduction

� Focus on high-value tasks

Page 10: Workshop: Arduino for makers - Strumenti SW per la prototipazione elettronica: VIPER, The Python IoT Suite for Embedded Systems

SOLUTION: VIPER

Page 11: Workshop: Arduino for makers - Strumenti SW per la prototipazione elettronica: VIPER, The Python IoT Suite for Embedded Systems

SOLUTION: VIPER

https://www.youtube.com/watch?v=Pbs41E2YaaU

Page 12: Workshop: Arduino for makers - Strumenti SW per la prototipazione elettronica: VIPER, The Python IoT Suite for Embedded Systems

SOLUTION: VIPER

Page 13: Workshop: Arduino for makers - Strumenti SW per la prototipazione elettronica: VIPER, The Python IoT Suite for Embedded Systems

SOLUTION: VIPER

All ARM Powered BOARDSAll Sensors and Kits

Page 14: Workshop: Arduino for makers - Strumenti SW per la prototipazione elettronica: VIPER, The Python IoT Suite for Embedded Systems

VIPER: Advantages

Page 15: Workshop: Arduino for makers - Strumenti SW per la prototipazione elettronica: VIPER, The Python IoT Suite for Embedded Systems

How VIPER works

Program in Python, compile the code

and connect to the cloud

Select and Plug one of the available

prototyping MCU, sensors and

actuators

Develop the HTML5 template for the

VIPER APP to control and monitor

the solution.

1

2

3

SINGLE DEVELOPERS

/ STARTUPS

DEVELOPMENT AND PROTOTYPING PHASE

IF NEEDED, C CODE CAN BE MIXED WITH PYTHON

NO ANDROID OR iOS DEVELOPMENT NEEDED

Page 16: Workshop: Arduino for makers - Strumenti SW per la prototipazione elettronica: VIPER, The Python IoT Suite for Embedded Systems

How VIPER works

4

5

6

Flash the Industrial PCB with

monolithic firmware (VM+bitecode)

based on the code developed at step 2

Porting of VIPER on the industrial PCB

(Chip and/or Peripherals)

Customize the VIPER APP for your

solution or develop your own APP

using the VIPER Android or iOS SDKs

OEM / EMBEDDED

MANUFACTURERS

OEM INDUSTRIALIZATION PHASE

NO BOOTLOADER => LITTLE FLASH MEMORY NEEDED

SINGLE DEVELOPERS

/ STARTUPS

Page 17: Workshop: Arduino for makers - Strumenti SW per la prototipazione elettronica: VIPER, The Python IoT Suite for Embedded Systems

VIPER Vision1

99

6

20

06

20

16

“VIPER will become for the embedded software what

Android has been for the mobile phones world”

Page 18: Workshop: Arduino for makers - Strumenti SW per la prototipazione elettronica: VIPER, The Python IoT Suite for Embedded Systems

VIPER: Unique Technical Differentiations

Viper VM:Viper VM:Viper VM:Viper VM:• The first virtual machine specifically tailored for embedded and IoT• Unique multi-board design with modular pin/ports naming and automatic detection of pin associated hardware

features • Unique multi-board code compatibility checker• The first hybrid C/Python programming suite for embedded • The first Python programming suite that runs on top of an RTOS

Viper Viper Viper Viper UplinkerUplinkerUplinkerUplinker (Patented) ::::• The first hybrid C/Python-bytecode linker with integrated multi-board uploader

Viper App:Viper App:Viper App:Viper App:• The first generic mobile app for embedded devices that renders HTML 5 (Jquery Mobile) templates located on the

MCUs• WiFi, Bluetooth and any other communication channel compatible• Portable also on desktop environment (integration in the Viper IDE) for easy and quick UI debug

Viper IDE:Viper IDE:Viper IDE:Viper IDE:• The first cross-platform and multi-board IDE specifically tailored for embedded than runs on offline browsers• Integrated multi board manager and uploader with easy to use and unified board flashing (viperization) and

compiled script upload interface • The first exception based in-line debugger for embedded (integrated in the IDE serial console)• Integrated bytecode inspector for low-level debug and code optimization• Offline documentation for professional “on the field” develop and deploy

Page 19: Workshop: Arduino for makers - Strumenti SW per la prototipazione elettronica: VIPER, The Python IoT Suite for Embedded Systems

The VIPER IDE: A Modern User Experience

Support for multiple

opened projects

Optimized coding

environment with syntax

highlight, auto-completion

and multi tab support

Integrated coding tools

User log-in for projects cloud

synching

Board management toolbar

Code verify, upload, clean and

debug integrated in the IDE

Integrated project local

repository with remote git

sync and smart search

Ready-to-use examples for

easy starting-up Integrated serial console with

multi board support

Integrated output console

with compiler log and IDE

feedback and notifications

Confidential - Copyright 2015 – Kinzica Ventures, LLC

DBA VIPER Embedded Technologies. New York City, USA

Page 20: Workshop: Arduino for makers - Strumenti SW per la prototipazione elettronica: VIPER, The Python IoT Suite for Embedded Systems

The VIPER IDEMAIN FEATURES

• Code Editor:

• syntax highlighting, multi-tab support, code auto-completion and error

highlighting feature;

• off-Line documentation;

• board feature and pin mapping info window;

• Tutorial;

• Examples library with integrated search and tagging feature;

• Themes support;

• Board Tools:

• integrated multi board C/Python hybrid compiler;

• board discovery and management toolbar;

• integrated debugging console and serial port monitor with search and auto

connect features;

• Project Manager:

• project database with tagging and search features;

• local git storage with cloud syncing feature;

• Direct project publishing/forking on GitHub;

• Mobile App Support:

• HTML 5 editor for Viper App templates design;

• Auto-update engine;

Page 21: Workshop: Arduino for makers - Strumenti SW per la prototipazione elettronica: VIPER, The Python IoT Suite for Embedded Systems

The VIPER Virtual Machine

The core of Viper is the Viper Virtual Machine.

• Viper VM has been developed with the aim to bring Python on the embedded world with support for multi-thread and cross

board compatibility.

• With Viper VM it is possible to develop Python scripts that are board independent allowing a high reusability of the code and

also device simulation on PC.

• Viper supports all the most used high-level features of Python like modules, classes, multithreading, callbacks, timers and

exceptions, plus some custom hardware-related features like interrupts, PWM, digital I/O, etc.

• Viper VM runs on top of CHIBIOS RT/OS. However, thanks to the Viper Hardware Abstraction Layer, porting to other RT/OS

is possible

Page 22: Workshop: Arduino for makers - Strumenti SW per la prototipazione elettronica: VIPER, The Python IoT Suite for Embedded Systems

The VIPER Smart Compiler and Uplinker (patent pending)

VIPER COMPILER

The Viper IDE integrates a compiler, written in Python, that reads the source code and produces an optimized

bytecode for the Viper Virtual Machine.

• Everything that can be statically computed at compile time and then saved on the flash to minimize RAM usage

(i.e. code objects are entirely stored on flash, no RAM is used).

• the Viper compiler analyses the code in terms of ”static reachability”. This means for example that if from an

imported modules only a couple of functions are used, the compiler extracts them and generates only the

bytecode necessary to implement those functions thus neglecting and not including the rest of unused code.

VIPER UPLINKER (Patent pending)

A very smart dynamic linker that prepares the package to be uploaded on the Viper VM.

• The linker includes both Python compiled bytecode and C compiled binaries in a single package.

• It is completely integrated in the Viper IDE allowing users to execute the entire process in one click.

Page 23: Workshop: Arduino for makers - Strumenti SW per la prototipazione elettronica: VIPER, The Python IoT Suite for Embedded Systems

VIPER IS AGNOSTIC

VIPER is language agnostic

Javascript, LUA etc.. will be considered as other high level programming languages to be interfaced

with VIPER.

VIPER is OS agnostic

More RT/OS will be ported in future.

VIPER is hardware agnostic

In order to fully exploit its potential, VIPER does not and will not require a specific board. The porting

of boards, sensors, shields is an ongoing activity.

Page 24: Workshop: Arduino for makers - Strumenti SW per la prototipazione elettronica: VIPER, The Python IoT Suite for Embedded Systems

A real case study

Smart Interactive Display installed in Top-Level Jewelries in Paris

Powered by VIPER

• 11 synchronized rotating platforms for jewels display

• Remotely controllable with a mobile app

• Working 24/7

• Installed in July 2015

DEVELOPMENT PROCESS

An independent designer (The startup UANLAB)

has been able to:

1. Develop the electronic prototype based on STM32

Nucleo;

2. Code the product behaviour with the VIPER suite;

3. Develop the functioning prototype in 1 month

4. Release the final product with industrial electronics in

2 months. Installation in customer’s site (Paris)

5. Plan the beginning of series production in 2016

Confidential - Copyright 2015 – Kinzica Ventures, LLC

DBA VIPER Embedded Technologies. New York City, USA

Page 25: Workshop: Arduino for makers - Strumenti SW per la prototipazione elettronica: VIPER, The Python IoT Suite for Embedded Systems

12 synchronized Rotating platforms

for luxury goods expositionMobile controlled rover VIPER Smart lamp

featured in Hackaday.io

Designers’ Thoughts

VIPERVIPERVIPERVIPER----POWERED PRODUCTSPOWERED PRODUCTSPOWERED PRODUCTSPOWERED PRODUCTS

Page 26: Workshop: Arduino for makers - Strumenti SW per la prototipazione elettronica: VIPER, The Python IoT Suite for Embedded Systems

THE VIPER LAMPmain.py template.html

Page 27: Workshop: Arduino for makers - Strumenti SW per la prototipazione elettronica: VIPER, The Python IoT Suite for Embedded Systems

THE VIPER LAMP

https://www.youtube.com/watch?v=KMjvH_d8PeQ

Page 28: Workshop: Arduino for makers - Strumenti SW per la prototipazione elettronica: VIPER, The Python IoT Suite for Embedded Systems

THE IOT NOTES PRINTERmain.py template.html

Page 29: Workshop: Arduino for makers - Strumenti SW per la prototipazione elettronica: VIPER, The Python IoT Suite for Embedded Systems

THE IOT NOTES PRINTER

https://www.youtube.com/watch?v=shGbB8a0UgI

Page 30: Workshop: Arduino for makers - Strumenti SW per la prototipazione elettronica: VIPER, The Python IoT Suite for Embedded Systems

VIPER IN NUMBERS

• 400 early-adopters (mainly from Kickstarter campaign) from 25 countries

• 3 large global chip manufacturers supported VIPER

• 3000 Downloads (9th July)

• 2500 Users

• 1 VIPER-powered product commercialized

• 100+ news articles released

Page 31: Workshop: Arduino for makers - Strumenti SW per la prototipazione elettronica: VIPER, The Python IoT Suite for Embedded Systems

ROADMAP

Mar’15 Jul ‘15 Nov‘15 Mar ‘16Jun ‘15

100 Pro10000 Users400 Early Adopters 3000 Users 4000 Users

VIPER Pro (Commercial development Licence) 1000$

VIPER Pro (OEM Distribution Licence) Negotiable

VIPER Additional Modules 150-500$

21 November 2015 - Day #1 Session #4 Workshop:“Arduino for Makers” - Luigi Francesco Cerfeda 31

Page 32: Workshop: Arduino for makers - Strumenti SW per la prototipazione elettronica: VIPER, The Python IoT Suite for Embedded Systems

TEAM

Gabriele Montelisciani, PhD. Business operations, sales and marketingPhD in economics and management engineering. He is an expert on methods and tools for early stage innovation, business

modeling, management of organizations and processes. Project Manager of EU projects and freelance consultant.

Location: Pisa, Italy

Daniele Mazzei, PhD. Electronics and System Engineerbiomedical engineer with PhD in robotics. Director of the FACE Team, a research team working on social robotic and affective IoT.

Expertise in system integration for robotics and IoT.

Location: Pisa, Italy

Giacomo Baldi MS in CS. Software Architect and Developersoftware architect expert in embedded programming and real-time operating system development and customization. Co-founder

and developer of MeditaEngineering, the Italian market leader on medical app..

Location: Pisa, Italy

Gualtiero Fantoni, PhD. Product Designer and Strategist

Professor in mechanical engineering doing research on advanced robotic and mechanical design. Gualtiero’s research focus on

empowering product design processes with creativity heuristics, functional analysis and co-creation tools.

Location: Pisa, Italy

Page 33: Workshop: Arduino for makers - Strumenti SW per la prototipazione elettronica: VIPER, The Python IoT Suite for Embedded Systems

TEAM

Page 34: Workshop: Arduino for makers - Strumenti SW per la prototipazione elettronica: VIPER, The Python IoT Suite for Embedded Systems

VIPER: getting started

Usare VIPER è molto semplice: 1. si scarica l’installer per Windows, Linux o iOS dalla pagina di download di

VIPER (www.viperize.it/download); 2. si installa e lancia l’applicazione tramite l’icona apparsa sul desktop; 3. si crea un utente VIPER attraverso il pulsante dedicato in alto a destra.

Controlla la tua mail e verifica il tuo nuovo account cliccando sull’apposito link (registrarsi permette di partecipare alla VIPER community, salvare i propri progetti on-line nel VIPER Cloud e ricevere automaticamente gli aggiornamenti);

4. si connette la board ed eventualmente la si rinomina a piacimento in modo da poterla riconoscere facilmente in futuro;

5. per rendere la board utilizzabile bisogna “viperizzarla”, cioè installare su di essa la VIPER VM (Virtual Machine), attraverso l’apposito pulsante nella topbar del VIPER IDE;

6. si crea un nuovo progetto o si clona un esempio, si compila lo script e lo si carica nella board.

Page 35: Workshop: Arduino for makers - Strumenti SW per la prototipazione elettronica: VIPER, The Python IoT Suite for Embedded Systems

www.viperize.it

Community: https://community.viperize.it

Documentation: http://doc.viperize.it

Sources: https://github.com/viper-dev/Viper

[email protected]