<?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=EBB_Notes_3</id>
	<title>EBB Notes 3 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.extremist.software/index.php?action=history&amp;feed=atom&amp;title=EBB_Notes_3"/>
	<link rel="alternate" type="text/html" href="https://wiki.extremist.software/index.php?title=EBB_Notes_3&amp;action=history"/>
	<updated>2026-04-05T00:31:12Z</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=EBB_Notes_3&amp;diff=16788&amp;oldid=prev</id>
		<title>Rbelknap: added category tag</title>
		<link rel="alternate" type="text/html" href="https://wiki.extremist.software/index.php?title=EBB_Notes_3&amp;diff=16788&amp;oldid=prev"/>
		<updated>2011-02-25T22:29:10Z</updated>

		<summary type="html">&lt;p&gt;added category tag&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 15:29, 25 February 2011&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-l113&quot;&gt;Line 113:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 113:&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;}&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;}&lt;/div&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;&amp;lt;/pre&amp;gt;&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;&amp;lt;/pre&amp;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>Rbelknap</name></author>
	</entry>
	<entry>
		<id>https://wiki.extremist.software/index.php?title=EBB_Notes_3&amp;diff=4493&amp;oldid=prev</id>
		<title>Rachel: New page: I (Rachel) moved the MAXsonar sensor circuit to my own boarduino, successfully. I copied Lamont&#039;s shift register/PWM circuit to my own boarduino, again (eventually) successfully.  So far t...</title>
		<link rel="alternate" type="text/html" href="https://wiki.extremist.software/index.php?title=EBB_Notes_3&amp;diff=4493&amp;oldid=prev"/>
		<updated>2009-04-13T19:38:20Z</updated>

		<summary type="html">&lt;p&gt;New page: I (Rachel) moved the MAXsonar sensor circuit to my own boarduino, successfully. I copied Lamont&amp;#039;s shift register/PWM circuit to my own boarduino, again (eventually) successfully.  So far t...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;I (Rachel) moved the MAXsonar sensor circuit to my own boarduino, successfully. I copied Lamont&amp;#039;s shift register/PWM circuit to my own boarduino, again (eventually) successfully.  So far this is mere sideways motion... but I have made actual progress in understanding the PWM code, so should soon be able to modify it to include the sensor.  Yay tiny progress!&lt;br /&gt;
