SlideShare ist ein Scribd-Unternehmen logo
1 von 33
ASP.NET 5 + Raspberry PI 2
Jürgen Gutsch
• Web Developer, Trainer, Consultant
• User group Leader
– .NET-Stammtisch Konstanz-Kreuzlingen
– .NET User Group Nordwest-Schweiz
• Blogger
– http://www.aspnetzone.de/blogs/juergengutsch/
• Author
– Dotnetpro
Agenda
• Setup the PI
• Working with the PI
• About the GPIOs
• Working with the GPIOs
• IoT Scenarios
• Demo
Installing the PI
• Downloading the latest Raspian image from raspberry.org
• Use Win32 Disk Imager to prepare a SD Card
• Install Raspian on the PI
Preparing the PI
• Add and configure a Network
• Connect to the PI via SSH e. g. via Putty
Update the System
$ sudo apt-get update
$ sudo apt-get upgrade
Install the latest Mono
$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys
3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
$ echo "deb http://download.mono-project.com/repo/debian wheezy
main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
$ sudo apt-get update
$ sudo apt-get install mono-complete
Test the Mono installation
$ mono -V
Getting ASP.NET 5 samples
$ mkdir ~/sources/aspnet5 & cd ~/sources/aspnet5
$ git clone git://github.com/aspnet/home.git
$ sh ~/sources/aspnet5/dnvminstall.sh
$ source ~/.dnx/dnvm/dnvm.sh
$ dnvm upgrade
Import needed Certificates
$ sudo certmgr -ssl -m https://go.microsoft.com
$ sudo certmgr -ssl -m https://nugetgallery.blob.core.windows.net
$ sudo certmgr -ssl -m https://nuget.org
$ sudo certmgr -ssl -m https://www.myget.org
$ mozroots --import --sync
Build and install Libuv for Kestrel
$ sudo apt-get install gyp
$ wget http://dist.libuv.org/dist/v1.4.2/libuv-v1.4.2.tar.gz
$ tar -xvf libuv-v1.4.2.tar.gz
$ cd libuv-v1.4.2/
$ ./gyp_uv.py -f make -Duv_library=shared_library
$ make -C out
$ sudo cp out/Debug/lib.target/libuv.so
$ usr/lib/libuv.so. 1.4.2
$ sudo ln -s libuv.so. 1.4.2 /usr/lib/libuv.so.1
Install the latest DNVM
$ curl -sSL
https://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.s
h | DNX_BRANCH=dev sh && source ~/.dnx/dnvm/dnvm.sh
$ dnvm upgrade
Test the DNVM
$ dnvm
Install node.js
$ wget http://node-arm.herokuapp.com/node_latest_armhf.deb
$ sudo dpkg -i node_latest_armhf.deb
Install grunt & bower
$ sudo npm install -g grunt
$ sudo npm install -g bower
Possible IDEs
• Working on the PI
– vi Startup.cs
– Nano Startup.cs
• Working on Windows
– Visual Studio
– Visual Studio Code
Using Git
• Transfer files with Git
• Git is easy to use
• Git is integrated in Raspian
• Git is integrated in Visual Studio 2015
Setup a Git workspace on Windows
$ git init
$ git add –all
$ git commit -m „initial commit“
Push initially:
$ git add origin https://github.org/juergengutsch/...
$ git push -u origin master
Push the latest changes:
$ git push
Setup a Git workspace on the PI
Setup a the IDE on the PI
$ mkdir ~/projects/dnc15 & cd ~/projects/dnc15
Initial clone
$ git clone https://github.org/juergengutsch/...
Get the latest changes
$ git pull
Setup the first ASP.NET 5 App
• Add Dependencies:
– "Microsoft.AspNet.Hosting": "1.0.0-beta4"
– "Kestrel": "1.0.0.0-beta4”
• Add Command:
– "kestrel": "Microsoft.AspNet.Hosting --server Kestrel --server.urls
http://localhost:5004"
Start the sample web
Prepare the Start
$ cd ~/projects/dnc15/Sensors/src/Sensors
$ dnvm install latest
$ dnu restore
Starting the web server
$ dnx . kestrel
About the GPIOs
General purpose input/output
• GPIO numbering vs. physical/pin numbering
• 2 x output 5V
• 2 x output 3.3V
• 8 x ground
• 26 x GPIO
• (2x ID EEPROM)
About the GPIOs
Working with the GPIOs
• Calling the Raspian native API to connect the GPIOs
• Using existing C# libraries to access the pins:
– Raspberry.System
• https://github.com/raspberry-sharp/raspberry-sharp
– Raspberry.IO.GeneralPurpose
• https://github.com/raspberry-sharp/raspberry-sharp-io
– RPI.GPIO
• https://github.com/fatihboy/RPI.GPIO
Good to know: Be carefully
• Read carefully the GPIO specification
– Wrong connected pins can kill the sensor or the PI
• Read carefully the sensor specification
• Be carefully with external power
Raspberry.System
Getting common information about the PI:
Raspberry.IO.GeneralPurpose
• Includes drivers to access the GPIO Pins
• Includes Pin connections
• Includes conversions between pin numberings
– ConnectorPin: Pin using physical pin numbers
– ProcessorPin: Pin using GPIO pin numbering
• Includes methods to work with the pins
Simple blinking LED
Good to know: Cheat with node.js
• node.js is pretty cool on the PI 
• It‘s easy to write
• It runs fast
• many GPIO examples written in Javascript
• node.js is a pretty awesome tool to tryout things, you want to
implement with C#
Connecting the distance sensor
• Needs to trigger the measurement
• Needs to measure the time until the echo pings back
• Needs to divide the resulting time by 2
TODO: Connecting the distance sensor
/* demo */
Mobile RC buggy
• Running a mobile web app on the PI
• The page fetches accelerator data from the mobile device
• The page controls one or more servos in the pi
• The page uses the accelerator data to control the servos
Plant watering system
• Get the weather forecast via network from weather API
• Get the current temperature via sensors
• Get the current pressure via sensors
• Control servos / switches to start watering plants
• Send text message on error / case of no water
• Provide mobile web app to show current information
Segway like vehicle
• Use accelerator sensor
• Control a servo on a two wheel vehicle
• Use the accelerator data to steer the servo
to keep the vehicle vertical

