ESP - Week 1 Flashcards
What is an embedded system
A combination of hardware and software which together form a larger machine
Sensors
Temperature Humidity Touch Mic Camera
Actuators
Lights Motors Wheels Screens Sirens
Microcontroller Advantages
Small
Cheap
Can make lots
Standalone
Microcontroller Disadvantages
Cheap
Limited Memory
Limited Power
Limited Storage
3 Types of Arduino Memory
SRAM - volatile, stores variables, read-write
Flash - non-volatile, stores code, read-only when running
EEPROM - non-volatile, stores data, read-write
What is the significance of non-volatile memory
Non-volatile memory stays when the power is off
P to C colons and indentation
Python uses colons to open a function, C uses {}
P to C semicolons
C uses ; at the end of lines
Declarations in C
Every variable must be declared before use
0x - hex, B - binary
Size of ints
byte - 8 bit int - 16 bit long - 32 bit float - 32 bit double - 64 bit float
Default bool type in C
No bool type, integers are used instead
Comments in C
// - single line /* */ - multi line
Switch statement
switch (variable) { - starts switch loop
case 1: - if 1 = variable case 1 is used
break; - breaks the loop
default: - if no case is used
break;
}