<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://wiki.zenerves.net/skins/common/feed.css?301"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
		<id>http://wiki.zenerves.net/index.php?action=history&amp;feed=atom&amp;title=TripleMutexwithTouchandDistance</id>
		<title>TripleMutexwithTouchandDistance - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.zenerves.net/index.php?action=history&amp;feed=atom&amp;title=TripleMutexwithTouchandDistance"/>
		<link rel="alternate" type="text/html" href="http://wiki.zenerves.net/index.php?title=TripleMutexwithTouchandDistance&amp;action=history"/>
		<updated>2026-05-13T10:04:41Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.17.0</generator>

	<entry>
		<id>http://wiki.zenerves.net/index.php?title=TripleMutexwithTouchandDistance&amp;diff=48&amp;oldid=prev</id>
		<title>Admin: 1 revision</title>
		<link rel="alternate" type="text/html" href="http://wiki.zenerves.net/index.php?title=TripleMutexwithTouchandDistance&amp;diff=48&amp;oldid=prev"/>
				<updated>2011-10-14T20:49:23Z</updated>
		
		<summary type="html">&lt;p&gt;1 revision&lt;/p&gt;
&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='1' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='1' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 20:49, 14 October 2011&lt;/td&gt;
		&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://wiki.zenerves.net/index.php?title=TripleMutexwithTouchandDistance&amp;diff=47&amp;oldid=prev</id>
		<title>Lola at 17:39, 15 April 2011</title>
		<link rel="alternate" type="text/html" href="http://wiki.zenerves.net/index.php?title=TripleMutexwithTouchandDistance&amp;diff=47&amp;oldid=prev"/>
				<updated>2011-04-15T17:39:15Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt; mutex moveMutex; &lt;br /&gt;
 &lt;br /&gt;
 task move_square()&lt;br /&gt;
 {&lt;br /&gt;
  while (true)&lt;br /&gt;
  {&lt;br /&gt;
    Acquire(moveMutex);&lt;br /&gt;
    OnFwd(OUT_AC, 55); Wait(1000);&lt;br /&gt;
    OnRev(OUT_C, 50); Wait(500);&lt;br /&gt;
    Release(moveMutex);&lt;br /&gt;
  }&lt;br /&gt;
 }  &lt;br /&gt;
 &lt;br /&gt;
 task check_sensors()&lt;br /&gt;
 {&lt;br /&gt;
  while (true)&lt;br /&gt;
  {&lt;br /&gt;
    if (SENSOR_1 == 1)&lt;br /&gt;
    {&lt;br /&gt;
      Acquire(moveMutex);&lt;br /&gt;
      OnRev(OUT_AC, 15); Wait(3000);&lt;br /&gt;
      Release(moveMutex);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
 } &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Snippets]]&lt;br /&gt;
 &lt;br /&gt;
 task closeup()&lt;br /&gt;
 {&lt;br /&gt;
  while(true)&lt;br /&gt;
  {&lt;br /&gt;
   while(SensorUS(IN_4)&amp;gt;15);&lt;br /&gt;
   Acquire(moveMutex);&lt;br /&gt;
   Off(OUT_AC);&lt;br /&gt;
   OnRev(OUT_C,100);&lt;br /&gt;
   Wait(800);&lt;br /&gt;
   Release(moveMutex);&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 task main()&lt;br /&gt;
 {&lt;br /&gt;
  SetSensor(IN_1,SENSOR_TOUCH);&lt;br /&gt;
  SetSensorLowspeed(IN_4);&lt;br /&gt;
  Precedes(check_sensors, move_square, closeup);&lt;br /&gt;
 }&lt;/div&gt;</summary>
		<author><name>Lola</name></author>	</entry>

	</feed>