Weitere ähnliche Inhalte

Was ist angesagt?

From GitHub Source to GitHub Release: Free CICD Pipelines For JavaFX Apps
From GitHub Source to GitHub Release: Free CICD Pipelines For JavaFX AppsFrom GitHub Source to GitHub Release: Free CICD Pipelines For JavaFX Apps
From GitHub Source to GitHub Release: Free CICD Pipelines For JavaFX AppsBruno Borges
 
GitLab Remote Meetup: Enhance Your Kubernetes CI/CD Pipelines with GitLab & ...
GitLab Remote Meetup:  Enhance Your Kubernetes CI/CD Pipelines with GitLab & ...GitLab Remote Meetup:  Enhance Your Kubernetes CI/CD Pipelines with GitLab & ...
GitLab Remote Meetup: Enhance Your Kubernetes CI/CD Pipelines with GitLab & ...Nico Meisenzahl
 
Engineering Tools at Netflix: Enabling Continuous Delivery
Engineering Tools at Netflix: Enabling Continuous DeliveryEngineering Tools at Netflix: Enabling Continuous Delivery
Engineering Tools at Netflix: Enabling Continuous DeliveryMike McGarr
 
Istio is not just 
for microservices
Istio is not just 
for microservicesIstio is not just 
for microservices
Istio is not just 
for microservicesTodd Kaplinger
 
.NET MAUI with .NET 6 (December 2021, Preview 10)
.NET MAUI with .NET 6 (December 2021, Preview 10).NET MAUI with .NET 6 (December 2021, Preview 10)
.NET MAUI with .NET 6 (December 2021, Preview 10)Alex Pshul
 
5 cool ways to get started with Cloud Native Development ( with Okteto)
5 cool ways to get started with Cloud Native Development ( with Okteto)5 cool ways to get started with Cloud Native Development ( with Okteto)
5 cool ways to get started with Cloud Native Development ( with Okteto)sangam biradar
 
Physical Computing Using Go and Arduino
Physical Computing Using Go and ArduinoPhysical Computing Using Go and Arduino
Physical Computing Using Go and ArduinoJustin Grammens
 
サイボウズを支えるCircleCI
サイボウズを支えるCircleCIサイボウズを支えるCircleCI
サイボウズを支えるCircleCIJumpei Miyata
 
