{"id":18291403,"url":"https://github.com/ladynaggaga/devfest_msftworkshop","last_synced_at":"2025-04-05T10:31:02.398Z","repository":{"id":69566131,"uuid":"50680108","full_name":"LadyNaggaga/DevFest_MSFTWorkshop","owner":"LadyNaggaga","description":"DevFest 2016 Microsoft Workshop. Requirements :  Hardware  Sparkfun Weather Shield + Particle Photon and Microsoft Azure account","archived":false,"fork":false,"pushed_at":"2016-02-17T23:22:09.000Z","size":196,"stargazers_count":1,"open_issues_count":1,"forks_count":15,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-21T03:03:40.714Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LadyNaggaga.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-01-29T17:52:41.000Z","updated_at":"2018-02-01T08:27:57.000Z","dependencies_parsed_at":"2023-05-03T17:36:35.158Z","dependency_job_id":null,"html_url":"https://github.com/LadyNaggaga/DevFest_MSFTWorkshop","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LadyNaggaga%2FDevFest_MSFTWorkshop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LadyNaggaga%2FDevFest_MSFTWorkshop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LadyNaggaga%2FDevFest_MSFTWorkshop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LadyNaggaga%2FDevFest_MSFTWorkshop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LadyNaggaga","download_url":"https://codeload.github.com/LadyNaggaga/DevFest_MSFTWorkshop/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247324549,"owners_count":20920672,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-05T14:14:07.891Z","updated_at":"2025-04-05T10:31:01.998Z","avatar_url":"https://github.com/LadyNaggaga.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DevFest_MSFTWorkshop\n[![Gitter](https://badges.gitter.im/LadyNaggaga/DevFest_MSFTWorkshop.svg)](https://gitter.im/LadyNaggaga/DevFest_MSFTWorkshop?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge)\n\nDevFest 2016 Microsoft IoT Workshop. Requirements :  Hardware  Sparkfun Weather Shield + Particle Photon, [Visual Studio Code](https://code.visualstudio.com/Download) (free, opensource and available on Mac, Linux, and Windows),  Microsoft Azure account(ACTIVATE YOUR AZURE ACCOUNT USING [DREAMSPARK](https://www.dreamspark.com/Product/Product.aspx?productid=99)), [Node](https://nodejs.org/en/), and [Project Oxford API](https://www.projectoxford.ai/). \n\n## Project description \n\nWe will be  using the  Particle Photon and Microsoft Project Oxford Emotion API to detect your emotions.  Before you come to the workshop please make sure to sign up for a free Azure account  using DreamSpark (instructions below), and  Microsoft account so you can access the Project Oxford API. \n\n##Step 1 Get your Azure Account \n\n### Activate your FREE Azure Account with DreamSpark \n[![Alt text for your video](http://www.gmlpu.org.uk/wp-content/uploads/2014/10/freestuff.jpg)](https://channel9.msdn.com/Series/Free-Cloud-for-Students/Activating-a-Free-Azure-DreamSpark-Subscription)\n\nClick image to  play video.In this two minute learn how to activate your free Azure account with DreamSpark. \n\n## Step 2 Sign up for  Project Oxford Emotion API\n####What is Project Oxford API?\nProject Oxford is a suite of AI APIs from Microsoft and includes APIs around  Vision APIs, Speech APIs, and Language APIs.In this workshop we will be looking at the emotions APIs. \n\nEmotions APIs detect emotions based on facial expressions.The Emotion API takes an image as an input, and returns the confidence across a set of emotions for each face in the image, as well as bounding box for the face, using the Face API.The emotions detected are anger, contempt, disgust, fear, happiness, neutral, sadness, and surprise. \n\n![](http://marianaggaga.com/wp-content/uploads/2016/02/emotionapi.png)\n\n1. Go to [Project Oxford site](https://www.projectoxford.ai/)\n2. Click get free trial \n![](http://marianaggaga.com/wp-content/uploads/2016/02/start-trial-1.png)\n3. Signing with your Microsoft account. \n![](http://marianaggaga.com/wp-content/uploads/2016/02/Microsoftaccount2.png)\n4. Show your Emotion API key \n![](http://marianaggaga.com/wp-content/uploads/2016/02/getapikey.png)\n5. Copy and paste your key into a notepad for now. \n\n## Step 3  Fork this repo\n![](http://marianaggaga.com/wp-content/uploads/2016/02/githubrepofork.png)\n\n\n## Step 4 [Create a  web app with Azure App Service](https://azure.microsoft.com/en-us/documentation/articles/web-sites-nodejs-develop-deploy-mac/)\nBefore we build our first Node.js app fork this repo.\n\n###Create a web app in Azure App Service using the Azure Portal\n\nIn this section you will learn how to create a web app and enable git publishing \n\n1. Sign in to the Azure Portal.\n2. Click the + NEW icon on the top left of the Azure Portal.\n3. Click Web + Mobile, and then click Web app.\n  ![](http://marianaggaga.com/wp-content/uploads/2016/02/webapp1.png)\n4. Enter a name for the web app in the Web app box.This name must be unique in the azurewebsites.net domain \n5. Select a Subscription (this will be DreamSpark).\n6. Select a Resource Group or create a new one.\n7. Select an App Service plan/Location or create a new one.\n8. Click create\n\n ![](http://marianaggaga.com/wp-content/uploads/2016/02/webapp2.png)\n9. Click Web apps \u003e {your new web app}.\n10. In the Web app blade, click the Deployment part.\n ![](http://marianaggaga.com/wp-content/uploads/2016/02/webapp10.png)\n11. In the Continuous Deployment -\u003e Click Configure Settings-\u003e click Github\n12. Click Github, and then click OK. GitHub will  ask if you want to authorize Azure to have access to your accounts. It's safe to click Authorize application.\n13. Select DevFest_MSFTWorkshop GitHub repository from the list and make sure you are deploying the master branch. Click OK \n ![](https://cloud.githubusercontent.com/assets/3477155/9880464/bea7f6e4-5b99-11e5-9601-f7a6767e32ba.gif)\n\n\n## Step 5 [Setting up Particle Photon board](https://docs.particle.io/guide/getting-started/connect/photon/)\n\n[How to get started with the Particle Photon board](https://docs.particle.io/guide/getting-started/start/photon/). \n\n### Prerequisites for Setup\nSoftware Particle Mobile App - [iPhone](https://itunes.apple.com/us/app/particle-build-photon-electron/id991459054?ls=1\u0026mt=8) | [Android](https://play.google.com/store/apps/details?id=io.particle.android.app)\n\n1. Your Particle device, brand new and out of the box!\n\n2. USB to micro USB cable (included with Photon Kit and Maker Kit)\n\n3. Power source for USB cable (such as your computer, USB battery, or power brick)\n\n4. Your [iPhone](https://itunes.apple.com/us/app/particle-build-photon-electron/id991459054?mt=8) or [Android](https://play.google.com/store/apps/details?id=io.particle.android.app)download the particle app.\n\n### Setting up your Particle Photon\n1. Go to [spark.io/start](https://docs.particle.io/guide/getting-started)\n2. Select Photon \n3. Get a [particle account](https://build.particle.io/login) if you don't have one \n4. Connect your Photon to your acccount.You will do this with your iOS or android app.\n5. On the packaging that your Photon Kit came in you'll see a barcode like the one below. Take note of the four digits in the thrid alphanumeric sequence. ![image here]\n6.  Go to phone wifi setup and select your Photon-C***\n7.  Continue to the Particle app and follow the instructions to get your Photon online.\n#### Programming the particle Photon\n8.  Go to [online IDE](https://build.particle.io)  and sign in with your particle username and password\n\n[screen shots coming soon]\n\nGet your Device ID  and Access token from your will need for the next section \n- Copy your device ID from the web IDE by clicking on Devices.\n![](https://www.twilio.com/blog/wp-content/uploads/2015/10/mSbV1J9hj_Di2zw_hTQn0aJohHbHABoinC8MIS4FFC2K7BINRGIJJdBT_8V3yrnUW08Cr7QxoxiqEtfR1m0w4IYlXoE6W9_2elTdqoxz4Xpn0qXael0DGdro4sFoy1eXzDm4nnt4.png)\n\nplace holder gif from Twilio\n\n- Copy the access token by clicking Settings.\n\n![](http://marianaggaga.com/wp-content/uploads/2016/02/settings-e1454640147971.png)\n## Step 6  Configure web apps in Azure App Service\nBefore we jump into the next portion, make sure you have your [Project Oxford Emotion API](https://github.com/LadyNaggaga/DevFest_MSFTWorkshop#step-2-sign-up-for--project-oxford-emotion-api), and your [particle device ID and access token](https://github.com/LadyNaggaga/DevFest_MSFTWorkshop#step-5-setting-up-particle-photon-board).\n\n#### Referencing the Project Oxford API and  Photon in your  the code \nOpen [routes/image.js](https://github.com/LadyNaggaga/DevFest_MSFTWorkshop/blob/master/routes/image.js) file\n\nThe code snippet below is referencing your Project Oxford API key. It is great practice to never leave your key in your code. We use the [process.env](https://nodejs.org/api/process.html#process_process_env) to config variables inside a Node.js application.\n\nPO_KEY is our Project Oxford API key.\n\n`var oxfordEmotion = require(\"node-oxford-emotion\")(process.env.PO_KEY);`\n\nScroll to the bottom of the image.js file to see the code for the Photon Particle reference\n\n`  Spark.login({ username: process.env.USER_NAME, password: process.env.USER_PASS },             function(err, body) {\n      Spark.callFunction(process.env.SPARK_ID,'setMode',isHappy,function(err,data)`\n\nTake note of the USER_NAME, USER_PASS  , and SPARK_ID , and PO_KEY variables because we will need them in the next step.\n\n### Sign into your azure account \n- In the [Azure Portal](https://portal.azure.com), open the blade for the web app and click on the site we created earlier\n- Click All Settings.\n- Click Application Settings.\n- Scroll to App Settings  and enter your process.env for Project Oxford API and Photon board.\n![](http://marianaggaga.com/wp-content/uploads/2016/02/keys.png)\n- Save changes and test your app by going to your website.\n\n### [Repo to getting started with Emotion API with django](https://github.com/jsturtevant/happy-image-tester-django) \n\n## Deploy to Azure\n[![Deploy to Azure](http://azuredeploy.net/deploybutton.png)](https://azuredeploy.net/)\n\nOther resources \n\n###[Github Getting started with Node.js on Azure ](https://github.com/sayar/NodeMVA)\n###[Github Project Oxford Web Cam  ](https://github.com/bitchwhocodes/project-oxford-webcam)   \n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fladynaggaga%2Fdevfest_msftworkshop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fladynaggaga%2Fdevfest_msftworkshop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fladynaggaga%2Fdevfest_msftworkshop/lists"}