GithubHelp home page GithubHelp logo

asst-cpe-wire-radio-comms's Introduction

CPE 1040 - Spring 2020

Assignment 3.5: Microbit Wired & Wireless Roundtrip Communication

Author: Ivo Georgiev, PhD
Last updated: 2020-02-14
Code: 333fe0348d8c8a00b82d3e4d9eab4a63a7a5dace

This is an optional assignment for the Spring 2020 installment of the CPE 1040 - Intro to Computer Engineering course at MSU Denver.

Overview

This assignment explores wireless and wired I/O communication features of the micro:bit.

Requirements

1. Radio communcation

  1. Use the micro:bit radio functions to communicate different data types between 2 micro:bits:

    1. An integer.
    2. A floating-point number.
    3. A boolean.
    4. A single character.
    5. A string.
    6. (Challenge) An object of a class. Hint: Objects are implemented as key-value maps in TypeScript.
  2. (Challenge) How would you transfer a function across the radio transmission channel that the micro:bit affords?

  3. Briefly explain your code in the experiments section of this README.

  4. Record a video that shows the communication, upload to Imgur, and link in the demo video section of this README.

2. GPIO pin communication

  1. (Challenge) Use the micro:bit GPIO pin functions to communicate different data types between 2 micro:bits (_Hint: You might want to consider creating your own protocol and an API like the sendValue() and onReceivedValue().):

    1. An integer.
    2. A floating-point number.
    3. A boolean.
    4. A single character.
    5. A string.
    6. An object of a class.
  2. Briefly explain your code in the experiments section of this README.

  3. Record a video that shows the communication, upload to Imgur, and link in the demo video section of this README.

3. Round-trip communication

  1. Measure the time it takes for the round-trip communication, using only radio, of a:

    1. Number.
    2. String. How do you signal the end of the string? How does the length of the string affect the time?
  2. Repeat the experiment from (1), now using only pins.

  3. Repeat the experiment from (1), now using radio in one direction, and pins in the reverse direction.

  4. Briefly explain your code in the experiments section of this README.

  5. Record a video that shows the communication, upload to Imgur, and link in the demo video section of this README.

4. (Challenge) Clock synchronization

  1. Create a MM:SS binary-coded decimal clock to display on the LED matrix of the micro:bit. Can you make it run at the correct speed?

  2. Once you are done with (1), create a clock-sync procedure between the 2 micro:bits. Note that the second micro:bit should only receive time and time corrections from the first one. Can you get the two micro:bits to run in sync?

  3. Explain your code in the experiments section of this README.

  4. Record a video that shows the communication, upload to Imgur, and link in the demo video section of this README.

Resources

micro:bit

  1. micro:bit lessons.

  2. micro:bit ideas.

  3. A list of some more advanced projects.

  4. The projects at the awesome micro:bit list.

  5. micro:bit technical documentation.

Github

  1. Github Tutorial for Beginners (webpage).

  2. Github Basics for Mac and Windows (video).

  3. git & Github Crash Course for Beginners (video).

  4. Introduction to Github for Beginners (video).

  5. About git (webpage).

  6. git documentation (webpage, book, videos, reference manual).

  7. Github markdown cheat sheet.

JavaScript

  1. Technically, the language which is used side-by-side with Blocks in the Makecode ronment is a subset of TypeScript, which itself is a superset of JavaScript (technically, ECMAScript), with some JS features not implemented in Makecode.

  2. The limited JavaScript mini-tutorial in Makecode.

  3. Official TypeScript documentation:

    1. TypeScript in 5 min tutorial. Note: You will need to download and install an integrated development environment (IDE). The two that I recommend are Visual Studio Code from Microsoft and WebStorm from JetBrains.
    2. The full documentation and reference is under Handbook. Bear in mind that you are drinking from the hose. Don't be surprised if not everything is presented in a strictly incremental manner.
  4. In-browser TypeScript playground. Note that micro:bit specific code will not run, but you can still play. Start making the distinction between a generic multi-purpose programming language (TypeScript) and functionality (packages, libraries, objects, etc.) that is specific to a particular device (micro:bit), though written in the same programming language.

  5. A pretty good and very palatable JS tutorial with in-browser coding, by Codecademy.

  6. Extensive and detailed JS tutorial, with some advanced material thrown in. I like this one!

  7. The most authoritative JS resource on the Web, including tutorials and reference, by Mozilla.


Experiements

TODO: Describe your communications code, experiements, and comms time-measurements here.

Demo video

TODO: Add your video descriptions and URLs here. The videos should clearly show the transmitted values at the origin and destination.

asst-cpe-wire-radio-comms's People

Contributors

ivogeorg avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.