<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-CN">
		<id>http:///https//wiki.microduino.cn/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Timeslider</id>
		<title>Microduino Wikipedia - 用户贡献 [zh-cn]</title>
		<link rel="self" type="application/atom+xml" href="http:///https//wiki.microduino.cn/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Timeslider"/>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php/%E7%89%B9%E6%AE%8A:%E7%94%A8%E6%88%B7%E8%B4%A1%E7%8C%AE/Timeslider"/>
		<updated>2026-04-21T11:30:18Z</updated>
		<subtitle>用户贡献</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>https//wiki.microduino.cn/index.php?title=Microduino_MPU6050_calculate_angle(Microduino_10dof)&amp;diff=2220</id>
		<title>Microduino MPU6050 calculate angle(Microduino 10dof)</title>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=Microduino_MPU6050_calculate_angle(Microduino_10dof)&amp;diff=2220"/>
				<updated>2014-04-24T13:04:08Z</updated>
		
		<summary type="html">&lt;p&gt;Timeslider：&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Language | Microduino MPU6050计算角度(Microduino 10dof)}}&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 how to use Microduino-10 dof module which has the MPU6050 sensors and can be used to calculate the x, y, and z axis angle, and display the value via OLED.&lt;br /&gt;
&lt;br /&gt;
==Equipment==&lt;br /&gt;
*'''[[Microduino-Core]]'''&lt;br /&gt;
*'''[[Microduino-FT232R]]'''&lt;br /&gt;
*'''[[Microduino-Cube-S1]]'''&lt;br /&gt;
*'''[[Microduino-10DOF]]'''&lt;br /&gt;
*'''[[Microduino-OLED]]'''&lt;br /&gt;
*Other equipment&lt;br /&gt;
**USB cable &lt;br /&gt;
&lt;br /&gt;
==Schematic==&lt;br /&gt;
[[File:MicroduinoMPU6050计算角度原理图.jpg|600px|center|thumb]]&lt;br /&gt;
&lt;br /&gt;
*Microduino-OLED&lt;br /&gt;
*Microduino-Core&lt;br /&gt;
*Microduino-10DOF&lt;br /&gt;
*Microduino-FT232R&lt;br /&gt;
*Microduino-Cube-S1&lt;br /&gt;
&lt;br /&gt;
==Program==&lt;br /&gt;
Refer to MPU6050AngleOLED https://github.com/Microduino/Microduino_Tutorials/tree/master/Microduino_Sensor/MPU6050AngleOLED&lt;br /&gt;
&lt;br /&gt;
There are many ways to calculate the angle by MPU6050. The corresponding algorithm is different, two types complex and simple, the result is different too, accurate and inaccurate. You can find several methods to calculate in internet, such as:&lt;br /&gt;
&lt;br /&gt;
*1：Kalman filter to calculate the angle, this algorithm is very complex, but the resutl is very accurate.&lt;br /&gt;
*2：DMP(Digital Motion Processing) to calculate the angle, using the quaternion and the algorithm is simple, but the result isn't better than kalman filter.&lt;br /&gt;
*3：Using acceleration integral arithmetic to calculate the angle, algorithm is the most simple, the result is coarser.&lt;br /&gt;
&lt;br /&gt;
This program will use the third method to calculate the angle. You also can try the DMP and kalman by yourself.&lt;br /&gt;
&lt;br /&gt;
==Debug==&lt;br /&gt;
&lt;br /&gt;
Step 1：Stack all the module, as follows:&lt;br /&gt;
[[File:MicroduinoMPU6050计算角度连接图.jpg|600px|center|thumb]]&lt;br /&gt;
&lt;br /&gt;
Step 2：Compile the program and download.&lt;br /&gt;
&lt;br /&gt;
Step 3：Swing module and watching the number on OLED&lt;br /&gt;
&lt;br /&gt;
==Result==&lt;br /&gt;
&lt;br /&gt;
Module rotates on three axis, and OLED displays the x, y, z axis angle change.&lt;br /&gt;
&lt;br /&gt;
==Video==&lt;br /&gt;
&lt;br /&gt;
http://v.youku.com/v_show/id_XNjk4NDIzMjQ0.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Timeslider</name></author>	</entry>

	<entry>
		<id>https//wiki.microduino.cn/index.php?title=%E8%AE%A8%E8%AE%BA:Lesson_16--Microduino_%22Fingertip_switch_(transistor_trigger)%22&amp;diff=777</id>
		<title>讨论:Lesson 16--Microduino &quot;Fingertip switch (transistor trigger)&quot;</title>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=%E8%AE%A8%E8%AE%BA:Lesson_16--Microduino_%22Fingertip_switch_(transistor_trigger)%22&amp;diff=777"/>
				<updated>2014-02-19T11:54:41Z</updated>
		
		<summary type="html">&lt;p&gt;Timeslider：Define resistor position&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Please define position of each resistor.&lt;/div&gt;</summary>
		<author><name>Timeslider</name></author>	</entry>

	<entry>
		<id>https//wiki.microduino.cn/index.php?title=Lesson_12--Microduino_%22Light_indicator%22&amp;diff=776</id>
		<title>Lesson 12--Microduino &quot;Light indicator&quot;</title>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=Lesson_12--Microduino_%22Light_indicator%22&amp;diff=776"/>
				<updated>2014-02-19T11:46:40Z</updated>
		
		<summary type="html">&lt;p&gt;Timeslider：Error correction&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| style=&amp;quot;width: 800px;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