Flutter Beta but Better and Better
Flutter Beta but Better and BetterFlutter Beta but Better and Better
Flutter Beta but Better and BetterDonghyeok Kang
 
Windows Containers on AKS Jorge Arteiro
Windows Containers on AKS Jorge ArteiroWindows Containers on AKS Jorge Arteiro
Windows Containers on AKS Jorge ArteiroJorge Arteiro
 
TechWiseTV Workshop: Cisco Developer Program
TechWiseTV Workshop: Cisco Developer ProgramTechWiseTV Workshop: Cisco Developer Program
TechWiseTV Workshop: Cisco Developer ProgramRobb Boyd
 
Atlassian Bamboo Feature Overview
Atlassian Bamboo Feature OverviewAtlassian Bamboo Feature Overview
Atlassian Bamboo Feature OverviewJim Bethancourt
 
Introduction to hubot
Introduction to hubotIntroduction to hubot
Introduction to hubotTencent
 
サイボウズの CI/CD 事情 〜Jenkins おじさんは CircleCI おじさんにしんかした!〜
サイボウズの CI/CD 事情 〜Jenkins おじさんは CircleCI おじさんにしんかした!〜サイボウズの CI/CD 事情 〜Jenkins おじさんは CircleCI おじさんにしんかした!〜
サイボウズの CI/CD 事情 〜Jenkins おじさんは CircleCI おじさんにしんかした!〜Jumpei Miyata
 
サイボウズの開発を支える GitHub × CircleCI
サイボウズの開発を支える GitHub × CircleCIサイボウズの開発を支える GitHub × CircleCI
サイボウズの開発を支える GitHub × CircleCIJumpei Miyata
 

Was ist angesagt? (20)

GitHub Actions 101
GitHub Actions 101GitHub Actions 101
GitHub Actions 101
 
From GitHub Source to GitHub Release: Free CICD Pipelines For JavaFX Apps
From GitHub Source to GitHub Release: Free CICD Pipelines For JavaFX AppsFrom GitHub Source to GitHub Release: Free CICD Pipelines For JavaFX Apps
From GitHub Source to GitHub Release: Free CICD Pipelines For JavaFX Apps
 
GitLab Remote Meetup: Enhance Your Kubernetes CI/CD Pipelines with GitLab & ...
GitLab Remote Meetup:  Enhance Your Kubernetes CI/CD Pipelines with GitLab & ...GitLab Remote Meetup:  Enhance Your Kubernetes CI/CD Pipelines with GitLab & ...
GitLab Remote Meetup: Enhance Your Kubernetes CI/CD Pipelines with GitLab & ...
 
Engineering Tools at Netflix: Enabling Continuous Delivery
Engineering Tools at Netflix: Enabling Continuous DeliveryEngineering Tools at Netflix: Enabling Continuous Delivery
Engineering Tools at Netflix: Enabling Continuous Delivery
 
Istio is not just 
for microservices
Istio is not just 
for microservicesIstio is not just 
for microservices
Istio is not just 
for microservices
 
Azure Functions
Azure FunctionsAzure Functions
Azure Functions
 
.NET MAUI with .NET 6 (December 2021, Preview 10)
.NET MAUI with .NET 6 (December 2021, Preview 10).NET MAUI with .NET 6 (December 2021, Preview 10)
.NET MAUI with .NET 6 (December 2021, Preview 10)
 
5 cool ways to get started with Cloud Native Development ( with Okteto)
5 cool ways to get started with Cloud Native Development ( with Okteto)5 cool ways to get started with Cloud Native Development ( with Okteto)
5 cool ways to get started with Cloud Native Development ( with Okteto)
 
Physical Computing Using Go and Arduino
Physical Computing Using Go and ArduinoPhysical Computing Using Go and Arduino
Physical Computing Using Go and Arduino
 
サイボウズを支えるCircleCI
サイボウズを支えるCircleCIサイボウズを支えるCircleCI
サイボウズを支えるCircleCI
 
Flutter Beta but Better and Better
Flutter Beta but Better and BetterFlutter Beta but Better and Better
Flutter Beta but Better and Better
 
Windows Containers on AKS Jorge Arteiro
Windows Containers on AKS Jorge ArteiroWindows Containers on AKS Jorge Arteiro
Windows Containers on AKS Jorge Arteiro
 
