<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-CN">
		<id>http:///https//wiki.microduino.cn/index.php?action=history&amp;feed=atom&amp;title=Somatosensory_interaction_-_Microduino_V1</id>
		<title>Somatosensory interaction - Microduino V1 - 版本历史</title>
		<link rel="self" type="application/atom+xml" href="http:///https//wiki.microduino.cn/index.php?action=history&amp;feed=atom&amp;title=Somatosensory_interaction_-_Microduino_V1"/>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=Somatosensory_interaction_-_Microduino_V1&amp;action=history"/>
		<updated>2026-04-30T02:54:53Z</updated>
		<subtitle>本wiki的该页面的版本历史</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>https//wiki.microduino.cn/index.php?title=Somatosensory_interaction_-_Microduino_V1&amp;diff=2730&amp;oldid=prev</id>
		<title>Pkj：Created page with &quot;{{Language | 体感互动-Microduino V1}} {| style=&quot;width: 800px;&quot; |- | ==Objective== This tutorial will teach you using the Microduino V1 module to control the movement of a ...&quot;</title>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=Somatosensory_interaction_-_Microduino_V1&amp;diff=2730&amp;oldid=prev"/>
				<updated>2014-05-19T13:05:28Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{Language | 体感互动-Microduino V1}} {| style=&amp;quot;width: 800px;&amp;quot; |- | ==Objective== This tutorial will teach you using the Microduino V1 module to control the movement of a ...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Language | 体感互动-Microduino V1}}&lt;br /&gt;
{| style=&amp;quot;width: 800px;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
==Objective==&lt;br /&gt;
This tutorial will teach you using the Microduino V1 module to control the movement of a smile face in Processing.&lt;br /&gt;
&lt;br /&gt;
==Equipment==&lt;br /&gt;
*'''[[Microduino-Core]]'''&lt;br /&gt;
*'''[[Microduino-FT232R]]'''&lt;br /&gt;
'''[[Microduino-V1]]'''&lt;br /&gt;
*Other equipment&lt;br /&gt;
**USB cable           one  &lt;br /&gt;
&lt;br /&gt;
==Schematic==&lt;br /&gt;
&lt;br /&gt;
Use Microduino-V1 to control&lt;br /&gt;
&lt;br /&gt;
==Program==&lt;br /&gt;
&lt;br /&gt;
Refers to ProcessingMicroduinoV1&lt;br /&gt;
&lt;br /&gt;
ProcessingMicroduinoV1Arduino&lt;br /&gt;
&lt;br /&gt;
==Debug==&lt;br /&gt;
Step 1：Set up hardware system, as follows:&lt;br /&gt;
[[File:ProcessingMicroduinoV1ConnectionDiagram.jpg|600px|center|thumb]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Step 2: Explain the code:&lt;br /&gt;
&lt;br /&gt;
This example needs two parts code, one is Processing and the other is Microduino.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Microduino:&lt;br /&gt;
&lt;br /&gt;
//Check if which button was pressed, and send the result to Processing.&lt;br /&gt;
  if(button&amp;lt;40)&lt;br /&gt;
    key_up=2;&lt;br /&gt;
  else if(button&amp;gt;50&amp;amp;&amp;amp;button&amp;lt;100)&lt;br /&gt;
    key_up=4;&lt;br /&gt;
  else if(button&amp;gt;138&amp;amp;&amp;amp;button&amp;lt;141)&lt;br /&gt;
    key_up=1;&lt;br /&gt;
  else if(button&amp;gt;358&amp;amp;&amp;amp;button&amp;lt;361)&lt;br /&gt;
    key_up=3;&lt;br /&gt;
  else if(button&amp;gt;228&amp;amp;&amp;amp;button&amp;lt;231)&lt;br /&gt;
    key_up=5;&lt;br /&gt;
&lt;br /&gt;
Processing:&lt;br /&gt;
&lt;br /&gt;
//Get the first serial port data,&lt;br /&gt;
// is always my  Arduino, so I open Serial.list()[0].&lt;br /&gt;
// Open whatever port is the one you're using.&lt;br /&gt;
  myPort = new Serial(this, Serial.list()[0], 9600);&lt;br /&gt;
  myPort.bufferUntil('\n'); // Trigger a SerialEvent on new line&lt;br /&gt;
&lt;br /&gt;
//Use the ddat the Microduino sent to control the movement of smile face.&lt;br /&gt;
&lt;br /&gt;
  if (val != null) {&lt;br /&gt;
    val = trim(val);&lt;br /&gt;
    println(val);&lt;br /&gt;
    buttonValue=Integer.parseInt(val);&lt;br /&gt;
    switch(buttonValue) {&lt;br /&gt;
    case 1:&lt;br /&gt;
      yPos++;&lt;br /&gt;
      break;&lt;br /&gt;
    case 2:&lt;br /&gt;
      xPos--;&lt;br /&gt;
      break;&lt;br /&gt;
    case 3:&lt;br /&gt;
      xPos=400;&lt;br /&gt;
      yPos=200;&lt;br /&gt;
      break;&lt;br /&gt;
    case 4:&lt;br /&gt;
      xPos++;&lt;br /&gt;
      break;&lt;br /&gt;
    case 5:&lt;br /&gt;
      yPos--;  &lt;br /&gt;
      break;&lt;br /&gt;
    default :&lt;br /&gt;
    }&lt;br /&gt;
    image(face, xPos, yPos);&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Step 3: Compile the code and download it.&lt;br /&gt;
&lt;br /&gt;
Step 4：After running, put Microduino V1's button, observe the smile face's movement.&lt;br /&gt;
&lt;br /&gt;
==Result==&lt;br /&gt;
You can use the button to control the smile face, as follows:&lt;br /&gt;
[[File:ProcessingMicroduinoV1Result.jpg|600px|center|thumb]]&lt;br /&gt;
&lt;br /&gt;
==Video==&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Pkj</name></author>	</entry>

	</feed>