Skip to content
This repository has been archived by the owner on Sep 12, 2018. It is now read-only.

Commit

Permalink
Sequential with 9 bits, tested
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel Cronin committed Apr 30, 2014
1 parent ea2a037 commit b811e31
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
5 changes: 4 additions & 1 deletion Accel Gyro/ReadArduinoSequentialBlink.c
Expand Up @@ -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");
Expand Down Expand Up @@ -67,6 +68,8 @@ task main() {
j++;

}
inputs = HTPBreadIO(HTPB, 0x3F);
nxtDisplayTextLine(5, "D: 0x%x", inputs);
wait1Msec(100);
}

Expand Down
15 changes: 7 additions & 8 deletions Accel Gyro/SequentialBlink/SequentialBlink.ino
Expand Up @@ -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);
Expand Down

0 comments on commit b811e31

Please sign in to comment.