TechWiseTV Workshop: Cisco Developer Program
TechWiseTV Workshop: Cisco Developer ProgramTechWiseTV Workshop: Cisco Developer Program
TechWiseTV Workshop: Cisco Developer Program
 
Atlassian Bamboo Feature Overview
Atlassian Bamboo Feature OverviewAtlassian Bamboo Feature Overview
Atlassian Bamboo Feature Overview
 
Introduction to hubot
Introduction to hubotIntroduction to hubot
Introduction to hubot
 
サイボウズの CI/CD 事情 〜Jenkins おじさんは CircleCI おじさんにしんかした!〜
サイボウズの CI/CD 事情 〜Jenkins おじさんは CircleCI おじさんにしんかした!〜サイボウズの CI/CD 事情 〜Jenkins おじさんは CircleCI おじさんにしんかした!〜
サイボウズの CI/CD 事情 〜Jenkins おじさんは CircleCI おじさんにしんかした!〜
 
Intro to Raspberry Pi - by Sivakumar V
Intro to Raspberry Pi - by Sivakumar VIntro to Raspberry Pi - by Sivakumar V
Intro to Raspberry Pi - by Sivakumar V
 
サイボウズの開発を支える GitHub × CircleCI
サイボウズの開発を支える GitHub × CircleCIサイボウズの開発を支える GitHub × CircleCI
サイボウズの開発を支える GitHub × CircleCI
 
Orchestrating Microservices
Orchestrating MicroservicesOrchestrating Microservices
Orchestrating Microservices
 
Github in Action
Github in ActionGithub in Action
Github in Action
 

Andere mochten auch

Mobile Games mit Windows Azure
Mobile Games mit Windows AzureMobile Games mit Windows Azure
Mobile Games mit Windows AzureJürgen Gutsch
 
ASP.NET 5 auf Raspberry PI & docker
ASP.NET 5 auf Raspberry PI & dockerASP.NET 5 auf Raspberry PI & docker
ASP.NET 5 auf Raspberry PI & dockerJürgen Gutsch
 
讓 Asp.net 在 raspberry pi 上飛
讓 Asp.net 在 raspberry pi 上飛讓 Asp.net 在 raspberry pi 上飛
讓 Asp.net 在 raspberry pi 上飛dplayerd
 
Continuous Integration and the Data Warehouse - PASS SQL Saturday Slovenia
Continuous Integration and the Data Warehouse - PASS SQL Saturday SloveniaContinuous Integration and the Data Warehouse - PASS SQL Saturday Slovenia
Continuous Integration and the Data Warehouse - PASS SQL Saturday SloveniaDr. John Tunnicliffe
 
Continuous integration eine Einführung für Unkundige
Continuous integration   eine Einführung für UnkundigeContinuous integration   eine Einführung für Unkundige
Continuous integration eine Einführung für Unkundigeabuwipp
 
Agile Entwicklungsumgebung mit DVCS, Jenkins und Trello - Agile Bodensee Konf...
Agile Entwicklungsumgebung mit DVCS, Jenkins und Trello - Agile Bodensee Konf...Agile Entwicklungsumgebung mit DVCS, Jenkins und Trello - Agile Bodensee Konf...
Agile Entwicklungsumgebung mit DVCS, Jenkins und Trello - Agile Bodensee Konf...Jürgen Gutsch
 
Clean Code Workshop - Agile Bodensee Konferenz 2013
Clean Code Workshop - Agile Bodensee Konferenz 2013Clean Code Workshop - Agile Bodensee Konferenz 2013
Clean Code Workshop - Agile Bodensee Konferenz 2013Jürgen Gutsch
 

Andere mochten auch (11)

Mobile Games mit Windows Azure
Mobile Games mit Windows AzureMobile Games mit Windows Azure
Mobile Games mit Windows Azure
 
ASP.NET 5 auf Raspberry PI & docker
ASP.NET 5 auf Raspberry PI & dockerASP.NET 5 auf Raspberry PI & docker
ASP.NET 5 auf Raspberry PI & docker
 
讓 Asp.net 在 raspberry pi 上飛
讓 Asp.net 在 raspberry pi 上飛讓 Asp.net 在 raspberry pi 上飛
讓 Asp.net 在 raspberry pi 上飛
 
