click below
click below
Normal Size Small Size show me how
Arduino
Question | Answer |
---|---|
<Servo.h> | Used to access the functions in the Servo library which allows control of motors |
<MINDSi.h> | Used to access to the functions in the MINDSi library which allows control of transmitter and receiver |
Servo steer; | Declare steer as a variable that is associated with a Servo motor |
int driveSig; | Declare driveSig as an integer variable for storing integer values |
void setup(){ } | Function that runs one time and gets everything ready |
void loop(){ } | Function that runs continuously and allows for constant updating |
drive.attach(12); | Associates the motor called drive with pin 12 |
steer.write(90); | Gives the value of 90 to the motor named steer; the value represents location to turn to or the speed to turn at |
delay(2000); | Waits 2 seconds to allow commands to complete execution |
Serial.begin(9600); | Start a serial connection for the transmitter and receiver of 9600 baud(speed of signal transmission) |
driveSig = getRadio(2); | Get the radio signal from pin 2 and store the value in the variable driveSig |
4 Sections of a program(in order) | Include, Declaration, Setup, Loop |
steer.write(steerSig); | Gives the value stored in the variable steerSig to the motor named steer; the value represents location to turn to or the speed to turn at |
#include | used to give your sketch program access to outside |
Declarations | Associating names and data types to storage locations in memory |