You are on page 1of 6

MODULE 5: PREP NOTES

1. Internet of Things--> referring fo the inclusion of computing and


networking(often with sensing and output) capabilities in either:
a. devices that didnt include computing and/or networking before OR
b. new types of devices that werent feasible in the past. A microcontroller is
a core component of many IoT systems that provides the computation
(and often the networking too).
2. Microprocessor(~computer~): mainly used to process information, like playing
media, writing documents, playing games, and browsing web content
3. MicroController: made to control things; Although control is a vital aspect of
microcontrollers, controlling things depends on being able to sense the
environment. Many modern uses of microcontrollers, particularly some IoT
applications, use microcontrollers primarily for their ability to monitor (sense)
values rather than to exert control.
a. especially good at IoT (and controlling things) is because they include
resources that allow them to easily interact with hardware, like sensors,
motors, etc. These resources support much of the communication and
control of the hardware, but additional circuitry is often needed to deal with
the electrical properties of these devices.
b. Usually run just one program (microprocessors can run multiple)
4. RedBear Duo
a. Not an Arduino
b. 32-bit processor
c. ARM instruction set--most commonly used in cell phones
d. 128kB of RAM
e. Runs at 120 MHz--the relationship between clock speed and performance
isnt usually linear, but the Duos performance on many tasks is
significantly greater than the Arduinos
f. Arduino IDE (designed to be used for creative endeavors by people
without a deep technical background
i. Verify button (compiles your code)
ii. Run button (compiles your code and send it to the microcontroller)
iii. Serial monitor = primary debugging tool
iv. Programmed in C++
5. GOALS AND REVIEW
a. What is the setup() function typically used for? When and how
often does it run?
b. What is the loop() function used for? When/how does it run?
c. How do Timer objects work?
d. How does the Serial.print() work?
e. What is S erial.begin() and where/why is it used?
f. What does the d elay() command do?
g. What does the m illis() command do?
h. What are the methods of the R GB object and how do they work?
i. What are the S tring methods?
j. Write a sketch that controls the RGB LED.
k. Perform basic string operations.
l. Use p rint and p rintln methods to debug the Duo.

MODULE 5: STUDIO NOTES


1. System_MODE(MANUAL); //So it wont try to hook up to WiFi

MODULE 5: ASSIGNMENT NOTES


1. Event driven programming: critical concept in User interfaces
a. You write code that would run in response to an event(ie timer
expiring, a click, or change in input)
b. hardware(the interrupt in Systes Programming and Unix Signals
are common types of events)
2. State: concept used in cs to designate a few different concepts
a. The internal condition of a thing; corresponds to both the way
the term is used in Object Oriented Programming (OOP) and
when describing Finite State Machines
b. Many IoT products maintain some sort of internal state. This state
may change due to external forces or internals forces. In this
assignment well explore both.
c. State in compute programs usually is about maintaining and
updating the specific values of variables over time. You may need
to create several (global) variables to keep track of the current
condition (as well as a past or future condition) of the system.

MODULE 6: PREP NOTES


1. BLE
a. New Applications
i. Wearables
ii. Embedded smarts
b. Needs
i. Simple to Setup
ii. Networking w/Long Battery LIfe (low power)
c. Significantly different from Classic Bluetooth (different use-cases;
different PHY/packets/etc.)
d. SUCCESS
i. Deployment of Dual Mode devices in mobile (Dual Mode
supports Bluetooth Classic and LE)
ii. Suitable rapid prototyping tools (Certified RF solutions,
Complete software stacks)
iii. Flexibility (new use-cases: low power/throughput)
e. CHALLENGES
i. Many Devices in Same Area
ii. How do we Discover the one(s) we want?
iii. Different Data Needs
iv. Data Types Vary
v. Sending vs. Receiving
vi. Polling vs. Pushed Notifications
f. Advertising
i. Send a small message that can contain
1. Name
2. Description of features (services)
3. Data
g. Scanning
i. Listening
1. Set period of time or regular intervals
2. May filter for interesting services and previously
used devices
h. Communication Roles
i. Broadcaster & Observer
1. Connectionless/one-way communication
advertisement contains data for location
2. One to many
ii. Central & pEripheral
1. Peripheral advertises
2. Advertisement describes features
3. Central can respond to form a connection
4. Central to MANY peripherals (Star topology) Ex.
phone
i. Data Needs
i. Clients/Servers
1. Clients have services (data/control) of interest
2. Connected roles
a. either/both central/peripheral
can be client/server
j. Services
i. Provide a focused feature
ii. A group of characteristics
(Data, type and permissions) may allso
have additional descriptive data called
descriptors
iii. Standardized services for many common needs
iv. Standardized by the Bluetooth SIG
v. Std. Services allow interoperability
vi. Custom servies can be created for new needs
vii. Design and data format up to creator
viii. May publish make open so it can be used by others
without it being an official standard
k. Characteristic
i. The data for the service
ii. Include a data type
iii. permissions/behaviors/style:
iv. Readable, writeable, indicatable
v. Limits on data size
l. Data Type
i. Numbers??
1. UUID: Universally Unique Identifier
2. Represent data type and service type
3. Used in advertisements(for services) and
characteristics
4. 16-bit are used for standard thigns
a. Maintained by the Bluetooth SIG
5. Custom things can use a random 128-bit
2. Sequence diagrams: provide a conceptual and visual representation of
a sequence of transactions between different entitites
a. Model the exchange of messages between a mobile device and a
thing or a sequence of events and responses
b. Primarily to understand what were trying to construct before
actually starting to implement it
3. Unified Modelling Language (UML) commonly used to descrube
software engineering projects; it gives software developers a simple,
visual way to represent complex aspects of software; often this is used
tin the planning stage of projects and can allow developers to discuss
and compare design decisions
4. GOALS AND REVIEW
a. What is a UUID and where are they used?
b. What is a Service?
c. What is a Characteristic?
d. Explain the BLE roles: Observer vs. Broadcaster & Central vs.
Peripheral.
e. Explain the difference between client and server.
f. Are there limitations on BLE Centrals and Peripherals with regard
to clients and servers? Explain.
g. What is a sequence diagram and what information does it
convey?
h. Limitations of BLE (general understanding of limits on
throughput, size of data in characteristics, range, etc.)
MODULE 6 NOTES
1. What functions are used to scan for devices and how they use
callbacks.
2. What functions are used to connect and disconnect with devices.
3. What functions are used to read and write data to devices. Pay close
attention to the examples of how to use the functions
4. RSSI (signal strength)

10
1. Servo
a. Horns are the white plastic pieces that fit onto
the gear
b. Follows the JR color codes
2. OLED setup
3. Piezo buzzer and 1k resistor
a. The duo operates at 3V, the buzzer operates
at 5v
i. Transistor will act like a
switch that the Duo can activate via one
of its 3V outputs
ii. The resistor is used to limit the current
supplied by the Duo to a level thats safe for the Duo

You might also like