www.orbitz.com
www.orbitz.com www.orbitz.com
www.orbitz.com
 
Html 5 magic
Html 5 magicHtml 5 magic
Html 5 magic
 
Continuous Integration and the Data Warehouse - PASS SQL Saturday Slovenia
Continuous Integration and the Data Warehouse - PASS SQL Saturday SloveniaContinuous Integration and the Data Warehouse - PASS SQL Saturday Slovenia
Continuous Integration and the Data Warehouse - PASS SQL Saturday Slovenia
 
iks auf der gearconf 2012: Clean Code - Von der Lehre in den Alltag
iks auf der gearconf 2012: Clean Code - Von der Lehre in den Alltagiks auf der gearconf 2012: Clean Code - Von der Lehre in den Alltag
iks auf der gearconf 2012: Clean Code - Von der Lehre in den Alltag
 
Clean Code
Clean CodeClean Code
Clean Code
 
Continuous integration eine Einführung für Unkundige
Continuous integration   eine Einführung für UnkundigeContinuous integration   eine Einführung für Unkundige
Continuous integration eine Einführung für Unkundige
 
Agile Entwicklungsumgebung mit DVCS, Jenkins und Trello - Agile Bodensee Konf...
Agile Entwicklungsumgebung mit DVCS, Jenkins und Trello - Agile Bodensee Konf...Agile Entwicklungsumgebung mit DVCS, Jenkins und Trello - Agile Bodensee Konf...
Agile Entwicklungsumgebung mit DVCS, Jenkins und Trello - Agile Bodensee Konf...
 
Clean Code Workshop - Agile Bodensee Konferenz 2013
Clean Code Workshop - Agile Bodensee Konferenz 2013Clean Code Workshop - Agile Bodensee Konferenz 2013
Clean Code Workshop - Agile Bodensee Konferenz 2013
 

Ähnlich wie ASP.NET 5 on the Raspberry PI 2

The Secrets of The FullStack Ninja - Part A - Session I
The Secrets of The FullStack Ninja - Part A - Session IThe Secrets of The FullStack Ninja - Part A - Session I
The Secrets of The FullStack Ninja - Part A - Session IOded Sagir
 
A Love Story with Kubevirt and Backstage from Cloud Native NoVA meetup Feb 2024
A Love Story with Kubevirt and Backstage from Cloud Native NoVA meetup Feb 2024A Love Story with Kubevirt and Backstage from Cloud Native NoVA meetup Feb 2024
A Love Story with Kubevirt and Backstage from Cloud Native NoVA meetup Feb 2024Cloud Native NoVA
 
OSDC 2016 - Continous Integration in Data Centers - Further 3 Years later by ...
OSDC 2016 - Continous Integration in Data Centers - Further 3 Years later by ...OSDC 2016 - Continous Integration in Data Centers - Further 3 Years later by ...
OSDC 2016 - Continous Integration in Data Centers - Further 3 Years later by ...NETWAYS
 
Setting up Notifications, Alerts & Webhooks with Flux v2 by Alison Dowdney
Setting up Notifications, Alerts & Webhooks with Flux v2 by Alison DowdneySetting up Notifications, Alerts & Webhooks with Flux v2 by Alison Dowdney
Setting up Notifications, Alerts & Webhooks with Flux v2 by Alison DowdneyWeaveworks
 
OpenShift State of the Union, brought to you by JBoss
OpenShift State of the Union, brought to you by JBossOpenShift State of the Union, brought to you by JBoss
OpenShift State of the Union, brought to you by JBossEric D. Schabell
 
Jenkins X Hands-on - automated CI/CD solution for cloud native applications o...
Jenkins X Hands-on - automated CI/CD solution for cloud native applications o...Jenkins X Hands-on - automated CI/CD solution for cloud native applications o...
Jenkins X Hands-on - automated CI/CD solution for cloud native applications o...Ted Won
 
DevOps of Python applications using OpenShift (Italian version)
DevOps of Python applications using OpenShift (Italian version)DevOps of Python applications using OpenShift (Italian version)
DevOps of Python applications using OpenShift (Italian version)Francesco Fiore
 
