click below
click below
Normal Size Small Size show me how
Programming Terms
| Term | Definition |
|---|---|
| int | integer (no decimals) [data type] |
| unsigned int | no negative numbers [data type] |
| long | ranges from -2M to 2M (more memory than int) [data type] |
| float | allows decimals [data type] |
| byte | 0-255 (less memory than int) [data type] |
| boolean | true(1, high)/false(0,low) [data type] |
| char | allows for ASCII [data type] |
| // loram ipsum | makes comments on single lines |
| /* loram ipsum */ | makes comments on multiple lines |
| ; | statement is finished |
| { } | execute only under specific circumstances |
| function | performs task |
| data type | specifies what can go into variable |
| digitalWrite(_,_) | pin#, state (high vs low); turns on/off pin [function] |
| digitalRead(_) | pin#, check state and return value [function] |
| millis() | no argument needed, takes millisecond sketch has been in place |
| setup() {} | critical function, no argument; no return (runs what's in curly bracket one time) [function] |
| loop() { } | critical function, no argument; returns (runs what's in curly brackets repeatedly) [function] |
| void | goes in front of setup() and loop() or other functions; means it does not return. |
| pinMode(_,_) | sets the pin as input or output (#, input/output) |
| delay(_) | allows you to set delay to remain in a state in milliseconds |
| GND | should be connected to cathode (short side) |
| cathode | shorter side of LED |
| anode | longer side of LED |
| variable { } | global variable, in place for entire code, more memory |
| { variable } | local variable, in place only for { }, less memory |
| duty cycle | 0, 64, 128, 192, 255 (0-100% of voltage); used in analogWrite(#, _) |
| PWM | pulse width modulation; switches voltage quickly |
| hard coded numbers | use variables instead |
| how to set variable | datatype name = number |
| most common baud rate | 9600 |
| Serial.begin(_) | used to set baud (typically 9600) |
| Serial.print("_") | used to put text on the serial monitor |
| Serial.println(_) | used to display return on serial monitor but returns a new line |
| Serial monitor | displays data return of the circuitboard |
| Multiple components require GND | GND to - on circuit board, jumper wires to - |
| Multiple components requiring power | Power to +, jumper wires to + |
| resistors | connect to power |
| analogWrite(_,_) | takes pin number and duty cycle; sets voltage level through duty cycle |
| II | boolean operator for if statements for "or" |
| && | boolean operator for if statements for "and" |
| ! | boolean operator for if statements for "not" |
| >= | comparison operator for "greater than or equal to" |
| <= | comparison operator for "less than or equal to" |
| == | comparison operator for "equal to" |
| != | comparison operator for "not equal to" |