==Objective==&lt;br /&gt;
In photoresistance experiment, The light is divided into two levels, strong or weak. This experiment will finish a light indictor using&lt;br /&gt;
4 LEDs and divides the light into 5 levels. Photoresistance receives the more light, and light up more LED to achieve the purpose of instruction.&lt;br /&gt;
&lt;br /&gt;
==Equipment==&lt;br /&gt;
*'''[[Microduino-Core]]'''&lt;br /&gt;
*'''[[Microduino-FT232R]]'''&lt;br /&gt;
*Other hardware equipment&lt;br /&gt;
**Breadboard Jumper            one box   &lt;br /&gt;
**Breadboard  	               one piece  &lt;br /&gt;
**Photoresistance              one&lt;br /&gt;
**LED Light-emitting diodes    four &lt;br /&gt;
**220Ω                         four&lt;br /&gt;
**10k resistor 	               one &lt;br /&gt;
**USB Data cable               one&lt;br /&gt;
&lt;br /&gt;
==Experimental schematic==&lt;br /&gt;
[[File:lesson12-schematic.jpg|600px|center|thumb]]&lt;br /&gt;
The photoresistance's connection in contrast to the last time, the purpose is let you know the usage of photoresistance deeply.&lt;br /&gt;
photoresistance directly connects to the power supply at one end, the other end through a resistance to connect GND .&lt;br /&gt;
The initial state is low, with the increase of light intensity voltage is higher and higher.&lt;br /&gt;
&lt;br /&gt;
==Program==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void setup ()&lt;br /&gt;
{&lt;br /&gt;
    Serial.begin(115200);&lt;br /&gt;
  for(int i=2; i&amp;lt;=5;i++)          //Set the I/O port 2 - 5 to output mode.&lt;br /&gt;
  {&lt;br /&gt;
  pinMode(i,OUTPUT);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
void loop ()&lt;br /&gt;
{&lt;br /&gt;
 &lt;br /&gt;
  int n =analogRead(A0);  //Read the value of photoresistance&lt;br /&gt;
   //Serial.println(n);&lt;br /&gt;
   &lt;br /&gt;
  if (n&amp;gt;=100)             //Judge the color hierarchy. You can djust the level values  according to your own used environment, minimum is 0, and maximun is 1023.&lt;br /&gt;
  {&lt;br /&gt;
    digitalWrite(2,HIGH);&lt;br /&gt;
    digitalWrite(2,LOW);  //When no longer this level, the lights will go off&lt;br /&gt;
  }&lt;br /&gt;
  if(n&amp;gt;250)&lt;br /&gt;
   {&lt;br /&gt;
    digitalWrite(3,HIGH);&lt;br /&gt;
    digitalWrite(3,LOW);&lt;br /&gt;
  }&lt;br /&gt;
    if(n&amp;gt;400)&lt;br /&gt;
   {&lt;br /&gt;
     digitalWrite(4,HIGH);&lt;br /&gt;
     digitalWrite(4,LOW);&lt;br /&gt;
  }&lt;br /&gt;
    if(n&amp;gt;550)&lt;br /&gt;
   {&lt;br /&gt;
     digitalWrite(5,HIGH);&lt;br /&gt;
     digitalWrite(5,LOW);&lt;br /&gt;
  }&lt;br /&gt;
  //  delay(100);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Result==&lt;br /&gt;
When the light is very weak, lower the seted minimum value, all the lights are off. With the increase of light, reach to a set level would light up an LED, to achieve the effect of instruction. Actually LED lamp has been flashing, because in order to make the light intensity is not a certain level, to put out the light of the level, directly after the lights out immediately, with no delay in the implementation process, as long as the grade, circulation processing, so it looks as if always on.&lt;/div&gt;</summary>
		<author><name>Timeslider</name></author>	</entry>

	<entry>
		<id>https//wiki.microduino.cn/index.php?title=Lesson_6--Microduino_%22Breathing_Light%22&amp;diff=775</id>
		<title>Lesson 6--Microduino &quot;Breathing Light&quot;</title>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=Lesson_6--Microduino_%22Breathing_Light%22&amp;diff=775"/>
				<updated>2014-02-19T11:41:13Z</updated>
		
		<summary type="html">&lt;p&gt;Timeslider：Error Correction&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Language|Lesson_6--The_Program_PWM_control_of_LED_brightness_--Breathing_light}}&lt;br /&gt;
{| style=&amp;quot;width: 800px;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
==Objective==&lt;br /&gt;
The last two experiment uses the external device to generate PWM to control the LED, how to control the LED by program instead of the external device?&lt;br /&gt;
This lesson will give you an example. This experiment implemented an led fadein dimming, named breathing lamp.&lt;br /&gt;
&lt;br /&gt;
==Equipment==&lt;br /&gt;
*'''[[Microduino-Core]]'''&lt;br /&gt;
*'''[[Microduino-FT232R]]'''&lt;br /&gt;
*Other hardware equipment&lt;br /&gt;
**Breadboard Jumper            one box   &lt;br /&gt;
**Breadboard  	               one piece  &lt;br /&gt;
**LED Light-emitting diodes    one &lt;br /&gt;
**220Ω resistor 	           one &lt;br /&gt;
**USB Data cable               one&lt;br /&gt;
&lt;br /&gt;
==Experimental schematic==&lt;br /&gt;
[[File:lesson 6-schematic.jpg|600px|center|thumb]]&lt;br /&gt;
Using high level lighting, the output also need connect to Microduino's PWM I/O port. If use the low level lighting, it has the same result.&lt;br /&gt;
&lt;br /&gt;
==Program==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
int ledPin=11;//D3、D5、D6、D9、D10、D11 is Microduino PWM I/O output port&lt;br /&gt;
void setup()&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
void loop(){&lt;br /&gt;
  for(int fadeValue=0;fadeValue&amp;lt;=255;fadeValue+=5)&lt;br /&gt;
  //Increase PWM value, control the LED brightness by adjusting the value of fadeValue.&lt;br /&gt;
  {&lt;br /&gt;
    analogWrite(ledPin,fadeValue);   //Write the brightness value to LED.&lt;br /&gt;
    delay(30);                       //Keep the current brightness 30ms. &lt;br /&gt;
  }&lt;br /&gt;
   for(int fadeValue=255;fadeValue&amp;gt;=0;fadeValue-=5)&lt;br /&gt;
   //Decrease PWM value,control the LED brightness by adjusting the value of fadeValue.&lt;br /&gt;
  {&lt;br /&gt;
    analogWrite(ledPin,fadeValue); //Write the brightness value to LED.&lt;br /&gt;
    delay(30);                     //Keep the current brightness 30ms. &lt;br /&gt;
  }&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Program uses the loop statement, it's convenient to automatically control the brightness of the leds.&lt;br /&gt;
==Result==&lt;br /&gt;
LED lights from off to on softly then off, followed by cycle.&lt;br /&gt;
&lt;br /&gt;
==Video==&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Timeslider</name></author>	</entry>

	<entry>
		<id>https//wiki.microduino.cn/index.php?title=Lesson_9--Microduino_used_as_0-5V_range_voltmeter_(simulate_a_multimeter)&amp;diff=774</id>
		<title>Lesson 9--Microduino used as 0-5V range voltmeter (simulate a multimeter)</title>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=Lesson_9--Microduino_used_as_0-5V_range_voltmeter_(simulate_a_multimeter)&amp;diff=774"/>
				<updated>2014-02-19T11:38:41Z</updated>
		
		<summary type="html">&lt;p&gt;Timeslider：orthography correction&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| style=&amp;quot;width: 800px;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
==Objective==&lt;br /&gt;
We have learned how to use read analog port, then mapping to 0~1024. Today we will make a 0-5v voltmeter by Microduino's analog port.&lt;br /&gt;
&lt;br /&gt;
'''Note：This experiment circuit design without relatively complex protection circuit, so don't use more than two AA batteries, and don't used to measure the lithium battery or other power supply！！'''&lt;br /&gt;
==Equipment==&lt;br /&gt;
*'''[[Microduino-Core]]'''&lt;br /&gt;
*'''[[Microduino-FT232R]]'''&lt;br /&gt;
*Other hardware equipment&lt;br /&gt;
**Breadboard Jumper            one box   &lt;br /&gt;
**Breadboard  	               one piece  &lt;br /&gt;
**1kΩ resistor 	       one &lt;br /&gt;
**USB Data cable               one&lt;br /&gt;
&lt;br /&gt;
==Experimental schematic==&lt;br /&gt;
[[File:less0n9-schematic.jpg|center|600px|thumb]]&lt;br /&gt;
The purpose of using 1K resistor is that in the case of measuring end vacant, the GND reference guide to measure port, and avoid vacant interfaces interference.&lt;br /&gt;
&lt;br /&gt;
==Program==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
float temp;   // Define a float variable temp to save data.&lt;br /&gt;
void setup()&lt;br /&gt;
{&lt;br /&gt;
  Serial.begin(115200);     //Set baud rate 9600&lt;br /&gt;
}&lt;br /&gt;
void loop()&lt;br /&gt;
{&lt;br /&gt;
 &lt;br /&gt;
  int V1 = analogRead(A0);                    &lt;br /&gt;
// Read the voltage date form A0 and stores in V1, the voltage range is 0-5v and return value is 0-1024. &lt;br /&gt;
  float vol = V1*(5.0 / 1023.0);               &lt;br /&gt;
//Convert the V1 to actual voltage value and stores in vol&lt;br /&gt;
  if (vol == temp)                             &lt;br /&gt;
//Use to filter duplicate data, Only the voltage value and the last isn't same then output the value.&lt;br /&gt;
  {&lt;br /&gt;
    temp = vol;                               //Compared, then store in temp variable &amp;quot;temp&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
  else&lt;br /&gt;
  { &lt;br /&gt;
    Serial.print(vol);                       //Serial output voltage, nowrap  &lt;br /&gt;
    Serial.println(&amp;quot; V&amp;quot;);                    //Serial output character &amp;quot;V&amp;quot;, and wrap&lt;br /&gt;
    temp = vol;&lt;br /&gt;
    delay(1000);                           //Wait for 1s, use to refresh the data&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
We don't use the function map() to the conversion, you can try it by yourself.&lt;br /&gt;
&lt;br /&gt;
==Result==&lt;br /&gt;
When the measured voltage changed, refrest the date every 1s. If there is a gap between two voltage value, this is normal. &lt;br /&gt;
Because this is a low accuracy test. If you need a higt accuracy test, plesae refer to：&lt;br /&gt;
http://www.hacktronics.com/Tutorials/arduino-current-sensor.html&lt;br /&gt;
==Video==&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Timeslider</name></author>	</entry>

	</feed>