Lesson 5 Cloud Upload

Similar documents
Lesson 7 Cloud Mood Indicator

Lesson 27 CPF Weather Station

Lesson 18 Automatic door

Lesson 25 Flood Warning System

Design and create an app which uses sequence, selection, repetition and variables. Program, debug and refine the code for their app.

Lesson 16 Musical Door Bell

Introductory Lesson 1 Working in the cloud

CPF Arduino Blockly V

Assessment - Unit 3 lessons 16-21

Homework Set 2- Class Design

PMH. Home Automation Made Right. Sunday, February 5, 12

micro:bit Lesson 1. Using the Built-in Sensors

Arduino Programming. Arduino UNO & Innoesys Educational Shield

Spelling-Punctuation-Grammar Subject How will you promote high standards within this module? Term Duration (approx.)

Software Integration Guide

Decision Structures CSC1310. Python Programming, 2/e 1

WEB DEVELOPER BLUEPRINT

COMPUTING Syllabus Version 1.0

Certified Selenium Professional VS-1083

Appendix A: Objectives and Courseware Locations

Lesson 5 Nimbits. Chapter-6 L05: "Internet of Things ", Raj Kamal, Publs.: McGraw-Hill Education

Lesson 1 Key-Terms Meanings: Web Connectivity of Devices and Devices Network

FOR IMMEDIATE RELEASE

Lists of Lists. CS 5010 Program Design Paradigms Bootcamp Lesson 5.3

GEL Scripts Advanced. Your Guides: Ben Rimmasch, Yogesh Renapure

Constructing Algorithms and Pseudocoding This document was originally developed by Professor John P. Russo

JavaScript Introduction

PROCE55 Mobile: Web API App. Web API.

CS2630: Computer Organization Homework 1 Bits, bytes, and memory organization Due January 25, 2017, 11:59pm

UNDERSTANDING PROBLEMS AND HOW TO SOLVE THEM BY USING COMPUTERS

CSI 1100 / 1500 Fall 2004 Introduction to Computer Science I Final Examination

CS371m - Mobile Computing. Persistence - Web Based Storage CHECK OUT g/sync-adapters/index.

Configuring and Using Osmosis Platform

Introduction to programming the FRDM/MBED in Java David J.

Standard 1 The student will author web pages using the HyperText Markup Language (HTML)

1.Introduction to ThingSpeak platform

Serverless and APIs: Rethinking Curriculum in Higher Education. Munir Mandviwalla and Jeremy Shafer Temple University

Module 1: Crash Prevention Lesson 3: Weather Information systems Programming Activity Using Arduino Teacher Resource Grade 6-8 Time Required

RB-Dfr-12 DFRobot URM04 v2.0 Ultrasonic Sensor

Chapter 4: Programming with MATLAB

Getting Started with Octoblu

Note: For each partner service, there is a specific technical note on the procedure to follow. This is only general information.

Skill Area 306: Develop and Implement Computer Program

Standards/ Strands Essential Questions Skills Assessment. What are the strengths and weaknesses of Processing as a programming language?

Developing an HTML5 Extension for SAP Visual Intelligence (Lumira) Author: Kirubhananth Chellam

Using the Media Server Administrator (MSA) Interface for the Hardware Media Server

The Discussion of Cross-platform Mobile Application Development Based on Phone Gap Method Limei Cui

Chrome Extension Security Architecture

City.Risks SDK. Deliverable D3.6. Editor Nikos Bakalos Dimitris Zografos (ICCS) Contributors N. Papadakis, A. Litke, A. Anagnostopoulos (INFT)

Manual. NB-IoT workshop. Sodaq Date: Author: Jan van Loenen

Fundamentals of Programming (Python) Getting Started with Programming

Xerox Connect App for Blackboard

Math 98 - Introduction to MATLAB Programming. Fall Lecture 1

Lesson 10 Data and Hardware Protection

EK307 Lab: Microcontrollers

Lesson 38: Conditionals #2 (W11D3)

AJAX. Lab. de Bases de Dados e Aplicações Web MIEIC, FEUP 2010/11. Sérgio Nunes

jquery and AJAX

Introduction to Programming. Writing an Arduino Program

CSCE 120: Learning To Code

Unit E Step-by-Step: Programming with Python

EMPOWER Course Calendar


Lecture 4 8/24/18. Expressing Procedural Knowledge. Procedural Knowledge. What are we going to cover today? Computational Constructs

RETURN X return X Returning a value from within a function: computes the value of variable exits the function and returns the value of the variable