Digital RSE: automated code quality checks - RSE group meeting
Digital RSE: automated code quality checks - RSE group meetingDigital RSE: automated code quality checks - RSE group meeting
Digital RSE: automated code quality checks - RSE group meetingHenry Schreiner
 
The Five Stages of Enterprise Jupyter Deployment
The Five Stages of Enterprise Jupyter DeploymentThe Five Stages of Enterprise Jupyter Deployment
The Five Stages of Enterprise Jupyter DeploymentFrederick Reiss
 
Node.js/io.js Native C++ Addons
Node.js/io.js Native C++ AddonsNode.js/io.js Native C++ Addons
Node.js/io.js Native C++ AddonsChris Barber
 
Open up your platform with Open Source and GitHub
Open up your platform with Open Source and GitHubOpen up your platform with Open Source and GitHub
Open up your platform with Open Source and GitHubScott Graham
 
Continuous Delivery of Puppet Manifests
Continuous Delivery of Puppet ManifestsContinuous Delivery of Puppet Manifests
Continuous Delivery of Puppet ManifestsKris Buytaert
 
Python Dependency Management - PyconDE 2018
Python Dependency Management - PyconDE 2018Python Dependency Management - PyconDE 2018
Python Dependency Management - PyconDE 2018Patrick Muehlbauer
 
ePOM - Fundamentals of Research Software Development - Code Version Control
ePOM - Fundamentals of Research Software Development - Code Version ControlePOM - Fundamentals of Research Software Development - Code Version Control
ePOM - Fundamentals of Research Software Development - Code Version ControlGiuseppe Masetti
 
How to Achieve more through Collaboration
How to Achieve more through Collaboration How to Achieve more through Collaboration
How to Achieve more through Collaboration Damien Garros
 
Fluo CICD OpenStack Summit
Fluo CICD OpenStack SummitFluo CICD OpenStack Summit
Fluo CICD OpenStack SummitMiguel Zuniga
 
Sonian, Open Source and Sensu
Sonian, Open Source and SensuSonian, Open Source and Sensu
Sonian, Open Source and SensuPete Cheslock
 

Ähnlich wie ASP.NET 5 on the Raspberry PI 2 (20)

The Secrets of The FullStack Ninja - Part A - Session I
The Secrets of The FullStack Ninja - Part A - Session IThe Secrets of The FullStack Ninja - Part A - Session I
The Secrets of The FullStack Ninja - Part A - Session I
 
A Love Story with Kubevirt and Backstage from Cloud Native NoVA meetup Feb 2024
A Love Story with Kubevirt and Backstage from Cloud Native NoVA meetup Feb 2024A Love Story with Kubevirt and Backstage from Cloud Native NoVA meetup Feb 2024
A Love Story with Kubevirt and Backstage from Cloud Native NoVA meetup Feb 2024
 
Python+gradle
Python+gradlePython+gradle
Python+gradle
 
OSDC 2016 - Continous Integration in Data Centers - Further 3 Years later by ...
OSDC 2016 - Continous Integration in Data Centers - Further 3 Years later by ...OSDC 2016 - Continous Integration in Data Centers - Further 3 Years later by ...
OSDC 2016 - Continous Integration in Data Centers - Further 3 Years later by ...
 
Setting up Notifications, Alerts & Webhooks with Flux v2 by Alison Dowdney
Setting up Notifications, Alerts & Webhooks with Flux v2 by Alison DowdneySetting up Notifications, Alerts & Webhooks with Flux v2 by Alison Dowdney
Setting up Notifications, Alerts & Webhooks with Flux v2 by Alison Dowdney
 
Fish Cam.pptx
Fish Cam.pptxFish Cam.pptx
Fish Cam.pptx
 
CI/CD with Github Actions
CI/CD with Github ActionsCI/CD with Github Actions
CI/CD with Github Actions
 
OpenShift State of the Union, brought to you by JBoss
OpenShift State of the Union, brought to you by JBossOpenShift State of the Union, brought to you by JBoss
OpenShift State of the Union, brought to you by JBoss
 
Jenkins X Hands-on - automated CI/CD solution for cloud native applications o...
Jenkins X Hands-on - automated CI/CD solution for cloud native applications o...Jenkins X Hands-on - automated CI/CD solution for cloud native applications o...
Jenkins X Hands-on - automated CI/CD solution for cloud native applications o...
 
