Computer Flashcards
A robot may not injure a
human being or through
inaction, allow a human being to come to harm
Law 1
A robot must obey orders
given to it by human beings, except where such orders would conflict with a higher order law
Law 2
A robot must protect its own existence as long as such protection does not conflict with a higher order law
Law 3
A robot may not injure
humanity, or, through
inaction, allow humanity to come to harm
Zeroth Law
1942
SHORT STORY run
1950
universal automation UNIMATE
1980
NXT Lego mindstorms
1990
Sony aibo
2000
Honda ASIMO (advance step in innovative mobility)
Robot characteristics
Energy, movement, sensing, intelligence
Ideal tasks
Dangerous task, repetitive task, high precision task
Used to write the Arduino code, provides you with a text-editor like environment for you to write your code
Arduino IDE
File generated or saved using the Arduino IDE
Sketch
Two functions of Arduino sketch
void setup() and void loop()
the section of computer codes that allows the
computer to perform a specific task
functions
generally included anywhere in the program, though not required but recommended to write a description or notes in the program
Comment
Two types of comments
Single line comment, Multiline comment
starts with // symbol and anything typed within
that line will be ignored by the compiler
Single line comment
start with /* and ends with */ then anything in
between this symbols will be considered as part of the comment
Multiline comment
function is used to set up a specific pin as either digital input or digital output
pinMode( ) function
pinMode( ) Function
pinMode(pin, MODE);
- pin (specific number of the pin it is connected in the board)
- MODE (INPUT, OUTPUT)
writes either HIGH or LOW value to a digital pin
digitalWrite( ) function
digitalWrite( ) function
digitalWrite(pin, VALUE);
- pin (the pin number)
- VALUE (HIGH, LOW)
causes the program to pause for a specific period of time in miliseconds before executing the next line of codes, One second is equivalent to 1000 milliseconds
delay() Function