<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.extremist.software/index.php?action=history&amp;feed=atom&amp;title=Hack_Notes_CVA_090411</id>
	<title>Hack Notes CVA 090411 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.extremist.software/index.php?action=history&amp;feed=atom&amp;title=Hack_Notes_CVA_090411"/>
	<link rel="alternate" type="text/html" href="https://wiki.extremist.software/index.php?title=Hack_Notes_CVA_090411&amp;action=history"/>
	<updated>2026-04-05T08:14:34Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.13</generator>
	<entry>
		<id>https://wiki.extremist.software/index.php?title=Hack_Notes_CVA_090411&amp;diff=4434&amp;oldid=prev</id>
		<title>Elgreengeeto: /* Hella Progress */</title>
		<link rel="alternate" type="text/html" href="https://wiki.extremist.software/index.php?title=Hack_Notes_CVA_090411&amp;diff=4434&amp;oldid=prev"/>
		<updated>2009-04-12T08:21:26Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Hella Progress&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 01:21, 12 April 2009&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l308&quot;&gt;Line 308:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 308:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*I still really need to order all that stuff that we need to order already but haven&amp;#039;t yet...&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*I still really need to order all that stuff that we need to order already but haven&amp;#039;t yet...&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Sensebridge]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Elgreengeeto</name></author>
	</entry>
	<entry>
		<id>https://wiki.extremist.software/index.php?title=Hack_Notes_CVA_090411&amp;diff=4433&amp;oldid=prev</id>
		<title>Elgreengeeto: New page: (Skory&#039;s) Hacknotes 090411  =Hella Progress=  *Remade the pager motor array on a ribbon cable without plastic crimps and added two more pager motors. **It&#039;s plenty comfortable now, but I d...</title>
		<link rel="alternate" type="text/html" href="https://wiki.extremist.software/index.php?title=Hack_Notes_CVA_090411&amp;diff=4433&amp;oldid=prev"/>
		<updated>2009-04-12T08:20:20Z</updated>

		<summary type="html">&lt;p&gt;New page: (Skory&amp;#039;s) Hacknotes 090411  =Hella Progress=  *Remade the pager motor array on a ribbon cable without plastic crimps and added two more pager motors. **It&amp;#039;s plenty comfortable now, but I d...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;(Skory&amp;#039;s) Hacknotes 090411&lt;br /&gt;
&lt;br /&gt;
=Hella Progress=&lt;br /&gt;
&lt;br /&gt;
*Remade the pager motor array on a ribbon cable without plastic crimps and added two more pager motors.&lt;br /&gt;
**It&amp;#039;s plenty comfortable now, but I don&amp;#039;t like the spacing of the motors. Nothing is ever perfect! I might add a ninth motor (although I&amp;#039;ve already trimmed the ribbon cable and doing that would definitly be non-trivial!) or possibly resort to resoldering a couple current ones in different positions.&lt;br /&gt;
&lt;br /&gt;
*Built (well, really my dad did most of the work because he&amp;#039;s the one with a bandsaw) a plastic casing for the electronics. It definitely adds bulk, but it still fits in the external elastic pocket and there&amp;#039;s no way I could wear this thing without protecting all that hard work.&lt;br /&gt;
&lt;br /&gt;
*Borrowed a socket for the battery connector from the Sparkfun charger (it has three sockets I only need one to charge a battery...)&lt;br /&gt;
&lt;br /&gt;
*Added timing to the code so motors don&amp;#039;t just stay on forever if you aren&amp;#039;t moving around. Currently it just counts iterations through the main loop, which I timed at about 22 cycles per second. I have it set to stay on any one motor for no more than about 10 seconds, and to buzz once a minute if you haven&amp;#039;t moved. As long as you keep moving more than once every ten seconds it won&amp;#039;t shut off. I might mess around later with having the buzz duration diminish with time if you continue to not move. Here&amp;#039;s the code (sorry Eric it was too messy to leave your compass functions in there):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/* Skory &amp;amp; Eric&lt;br /&gt;
 * Compass Vibro-Anklet&lt;br /&gt;
 * We Rule, April 11, 2009&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/* Some code from:&lt;br /&gt;
 * 2009-03-24, pager motor test, lamont lucas&lt;br /&gt;
&lt;br /&gt;
Some Hitachi HM55B Compass reading code copied from: kiilo kiilo@kiilo.org&lt;br /&gt;
License:  http://creativecommons.org/licenses/by-nc-sa/2.5/ch/&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// define the pins used to run the shift registers &lt;br /&gt;
int enable_low = 10;  //enable outputs, low = on&lt;br /&gt;
int serial_in  = 12; &lt;br /&gt;
int ser_clear_low = 9;  //pulse low to zero out the shift buffer&lt;br /&gt;
int RCK  = 7;  //RCK, push the serial buffer to the outputs&lt;br /&gt;
int SRCK = 8;  //&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;math.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
//// define pins used to operate the digital compass (HM55B)&lt;br /&gt;
byte CLK_pin = 11;&lt;br /&gt;
byte EN_pin = 5;&lt;br /&gt;
byte DIO_pin = 4;&lt;br /&gt;
&lt;br /&gt;
int X_Data = 0;&lt;br /&gt;
int Y_Data = 0;&lt;br /&gt;
int angle;&lt;br /&gt;
unsigned long counter = 0;&lt;br /&gt;
int prev_motor = 1;&lt;br /&gt;
int curr_motor = 1;&lt;br /&gt;
int status;&lt;br /&gt;
unsigned long serialTimer = millis();&lt;br /&gt;
&lt;br /&gt;
int MotorStrength = 230;  // 255 = full power &lt;br /&gt;
&lt;br /&gt;
void setup() {&lt;br /&gt;
  pinMode(enable_low, OUTPUT);  // set shift register pins as outputs&lt;br /&gt;
  pinMode(serial_in, OUTPUT);&lt;br /&gt;
  pinMode(ser_clear_low, OUTPUT);&lt;br /&gt;
  pinMode(RCK, OUTPUT);&lt;br /&gt;
  pinMode(SRCK, OUTPUT);&lt;br /&gt;
  &lt;br /&gt;
  // use some serial for debugging&lt;br /&gt;
  Serial.begin(115200);&lt;br /&gt;
  Serial.println(&amp;quot;Setting up board&amp;quot;);&lt;br /&gt;
  &lt;br /&gt;
  // make sure we start out all off&lt;br /&gt;
  digitalWrite(enable_low, HIGH);&lt;br /&gt;
  // this should wipe out the serial buffer on the shift register&lt;br /&gt;
  digitalWrite(ser_clear_low, LOW);&lt;br /&gt;
  delay(100);   //delay in ms&lt;br /&gt;
  &lt;br /&gt;
  // the TPIC6b595 clocks work on a rising edge, so make sure they&amp;#039;re low to start.&lt;br /&gt;
  digitalWrite(RCK, LOW);&lt;br /&gt;
  digitalWrite(SRCK, LOW);&lt;br /&gt;
  &lt;br /&gt;
  digitalWrite(ser_clear_low, HIGH);   //we are now clear to write into the serial buffer&lt;br /&gt;
&lt;br /&gt;
  Serial.println(&amp;quot;Board is setup&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
  // setup for HM55B compass chip&lt;br /&gt;
  pinMode(EN_pin, OUTPUT);&lt;br /&gt;
  pinMode(CLK_pin, OUTPUT);&lt;br /&gt;
  pinMode(DIO_pin, INPUT);&lt;br /&gt;
&lt;br /&gt;
  HM55B_Reset();&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
void loop() {&lt;br /&gt;
  // make the compass get a reading&lt;br /&gt;
  &lt;br /&gt;
  HM55B_StartMeasurementCommand(); // necessary!!&lt;br /&gt;
  delay(40); // the data is ready 40ms later&lt;br /&gt;
  status = HM55B_ReadCommand();&lt;br /&gt;
  Serial.print(status); // read data and print Status&lt;br /&gt;
  Serial.print(&amp;quot; &amp;quot;);&lt;br /&gt;
  X_Data = ShiftIn(11); // Field strength in X&lt;br /&gt;
  Y_Data = ShiftIn(11); // and Y direction&lt;br /&gt;
  X_Data = X_Data * -1;  // In current rig, chip&lt;br /&gt;
  Y_Data = Y_Data * -1;  // is upside-down; compensate&lt;br /&gt;
  Serial.print(X_Data); // print X strength&lt;br /&gt;
  Serial.print(&amp;quot; &amp;quot;);&lt;br /&gt;
  Serial.print(Y_Data); // print Y strength&lt;br /&gt;
  Serial.print(&amp;quot; &amp;quot;);&lt;br /&gt;
  digitalWrite(EN_pin, HIGH); // ok deselect chip&lt;br /&gt;
  angle = 180 * (atan2(-1 * Y_Data , X_Data) / M_PI); // angle is atan( -y/x) !!!&lt;br /&gt;
  if (angle &amp;lt; 0) angle = (360 + angle); //offset neg angles&lt;br /&gt;
  Serial.print(angle); // print angle&lt;br /&gt;
  Serial.println(&amp;quot; &amp;quot;);&lt;br /&gt;
&lt;br /&gt;
  //Turn on the appropriate motor while keeping track of time&lt;br /&gt;
  curr_motor = CalcMotor(8, angle);&lt;br /&gt;
  if (curr_motor != prev_motor) { //if we changed angle enough&lt;br /&gt;
    TurnOnMotor(curr_motor);      //turn on the new motor&lt;br /&gt;
    counter = 0;                  //reset counter&lt;br /&gt;
  } else {&lt;br /&gt;
    if (counter &amp;lt; 250) {         //otherwise only keep&lt;br /&gt;
      TurnOnMotor(curr_motor);   //same motor on for&lt;br /&gt;
    } else {                     //less than 250 cycles&lt;br /&gt;
      TurnOnMotor(0);            //(it&amp;#039;s ~22 cycles / second)&lt;br /&gt;
    }&lt;br /&gt;
    counter++;                   //increment counter&lt;br /&gt;
    if (counter &amp;gt; 1320){&lt;br /&gt;
      counter = 0;               //reset counter after ~1 min.&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
  prev_motor = curr_motor;&lt;br /&gt;
&lt;br /&gt;
  Serial.println(counter);&lt;br /&gt;
&lt;br /&gt;
/*  //Debug wacky motor wiring disorder  &lt;br /&gt;
  count++;&lt;br /&gt;
  TurnOnMotor(count);&lt;br /&gt;
  Serial.print(count); // print angle&lt;br /&gt;
  Serial.println(&amp;quot;  &amp;quot;);&lt;br /&gt;
  delay(2000);&lt;br /&gt;
  if (count &amp;gt;= 8)&lt;br /&gt;
  {&lt;br /&gt;
    count = 0;&lt;br /&gt;
    delay(2000);&lt;br /&gt;
  }*/&lt;br /&gt;
  &lt;br /&gt;
  &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//// FUNCTIONS&lt;br /&gt;
&lt;br /&gt;
void TurnOnMotor(int which){&lt;br /&gt;
  // accept which from 1 to 8&lt;br /&gt;
  // send message to shift register as appropiate&lt;br /&gt;
  digitalWrite(enable_low, HIGH);&lt;br /&gt;
  delayMicroseconds(100);  //slow and steady&lt;br /&gt;
  Serial.print(&amp;quot;Motor  &amp;quot;);&lt;br /&gt;
  Serial.println(which); // print angle&lt;br /&gt;
  switch(which){&lt;br /&gt;
    case 1:&lt;br /&gt;
      shiftOut(serial_in, SRCK, LSBFIRST, B00000100);&lt;br /&gt;
      break;&lt;br /&gt;
    case 2:&lt;br /&gt;
      shiftOut(serial_in, SRCK, LSBFIRST, B00000001);&lt;br /&gt;
      break;&lt;br /&gt;
    case 3:&lt;br /&gt;
      shiftOut(serial_in, SRCK, LSBFIRST, B00001000);&lt;br /&gt;
      break;&lt;br /&gt;
    case 4:&lt;br /&gt;
      shiftOut(serial_in, SRCK, LSBFIRST, B00000010);&lt;br /&gt;
      break;&lt;br /&gt;
    case 5:&lt;br /&gt;
      shiftOut(serial_in, SRCK, LSBFIRST, B00010000);&lt;br /&gt;
      break;&lt;br /&gt;
    case 6:&lt;br /&gt;
      shiftOut(serial_in, SRCK, LSBFIRST, B00100000);&lt;br /&gt;
      break;&lt;br /&gt;
    case 7:  // not used in current armature&lt;br /&gt;
      shiftOut(serial_in, SRCK, LSBFIRST, B01000000);&lt;br /&gt;
      break;&lt;br /&gt;
    case 8:  // not used in current armature&lt;br /&gt;
      shiftOut(serial_in, SRCK, LSBFIRST, B10000000);&lt;br /&gt;
      break;&lt;br /&gt;
    case 9:&lt;br /&gt;
      shiftOut(serial_in, SRCK, LSBFIRST, B11111111);&lt;br /&gt;
      break;&lt;br /&gt;
    case 10:&lt;br /&gt;
      shiftOut(serial_in, SRCK, LSBFIRST, B11110000);&lt;br /&gt;
      break;&lt;br /&gt;
    case 11:&lt;br /&gt;
      shiftOut(serial_in, SRCK, LSBFIRST, B00001111);&lt;br /&gt;
      break;&lt;br /&gt;
    default:&lt;br /&gt;
      // turn them all off&lt;br /&gt;
      shiftOut(serial_in, SRCK, LSBFIRST, B00000000);&lt;br /&gt;
  } &lt;br /&gt;
  //in all cases, pulse RCK to pop that into the outputs&lt;br /&gt;
  delayMicroseconds(100);&lt;br /&gt;
  digitalWrite(RCK, HIGH);&lt;br /&gt;
  delayMicroseconds(100);&lt;br /&gt;
  digitalWrite(RCK, LOW);&lt;br /&gt;
  analogWrite(enable_low, 255-MotorStrength);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
int CalcAngle(int howMany, int which)&lt;br /&gt;
{  // function which calculates the &amp;quot;switch to next motor&amp;quot; angle&lt;br /&gt;
  // given how many motors there are in a circle and which position you want&lt;br /&gt;
  // assume which is 1-indexed (i.e. first position is 1, not zero)&lt;br /&gt;
  // assume circle is 0-360, we can always offset later...&lt;br /&gt;
  &lt;br /&gt;
  return (360/howMany*(which-0.5));&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
int CalcMotor(int howMany, int angle)&lt;br /&gt;
{  // function to calculate which motor to turn on, given&lt;br /&gt;
  // how many motors there are and what the current angle is&lt;br /&gt;
  // assumes motor 1 = angle 0&lt;br /&gt;
  // assumes angle is from 0-360&lt;br /&gt;
  int i;&lt;br /&gt;
  for (i = 1; i&amp;lt;howMany;i++)&lt;br /&gt;
  {&lt;br /&gt;
    if ( (angle &amp;gt;= CalcAngle(howMany, i)) &amp;amp; (angle &amp;lt;= CalcAngle(howMany, i+1)) )&lt;br /&gt;
       return i+1; &lt;br /&gt;
  } &lt;br /&gt;
  // if we&amp;#039;re still here, it&amp;#039;s the last case, the loop over case, which&lt;br /&gt;
  // is actually motor 1 by assumption&lt;br /&gt;
  return 1;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//HM55B Functions&lt;br /&gt;
&lt;br /&gt;
void ShiftOut(int Value, int BitsCount) {&lt;br /&gt;
  for(int i = BitsCount; i &amp;gt;= 0; i--) {&lt;br /&gt;
    digitalWrite(CLK_pin, LOW);&lt;br /&gt;
    if ((Value &amp;amp; 1 &amp;lt;&amp;lt; i) == ( 1 &amp;lt;&amp;lt; i)) {&lt;br /&gt;
      digitalWrite(DIO_pin, HIGH);&lt;br /&gt;
      //Serial.print(&amp;quot;1&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
    else {&lt;br /&gt;
      digitalWrite(DIO_pin, LOW);&lt;br /&gt;
      //Serial.print(&amp;quot;0&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
    digitalWrite(CLK_pin, HIGH);&lt;br /&gt;
    delayMicroseconds(1);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
int ShiftIn(int BitsCount) {&lt;br /&gt;
  int ShiftIn_result;&lt;br /&gt;
    ShiftIn_result = 0;&lt;br /&gt;
    pinMode(DIO_pin, INPUT);&lt;br /&gt;
    for(int i = BitsCount; i &amp;gt;= 0; i--) {&lt;br /&gt;
      digitalWrite(CLK_pin, HIGH);&lt;br /&gt;
      delayMicroseconds(1);&lt;br /&gt;
      if (digitalRead(DIO_pin) == HIGH) {&lt;br /&gt;
        ShiftIn_result = (ShiftIn_result &amp;lt;&amp;lt; 1) + 1; &lt;br /&gt;
      }&lt;br /&gt;
      else {&lt;br /&gt;
        ShiftIn_result = (ShiftIn_result &amp;lt;&amp;lt; 1) + 0;&lt;br /&gt;
      }&lt;br /&gt;
      digitalWrite(CLK_pin, LOW);&lt;br /&gt;
      delayMicroseconds(1);&lt;br /&gt;
    }&lt;br /&gt;
  //Serial.print(&amp;quot;:&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
// below is difficult to understand:&lt;br /&gt;
// if bit 11 is Set the value is negative&lt;br /&gt;
// the representation of negative values you&lt;br /&gt;
// have to add B11111000 in the upper Byte of&lt;br /&gt;
// the integer.&lt;br /&gt;
// see: http://en.wikipedia.org/wiki/Two%27s_complement&lt;br /&gt;
  if ((ShiftIn_result &amp;amp; 1 &amp;lt;&amp;lt; 11) == 1 &amp;lt;&amp;lt; 11) {&lt;br /&gt;
    ShiftIn_result = (B11111000 &amp;lt;&amp;lt; 8) | ShiftIn_result; &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  return ShiftIn_result;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void HM55B_Reset() {&lt;br /&gt;
  pinMode(DIO_pin, OUTPUT);&lt;br /&gt;
  digitalWrite(EN_pin, LOW);&lt;br /&gt;
  ShiftOut(B0000, 3);&lt;br /&gt;
  digitalWrite(EN_pin, HIGH);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void HM55B_StartMeasurementCommand() {&lt;br /&gt;
  pinMode(DIO_pin, OUTPUT);&lt;br /&gt;
  digitalWrite(EN_pin, LOW);&lt;br /&gt;
  ShiftOut(B1000, 3);&lt;br /&gt;
  digitalWrite(EN_pin, HIGH);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
int HM55B_ReadCommand() {&lt;br /&gt;
  int result = 0;&lt;br /&gt;
  pinMode(DIO_pin, OUTPUT);&lt;br /&gt;
  digitalWrite(EN_pin, LOW);&lt;br /&gt;
  ShiftOut(B1100, 3);&lt;br /&gt;
  result = ShiftIn(3);&lt;br /&gt;
  return result;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*I still really need to order all that stuff that we need to order already but haven&amp;#039;t yet...&lt;/div&gt;</summary>
		<author><name>Elgreengeeto</name></author>
	</entry>
</feed>