DevOps of Python applications using OpenShift (Italian version)
DevOps of Python applications using OpenShift (Italian version)DevOps of Python applications using OpenShift (Italian version)
DevOps of Python applications using OpenShift (Italian version)
 
Digital RSE: automated code quality checks - RSE group meeting
Digital RSE: automated code quality checks - RSE group meetingDigital RSE: automated code quality checks - RSE group meeting
Digital RSE: automated code quality checks - RSE group meeting
 
The Five Stages of Enterprise Jupyter Deployment
The Five Stages of Enterprise Jupyter DeploymentThe Five Stages of Enterprise Jupyter Deployment
The Five Stages of Enterprise Jupyter Deployment
 
Node.js/io.js Native C++ Addons
Node.js/io.js Native C++ AddonsNode.js/io.js Native C++ Addons
Node.js/io.js Native C++ Addons
 
Open up your platform with Open Source and GitHub
Open up your platform with Open Source and GitHubOpen up your platform with Open Source and GitHub
Open up your platform with Open Source and GitHub
 
Continuous Delivery of Puppet Manifests
Continuous Delivery of Puppet ManifestsContinuous Delivery of Puppet Manifests
Continuous Delivery of Puppet Manifests
 
Python Dependency Management - PyconDE 2018
Python Dependency Management - PyconDE 2018Python Dependency Management - PyconDE 2018
Python Dependency Management - PyconDE 2018
 
ePOM - Fundamentals of Research Software Development - Code Version Control
ePOM - Fundamentals of Research Software Development - Code Version ControlePOM - Fundamentals of Research Software Development - Code Version Control
ePOM - Fundamentals of Research Software Development - Code Version Control
 
How to Achieve more through Collaboration
How to Achieve more through Collaboration How to Achieve more through Collaboration
How to Achieve more through Collaboration
 
Fluo CICD OpenStack Summit
Fluo CICD OpenStack SummitFluo CICD OpenStack Summit
Fluo CICD OpenStack Summit
 
Sonian, Open Source and Sensu
Sonian, Open Source and SensuSonian, Open Source and Sensu
Sonian, Open Source and Sensu
 

Kürzlich hochgeladen

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 

Kürzlich hochgeladen (20)

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 