Repetition Structures

Condition-Controlled Loop. Condition-Controlled Loop. If Statement. Various Forms. Conditional-Controlled Loop. Loop Caution.

AP Computer Science Homework Set 1 Fundamentals

Lesson 7: If Statement and Comparison Operators

Android Basics Nanodegree Syllabus

URM04 V2.0 (SKU:SEN0002)

AuraTester User Guide

Chapter 2 Writing Simple Programs

Consent Management Platform (CMP) Full Documentation

Brewmeister Documentation

MOC 20482C: Advanced Windows Store App Development Using HTML5 and JavaScript

SEEM4570 System Design and Implementation Lecture 03 JavaScript

(SeTracker2)User guide

1.204 Computer Algorithms in Systems Engineering Spring 2010 Problem Set 4: Satellite data sets Due: 12 noon, Monday, March 29, 2010

Desktop Apps with PHP and Titanium. Ben Ramsey TEK X May 19, 2010

Front End Programming

CENG 256 Internet Programming Draft

Working with JavaScript

StorageGRID Webscale NAS Bridge Management API Guide

Arduino Uno. Power & Interface. Arduino Part 1. Introductory Medical Device Prototyping. Digital I/O Pins. Reset Button. USB Interface.

Chapter 5 Conditional and Iterative Statements. Statement are the instructions given to the computer to perform any kind of action.

Red Hat 3Scale 2-saas

PRODUCT CARD. Skriware 3D printing educational ecosystem

IME-100 ECE. Lab 3. Electrical and Computer Engineering Department Kettering University. G. Tewolde, IME100-ECE,

Android Developer Nanodegree Syllabus

Introduction to JavaScript p. 1 JavaScript Myths p. 2 Versions of JavaScript p. 2 Client-Side JavaScript p. 3 JavaScript in Other Contexts p.

IGEEKS TECHNOLOGIES. Software Training Division. Academic Live Projects For BE,ME,MCA,BCA and PHD Students

Getting Started with Python

This course maps to the exam.

Marketplace Scheduler. User Guide

With IBM BPM 8.5.5, the features needed to express both BPM solutions and case management oriented solutions comes together in one offering.

Input/Output Machines

CS 115 Lecture 8. Selection: the if statement. Neil Moore

Conditionals & Loops /

Trellis Magento 2 Salsify Connector

Transcription:

Lesson 5 Cloud Upload What you will need CloudProfessor (CPF) Temperature sensor Arduino Leonardo Arduino Shield USB cable Overview In the previous lessons, students learned how to retrieve data from sensors attached to the CloudProfessor such as light and temperature sensors. In this lesson, students will learn how to upload the value measured by attached sensors to cloud storage. Learning Objectives Use computer-based data logging to automatically record temperature data and upload it to the cloud. Understand and use variables. Understand the benefits and drawbacks of computer-based data logging. Learning Expectations (how learning / progress will be demonstrated) All Upload temperature data taken from the CloudProfessor to the cloud. Most Use variables in their app. Some Explain the benefits and drawbacks of computer-based data logging. Curriculum Links (Computing PoS) Designs simple algorithms using loops, and selection i.e. if statements. (AL) Uses logical reasoning to predict outcomes. (AL) Detects and corrects errors i.e. debugging, in algorithms. (AL) Creates programs that implement algorithms to achieve given goals. (AL) Understands that programming bridges the gap between algorithmic solutions and computers. (AB) Computational Thinking Concepts: AB = Abstraction; DE = Decomposition; AL = Algorithmic Thinking; EV = Evaluation; GE = Generalisation. Lesson 5: Cloud Upload

Step-by-step instructions. Connect the power of CloudProfessor then press and hold the power button for two seconds; it will turn on and the power indicator will light up.. Insert the Arduino Shield into Arduino Leonardo and use the USB cable to connect the CloudProfessor with Arduino Leonardo. Attach the temperature sensor to port A.. When the CloudProfessor detects the Arduino Leonardo, a notification will appear on your device; click the notification to launch the Arduino Leonardo APP, and then select the CPF Arduino Blockly app. Click on Lesson 5. 4. Press the execute button to enter the control user interface (UI). 5. Press the edit button to enter the program editing page. Edit button Execute button CPF Arduino Blockly app Control user interface (UI) Program editing page Lesson 5: Cloud Upload