&lt;br /&gt;
Current unsuccessful code that attempts to read the MAXsonar EZ1&amp;#039;s serial out:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;lt;ctype.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#define bit9600Delay 84  &lt;br /&gt;
#define halfBit9600Delay 42&lt;br /&gt;
#define bit4800Delay 188 &lt;br /&gt;
#define halfBit4800Delay 94 &lt;br /&gt;
#define PACKET_LENGTH 5&lt;br /&gt;
&lt;br /&gt;
byte rx = 2;&lt;br /&gt;
byte tx = 3;&lt;br /&gt;
byte SWval[PACKET_LENGTH];&lt;br /&gt;
&lt;br /&gt;
void setup() {&lt;br /&gt;
  pinMode(rx,INPUT);&lt;br /&gt;
  pinMode(tx,OUTPUT);&lt;br /&gt;
  digitalWrite(tx,HIGH);&lt;br /&gt;
  digitalWrite(13,HIGH); //turn on debugging LED&lt;br /&gt;
//  SWprint(&amp;#039;h&amp;#039;);  //debugging hello&lt;br /&gt;
//  SWprint(&amp;#039;i&amp;#039;);&lt;br /&gt;
//  SWprint(10); //carriage return&lt;br /&gt;
  Serial.begin(9600);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop() {&lt;br /&gt;
    Serial.println(&amp;quot;begin: &amp;quot;);&lt;br /&gt;
    &lt;br /&gt;
    // wait for the start of a packet&lt;br /&gt;
    int allLow = 1;&lt;br /&gt;
    while(!allLow) {&lt;br /&gt;
      allLow = 1;&lt;br /&gt;
      for(int i = 0; i &amp;lt; 10*10; ++i) {&lt;br /&gt;
         delayMicroseconds(bit9600Delay);&lt;br /&gt;
         if(digitalRead(rx) == HIGH) {&lt;br /&gt;
           allLow = 0;&lt;br /&gt;
         }&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    Serial.println(&amp;quot;p&amp;quot;);&lt;br /&gt;
    &lt;br /&gt;
    // read a packet&lt;br /&gt;
    for(int i = 0; i &amp;lt; PACKET_LENGTH; ++i) {&lt;br /&gt;
      SWval[i] = SWreadNi(); &lt;br /&gt;
    }&lt;br /&gt;
    Serial.println(&amp;quot;r&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
    // print the packet&lt;br /&gt;
    // TESTING shows that this bit is BROKEN.&lt;br /&gt;
    for(int i = 0; i &amp;lt; PACKET_LENGTH; ++i) {&lt;br /&gt;
      for(int j = 0; j &amp;lt; 8; ++i) {&lt;br /&gt;
        Serial.print( (SWval[i] &amp;gt;&amp;gt; j) &amp;amp; 1 );&lt;br /&gt;
      }&lt;br /&gt;
      Serial.print(&amp;quot; &amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
    Serial.println();&lt;br /&gt;
    Serial.println();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void SWprint(int data) {&lt;br /&gt;
  byte mask;&lt;br /&gt;
  //startbit&lt;br /&gt;
  digitalWrite(tx,LOW);&lt;br /&gt;
  delayMicroseconds(bit9600Delay);&lt;br /&gt;
  for (mask = 0x01; mask&amp;gt;0; mask &amp;lt;&amp;lt;= 1) {&lt;br /&gt;
    if (data &amp;amp; mask){ // choose bit&lt;br /&gt;
     digitalWrite(tx,HIGH); // send 1&lt;br /&gt;
    }&lt;br /&gt;
    else{&lt;br /&gt;
     digitalWrite(tx,LOW); // send 0&lt;br /&gt;
    }&lt;br /&gt;
    delayMicroseconds(bit9600Delay);&lt;br /&gt;
  }&lt;br /&gt;
  //stop bit&lt;br /&gt;
  digitalWrite(tx, HIGH);&lt;br /&gt;
  delayMicroseconds(bit9600Delay);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
int SWreadNi() {&lt;br /&gt;
  byte val = 0;&lt;br /&gt;
  while (digitalRead(rx) == LOW);&lt;br /&gt;
  //wait for start bit&lt;br /&gt;
  if (digitalRead(rx) == HIGH) {&lt;br /&gt;
    delayMicroseconds(halfBit9600Delay);&lt;br /&gt;
    for (int offset = 0; offset &amp;lt; 8; offset++) {&lt;br /&gt;
     delayMicroseconds(bit9600Delay);&lt;br /&gt;
     val |= (digitalRead(rx) &amp;lt;&amp;lt; offset);&lt;br /&gt;
    }&lt;br /&gt;
    //wait for stop bit + extra&lt;br /&gt;
//    delayMicroseconds(bit9600Delay); &lt;br /&gt;
//    delayMicroseconds(bit9600Delay);&lt;br /&gt;
    return ~val;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
int SWread() {&lt;br /&gt;
  byte val = 0;&lt;br /&gt;
  while (digitalRead(rx));&lt;br /&gt;
  //wait for start bit&lt;br /&gt;
  if (digitalRead(rx) == LOW) {&lt;br /&gt;
    delayMicroseconds(halfBit9600Delay);&lt;br /&gt;
    for (int offset = 0; offset &amp;lt; 8; offset++) {&lt;br /&gt;
     delayMicroseconds(bit9600Delay);&lt;br /&gt;
     val |= digitalRead(rx) &amp;lt;&amp;lt; offset;&lt;br /&gt;
    }&lt;br /&gt;
    //wait for stop bit + extra&lt;br /&gt;
    delayMicroseconds(bit9600Delay); &lt;br /&gt;
    delayMicroseconds(bit9600Delay);&lt;br /&gt;
    return val;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rachel</name></author>
	</entry>
</feed>