ASP.NET 5 on the Raspberry PI 2

  • 1. ASP.NET 5 + Raspberry PI 2
  • 2. Jürgen Gutsch • Web Developer, Trainer, Consultant • User group Leader – .NET-Stammtisch Konstanz-Kreuzlingen – .NET User Group Nordwest-Schweiz • Blogger – http://www.aspnetzone.de/blogs/juergengutsch/ • Author – Dotnetpro
  • 3. Agenda • Setup the PI • Working with the PI • About the GPIOs • Working with the GPIOs • IoT Scenarios • Demo
  • 4. Installing the PI • Downloading the latest Raspian image from raspberry.org • Use Win32 Disk Imager to prepare a SD Card • Install Raspian on the PI
  • 5. Preparing the PI • Add and configure a Network • Connect to the PI via SSH e. g. via Putty
  • 6. Update the System $ sudo apt-get update $ sudo apt-get upgrade
  • 7. Install the latest Mono $ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF $ echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list $ sudo apt-get update $ sudo apt-get install mono-complete
  • 8. Test the Mono installation $ mono -V
  • 9. Getting ASP.NET 5 samples $ mkdir ~/sources/aspnet5 & cd ~/sources/aspnet5 $ git clone git://github.com/aspnet/home.git $ sh ~/sources/aspnet5/dnvminstall.sh $ source ~/.dnx/dnvm/dnvm.sh $ dnvm upgrade
  • 10. Import needed Certificates $ sudo certmgr -ssl -m https://go.microsoft.com $ sudo certmgr -ssl -m https://nugetgallery.blob.core.windows.net $ sudo certmgr -ssl -m https://nuget.org $ sudo certmgr -ssl -m https://www.myget.org $ mozroots --import --sync
  • 11. Build and install Libuv for Kestrel $ sudo apt-get install gyp $ wget http://dist.libuv.org/dist/v1.4.2/libuv-v1.4.2.tar.gz $ tar -xvf libuv-v1.4.2.tar.gz $ cd libuv-v1.4.2/ $ ./gyp_uv.py -f make -Duv_library=shared_library $ make -C out $ sudo cp out/Debug/lib.target/libuv.so $ usr/lib/libuv.so. 1.4.2 $ sudo ln -s libuv.so. 1.4.2 /usr/lib/libuv.so.1
  • 12. Install the latest DNVM $ curl -sSL https://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.s h | DNX_BRANCH=dev sh && source ~/.dnx/dnvm/dnvm.sh $ dnvm upgrade Test the DNVM $ dnvm
  • 13. Install node.js $ wget http://node-arm.herokuapp.com/node_latest_armhf.deb $ sudo dpkg -i node_latest_armhf.deb
  • 14. Install grunt & bower $ sudo npm install -g grunt $ sudo npm install -g bower
  • 15. Possible IDEs • Working on the PI – vi Startup.cs – Nano Startup.cs • Working on Windows – Visual Studio – Visual Studio Code
  • 16. Using Git • Transfer files with Git • Git is easy to use • Git is integrated in Raspian • Git is integrated in Visual Studio 2015
  • 17. Setup a Git workspace on Windows $ git init $ git add –all $ git commit -m „initial commit“ Push initially: $ git add origin https://github.org/juergengutsch/... $ git push -u origin master Push the latest changes: $ git push
  • 18. Setup a Git workspace on the PI Setup a the IDE on the PI $ mkdir ~/projects/dnc15 & cd ~/projects/dnc15 Initial clone $ git clone https://github.org/juergengutsch/... Get the latest changes $ git pull
  • 19. Setup the first ASP.NET 5 App • Add Dependencies: – "Microsoft.AspNet.Hosting": "1.0.0-beta4" – "Kestrel": "1.0.0.0-beta4” • Add Command: – "kestrel": "Microsoft.AspNet.Hosting --server Kestrel --server.urls http://localhost:5004"
  • 20. Start the sample web Prepare the Start $ cd ~/projects/dnc15/Sensors/src/Sensors $ dnvm install latest $ dnu restore Starting the web server $ dnx . kestrel
  • 21. About the GPIOs General purpose input/output • GPIO numbering vs. physical/pin numbering • 2 x output 5V • 2 x output 3.3V • 8 x ground • 26 x GPIO • (2x ID EEPROM)
  • 23. Working with the GPIOs • Calling the Raspian native API to connect the GPIOs • Using existing C# libraries to access the pins: – Raspberry.System • https://github.com/raspberry-sharp/raspberry-sharp – Raspberry.IO.GeneralPurpose • https://github.com/raspberry-sharp/raspberry-sharp-io – RPI.GPIO • https://github.com/fatihboy/RPI.GPIO
  • 24. Good to know: Be carefully • Read carefully the GPIO specification – Wrong connected pins can kill the sensor or the PI • Read carefully the sensor specification • Be carefully with external power
  • 26. Raspberry.IO.GeneralPurpose • Includes drivers to access the GPIO Pins • Includes Pin connections • Includes conversions between pin numberings – ConnectorPin: Pin using physical pin numbers – ProcessorPin: Pin using GPIO pin numbering • Includes methods to work with the pins
  • 28. Good to know: Cheat with node.js • node.js is pretty cool on the PI  • It‘s easy to write • It runs fast • many GPIO examples written in Javascript • node.js is a pretty awesome tool to tryout things, you want to implement with C#
  • 29. Connecting the distance sensor • Needs to trigger the measurement • Needs to measure the time until the echo pings back • Needs to divide the resulting time by 2
  • 30. TODO: Connecting the distance sensor /* demo */
  • 31. Mobile RC buggy • Running a mobile web app on the PI • The page fetches accelerator data from the mobile device • The page controls one or more servos in the pi • The page uses the accelerator data to control the servos
  • 32. Plant watering system • Get the weather forecast via network from weather API • Get the current temperature via sensors • Get the current pressure via sensors • Control servos / switches to start watering plants • Send text message on error / case of no water • Provide mobile web app to show current information
  • 33. Segway like vehicle • Use accelerator sensor • Control a servo on a two wheel vehicle • Use the accelerator data to steer the servo to keep the vehicle vertical

Hinweis der Redaktion

  1. apt-get mono ist zu alt aktuelles mono läuft nicht auf RPIB+ Speicherproblem MONO 4.0
  2. apt-get ist zu alt
  3. Demo?