Difference between revisions of "User:DukeEgr93/Arduino 110"

From PrattWiki
Jump to navigation Jump to search
Line 89: Line 89:
 
* The second cable will go from channels 2/3/4 on the BOE Shield to P2/P3/P4 on the PDT.  The black wire should be on pin 2 of the BOE Shield and in the sixth-from-the-bottom socket on the PDT.  The white wire should be on pin 4 of the BOE Shield and in the fourth-from-the-bottom socket on the PDT.
 
* The second cable will go from channels 2/3/4 on the BOE Shield to P2/P3/P4 on the PDT.  The black wire should be on pin 2 of the BOE Shield and in the sixth-from-the-bottom socket on the PDT.  The white wire should be on pin 4 of the BOE Shield and in the fourth-from-the-bottom socket on the PDT.
 
[[File:BOEShieldHeaders_A110.jpeg|thumb|Note that the left header here is connected the the header on the right in the PDT picture]][[File:PDTHeaders_A110.jpeg|thumb]]
 
[[File:BOEShieldHeaders_A110.jpeg|thumb|Note that the left header here is connected the the header on the right in the PDT picture]][[File:PDTHeaders_A110.jpeg|thumb]]
 +
<br clear=all>
 +
=== Programs ===
 +
==== OneBitCounter.ino ====
 +
<source lang=arduino>
 +
void setup() {               
 +
  pinMode(2, OUTPUT);      // set pin 2 to output mode
 +
  digitalWrite(2, LOW);    // set pin 2 to LOW voltage
 +
}
 +
 +
void loop() {
 +
  delay(500);              // wait for 0.5 sec
 +
  digitalWrite(2, HIGH);  // set pin 2 to HIGH - light 0 on
 +
  delay(500);              // wait for 0.5 sec
 +
  digitalWrite(2, LOW);    // set pin 2 to LOW - light 0 off
 +
}
 +
</source>

Revision as of 19:42, 23 December 2013

This page will serve as development space for the ECE 110 conversion to Arduinos.

Document Preparation

Section Completion
Section Last Update Status Notes
Preface 12/19/2013 Ready
Updates 12/19/2013 Ready removed
Acknowledgments 12/19/2013 Ready
Lab 1 12/19/2013


Lab 1

Connecting the Parallax Digital Trainer to the BOE Shield

This requires two male-to-male 3-header cables.

  • The first cable will go from channels GND/13/12 on the BOE Shield to channels GND/P0/P1 on the PDT. The black wire should be on GND; for the BOE Shield, that is the second-to-leftmost pin on the top bus while for the PDT, that is the fourth pin from the top on the left of the socket.
  • The second cable will go from channels 2/3/4 on the BOE Shield to P2/P3/P4 on the PDT. The black wire should be on pin 2 of the BOE Shield and in the sixth-from-the-bottom socket on the PDT. The white wire should be on pin 4 of the BOE Shield and in the fourth-from-the-bottom socket on the PDT.
Note that the left header here is connected the the header on the right in the PDT picture
PDTHeaders A110.jpeg


Programs

OneBitCounter.ino

void setup() {                
  pinMode(2, OUTPUT);       // set pin 2 to output mode
  digitalWrite(2, LOW);     // set pin 2 to LOW voltage
}

void loop() {
  delay(500);              // wait for 0.5 sec
  digitalWrite(2, HIGH);   // set pin 2 to HIGH - light 0 on
  delay(500);              // wait for 0.5 sec
  digitalWrite(2, LOW);    // set pin 2 to LOW - light 0 off
}