Changes

no edit summary
Line 42: Line 42:     
== Connecting to an Arduino ==
 
== Connecting to an Arduino ==
Step 1: Download the Arduino IDE from <nowiki>https://www.arduino.cc/en/software</nowiki>,. Make sure to choose the version that is appropriate for your operating system.  
+
Step 1: Download the Arduino IDE from https://www.arduino.cc/en/software. Make sure to choose the version that is appropriate for your operating system.  
    
Step 2: Connect the Arduino to your computer via an A/B type USB cable.  
 
Step 2: Connect the Arduino to your computer via an A/B type USB cable.  
Line 48: Line 48:  
Step 3: Once the Arduino is connected, your computer will recognize the Arduino board as a generic COM port. The power LEDs onboard the Arduino should light up.  
 
Step 3: Once the Arduino is connected, your computer will recognize the Arduino board as a generic COM port. The power LEDs onboard the Arduino should light up.  
   −
Step 4: Time to find out what port number is assigned so that the Arduino and computer can properly communicate with one another. To do so, go to “Device Manager” in your computer settings and look for a device under “Ports (COM & LPT)”. The COM number should be shown beside the USB name.
+
Step 4: Time to find out what port number is assigned so that the Arduino and computer can properly communicate with one another. in the IDE select Tools > Ports > Select a port. If even after selecting the port the Arduino doesn't connect, try a different port.
    
Step 5: Open the Arduino IDE. Under Tools>Board, ensure that the correct type of Arduino board  is selected.  
 
Step 5: Open the Arduino IDE. Under Tools>Board, ensure that the correct type of Arduino board  is selected.  
Line 55: Line 55:     
==== Possible bugs: ====
 
==== Possible bugs: ====
The Arduino may not be recognized automatically, in which case, the following procedure adapted from: <nowiki>https://www.arduino.cc/en/Guide/ArduinoUno</nowiki> should be followed.
  −
   
If you're having trouble with your Arduino, refer to this guide: [[Arduino troubleshooting|'''Arduino troubleshooting''']]
 
If you're having trouble with your Arduino, refer to this guide: [[Arduino troubleshooting|'''Arduino troubleshooting''']]
   Line 106: Line 104:  
A few features to note is the baud rate and auto scroll functionality. The baud rate must match the one dictated in the program, this value dictates that rate that the Arduino and IDE communicate with each other.  
 
A few features to note is the baud rate and auto scroll functionality. The baud rate must match the one dictated in the program, this value dictates that rate that the Arduino and IDE communicate with each other.  
 
   
 
   
[[File:Tempsnip.png|center|thumb|808x808px]]  
+
[[File:Tempsnip.png|center|thumb|808x808px]]When using the serial monitor it must be initialized for a specific baud rate as follows:
 +
Void Setup {
 +
 
 +
Serial.begin(9600);  //this initializes the monitor at a baud rate of 9600 }
 +
 
 +
 
 +
There are a few different ways to output values on to the serial monitor for example when wanting to output the value held by a variable the following syntax can be used:
 +
Serial.print(variable_name):
 +
 
 +
Serial.println(variable_name); //for outputting each value on a new line
 +
 
 +
 
 +
Alternatively, when wanting to output a string or phrase the following syntax can be used:
 +
Serial.print("INSERT PHRASE");
 +
 
 +
Serial.println("INSERT PHRASE"); //for outputting each value on a new line
    
=== Introduction Libraries ===
 
=== Introduction Libraries ===
MakerRepo Staff, MakerRepo Volunteers
240

edits