diff --git a/Accel Gyro/ReadArduinoSequentialBlink.c b/Accel Gyro/ReadArduinoSequentialBlink.c index 65e6dc1..2698b41 100644 --- a/Accel Gyro/ReadArduinoSequentialBlink.c +++ b/Accel Gyro/ReadArduinoSequentialBlink.c @@ -28,7 +28,8 @@ #include "drivers/hitechnic-protoboard.h" task main() { - int _chVal = 0; + int _chVal = 0; // analog input + byte inputs = 0; // all digital inputs nxtDisplayCenteredTextLine(0, "HiTechnic"); nxtDisplayCenteredBigTextLine(1, "Proto"); @@ -67,6 +68,8 @@ task main() { j++; } + inputs = HTPBreadIO(HTPB, 0x3F); + nxtDisplayTextLine(5, "D: 0x%x", inputs); wait1Msec(100); } diff --git a/Accel Gyro/SequentialBlink/SequentialBlink.ino b/Accel Gyro/SequentialBlink/SequentialBlink.ino index b626e03..29f0c26 100644 --- a/Accel Gyro/SequentialBlink/SequentialBlink.ino +++ b/Accel Gyro/SequentialBlink/SequentialBlink.ino @@ -5,23 +5,22 @@ This example code is in the public domain. */ -// Pin 13 has an LED connected on most Arduino boards. -// give it a name: -int led = 8; + // the setup routine runs once when you press reset: void setup() { // initialize the digital pin as an output. - for (int i = 0; i < 5; i++) + for (int dPin = 0; dPin < 9; dPin++) { - pinMode(i, OUTPUT); - } + pinMode(dPin, OUTPUT); + } } // the loop routine runs over and over again forever: void loop() { - int dPin; - for (dPin = 0; dPin < 5; dPin++) + + + for (int dPin = 0; dPin < 9; dPin++) { digitalWrite(dPin, HIGH); delay(100);