- Normally, programs have sequential control flow
- However, more complex problems require decisions
- Conditionals are how we can make some code execute under some condition(s) and/or other, different code to execute under other conditions
if-statements,if-elsestatements,if-else-ifstatements- Conditionals rely on some logical condition
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Name: Chris Bourke | |
| * | |
| * CSCE 155E Midterm | |
| * | |
| * Write a full program to determine if two circles intersect. | |
| * Details are provided in the midterm handout. | |
| */ | |
| #include <stdlib.h> | |
| #include <stdio.h> |
Goal: overviewing over I2c, serial, and SPI communication protocol. Impotance of communication protocol
- There are multiple microcontroller, and programming language like C, Java, C++,...
- Each has it own strength and weaknesses.
- Question arrive:
How can all programming language and microcontroller be unite?How can they work together to create one piece of technology? - follow up example: If one person is good at C programming languague(Arduino), and one is good at Python(raspberry pi) then how can they work together to create one piece of technology?
- Through universal communication. 3 main:
-
COmbination of FAST feature detector and BRIEF descriptor algorithm
- FAST(Features from Accelerated Segment Test) is a corner deteion algorithm that helps find keypoint.
- BRIEF is a feature descriptor calculation and matching.(descriptor tell what is unique about a keypoint)
-
Theory behind FAST: choose a pixel
p. check n surrounding pixels(see image below).pis a corner if there exist a set ofn-numberscontigous pixel in the circle which are brighter thanp. The idea is that outer corner is brighter thanp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| classes = ['dogs','cats'] | |
| num_classes = len(classes) | |
| # refer to this link for why need this complicated path declaration | |
| # https://stackoverflow.com/questions/37619246/python-glob-glob-always-returns-empty-list | |
| train_path = '/home/*datduyn/*Documents/*dataset/*dog-cat/*training_set/' | |
| #validation split |
Section
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * This program interact the electron with thingspeak, send data | |
| * @author Dat Nguyen | |
| * Date: 3/7/18 | |
| */ | |
| #include <ThingSpeak.h> | |
| #include <Wire.h> | |
| #include "Particle.h" | |
| #include <stdlib.h> |