Exploring the code (Blockly) Let s explore the code.. Count with:. Set celsius to: The count with block executes the same task repeatedly for a specified number of times. The number of times the code is repeated is specified in the to block (). In this example, the code will be repeated 0 times. The Set celsius to block creates a variable called Celsius and stores the value of the temperature sensor in degrees Celsius.. Set date to: The Set date to block creates a variable called date and stores the current date/ time. 4. If / else: The if / else block is used to conditionally run code depending on whether a Boolean condition is true or false. In this example, a message will be uploaded to the cloud based on the value taken from the temperature sensor. When the value taken from the temperature sensor is greater than 8 degrees Celsius (If() is true), it will generate a Hot! Hot! Hot! message; otherwise, it will generate an I Love CPF message. 5. Set AOPstatus to: The Set AOPstatus to block creates a variable called AOPstatus which is used to store the data received as a JSON object ready for uploading to the cloud. JSON (JavaScript Object Notation) is a standard data exchange format commonly used in web applications. JSON can use lists or objects to write data. In this example, the JSON object will be used to upload the store number, temperature, message and time & date (). 6. Title Panel Set: The Title Panel Set block displays the value taken from the temperature sensor, the generated message and the current date & time on the screen in real-time () as it is uploaded to the cloud. Note: Unlike in previous lessons, there s no cpf.repeat Experiment with different intervals by changing the number in the Delay Time(Sec) block. Try swapping the temperature sensor with a light sensor and change the message based on the value from the light sensor. Lesson 5: Cloud Upload

Exploring the code (JavaScript) Let s explore the code.. for (index=; index<=0; index++) { The for() statement executes the same task repeatedly for a specified number of times. The number of times the code is repeated is specified in the first two sections of the for loop (). In this example, the code will be repeated 0 times.. var value = cpf.get( temperature sensor ); var value = cpf.get( temperature sensor ); returns the reading taken from the temperature sensor and stores the result in a variable called value. var celsius = tocelsius(value); converts the value taken from the temperature sensor to degrees Celsius.. var d = new Date(); The var d = new Date(); statement creates a variable called d and stores the current date/time. 4. If / else: The if / else block is used to conditionally run code depending on whether a Boolean condition is true or false. In this example, a message will be uploaded to the cloud based on the value taken from the temperature sensor. When the value taken from the temperature sensor is greater than 8 degrees Celsius (If() is true), it will generate a Hot! Hot! Hot! message; otherwise, it will generate an I Love CPF message. 5. var str = JSON.stringify(obj); var str = JSON.stringify(obj); creates a variable called obj which is used to store the data received as a JSON object ready for uploading to the cloud. JSON (JavaScript Object Notation) is a standard data exchange format commonly used in web applications. JSON can use lists or objects to write data. In this example, the JSON object will be used to upload the store number, temperature, message and time & date (). aop.setstore() is a CloudProfessor Java Script API; it is used to upload data to the CloudProfessor cloud platform. 6. ui.set( content, JSON content:\n + str); The ui.set statement displays the value taken from the temperature sensor, the generated message and the current date & time on the screen in real-time () as it is uploaded to the cloud Note: Unlike in previous lessons, there s no cpf.repeat(). Instead, the program will end after uploading 0 times. You can change the number of milliseconds in the cpf.sleep(000); line to change the upload time intervals. Experiment with different intervals by changing the number in the cpf.sleep(000); line. Try swapping the temperature sensor with a light sensor and change the message based on the value from the light sensor. 4 Lesson 5: Cloud Upload

4 Extension Students to replace the temperature sensor with a light sensor and re-create the Cookie Jar alarm from the first lesson. Students to program the CloudProfessor to record the exact date and time the cookie jar lid (or box lid) is opened and upload the results to the cloud. 5 Differentiation To support students, provide step by step guides. To stretch students ask them to create a flowchart / pseudocode of their code first or code their solution using JavaScript. 6 Homework Students to write up a summary of what they ve learned; students to include screenshots and snippets of their code in their summary. Students to research the benefits and drawbacks of computer-based data logging. Students can also explore how data is recorded to make weather predictions. 7 Links Sample weather data from weather stations across the UK: http://weather.lgfl.org.uk How cloud storage works: http://computer.howstuffworks.com/cloud-computing/cloud-storage.htm Benefits of data logging: http://www.bbc.co.uk/schools/gcsebitesize/ict/measurecontrol/dataloggingrev.shtml Disclaimer: Use these sites at your own risk. Acer is not responsible for the content of external Internet sites. We recommend that you check the suitability of any recommended websites links before giving them to students. 5 Lesson 5: Cloud Upload