blob: 991e540c67dd4a62930ce8a8e387cba9a0ecc23c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
<?xml version="1.0" encoding="UTF-8"?>
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xml:id="ANALOG_READ_SB">
<refnamediv>
<refname>ANALOG_READ_SB</refname>
<refpurpose>Analog ports of an Arduino board which allow the acquisition of an analog input</refpurpose>
</refnamediv>
<refsection>
<title>Block Screenshot</title>
<para>
<inlinemediaobject>
<imageobject>
<imagedata fileref="../../images/gif/ANALOG_READ_SB.gif" align="center" valign="middle"/>
</imageobject>
</inlinemediaobject>
</para>
</refsection>
<refsection id="Contents_ANALOG_READ_SB">
<title>Contents</title>
<itemizedlist>
<listitem>
<para>
<link linkend="ANALOG_READ_SB">Analog ports of an Arduino board which allow the acquisition of an analog input</link>
</para>
</listitem>
<listitem>
<itemizedlist>
<listitem>
<para>
<xref linkend="Palette_ANALOG_READ_SB">Palette</xref>
</para>
</listitem>
<listitem>
<para>
<xref linkend="Description_ANALOG_READ_SB">Description</xref>
</para>
</listitem>
<listitem>
<para>
<xref linkend="Dialogbox_ANALOG_READ_SB">Dialog box</xref>
</para>
</listitem>
<listitem>
<para>
<xref linkend="Example1_ANALOG_READ_SB">Example 1</xref>
</para>
</listitem>
<listitem>
<para>
<xref linkend="Seealso_ANALOG_READ_SB">See Also</xref>
</para>
</listitem>
</itemizedlist>
</listitem>
</itemizedlist>
</refsection>
<refsection id="Palette_ANALOG_READ_SB">
<title>Palette</title>
Arduino
</refsection>
<refsection id="Description_ANALOG_READ_SB">
<title>Description</title>
<para> Arduino UNO board has 6 analog input ports (A0 to A5), the Arduino Mega board has 16 analog input ports (A0 to A15). The 10 bits channels convert the analog input from 0 to 5 volts, to a digital value between 0 and 1023. </para>
<para> Do note that the minimum sampling rate is 8 ms for this block. </para>
</refsection>
<refsection id="Dialogbox_ANALOG_READ_SB">
<title>Dialog box</title>
<inlinemediaobject> <imageobject> <imagedata fileref="ANALOG_READ_SB_dialogbox.png" align="center"/> </imageobject> </inlinemediaobject>
<para> The port number of 0-5 must be specified for the UNO card, 0-15 for a MEGA board. </para>
<para> The card number can not be changed at this time. </para>
<para> There would be no verification routine for the setting, please refer to the specification of your Arduino board to put a correct value. </para>
</refsection>
<refsection id="Example1_ANALOG_READ_SB">
<title>Example 1</title>
<para> The following example shows the use of the block in connecting with an angular potentiometer which signal pin is connected to port 2 of Arduino board. The other two pins of the potentiometer are connected to ground (GND) and the 5 Volt the card directly. </para>
<inlinemediaobject> <imageobject> <imagedata fileref="ANALOG_READ_example.png" align="center"/> </imageobject> </inlinemediaobject>
</refsection>
<refsection id="Seealso_ANALOG_READ_SB">
<title>See Also</title>
<para>
<link linkend="ANALOG_WRITE_SB">ANALOG_WRITE_SB</link>
</para>
<para>
<link linkend="DIGITAL_READ_SB">DIGITAL_READ_SB</link>
</para>
<para>
<link linkend="DIGITAL_WRITE_SB">DIGITAL_WRITE_SB</link>
</para>
</refsection>
</refentry>
|