Skip to content

Commit 0b98f46

Browse files
committed
Build ioio article by j7m
1 parent 13c27d9 commit 0b98f46

File tree

3 files changed

+199
-2
lines changed

3 files changed

+199
-2
lines changed

pages/articles.html

+3-1
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ <h2 id="plugins">Plugins</h2>
106106
GIFs</a></li>
107107
<li><ahref="/pages/plugins_pigpio.html">PiGPIO: Use the GPIO pins of a
108108
Raspberry Pi</a></li>
109+
<li><ahref="/pages/plugins_ioio.html">IOIO: Drive hardware from
110+
Android</a></li>
109111
</ul>
110112
<h2id="units">Units</h2>
111113
<ul>
@@ -120,7 +122,7 @@ <h2 id="miscellaneous">Miscellaneous</h2>
120122
</ul>
121123
</div>
122124
<divclass="pagefooter">
123-
This page was last edited on Sat, 29 Jun 2024 22:46:01 +0200
125+
This page was last edited on Thu, 8 Aug 2024 22:03:08 +0200
124126
|
125127
<ahref="https://en.wikipedia.org/wiki/Markdown" target="_blank" rel="nofollow">Markdown</a>
126128
processed with

pages/plugins_ioio.html

+195
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,195 @@
1+
<!DOCTYPE html>
2+
<htmllang="en">
3+
<head>
4+
<metacharset="utf-8">
5+
<metahttp-equiv="X-UA-Compatible" content="IE=edge">
6+
<metaname="viewport" content="width=device-width, initial-scale=1">
7+
<title>SmallBASIC | plugins_ioio</title>
8+
<metaname="description" content="SmallBASIC | One more basic">
9+
<linkrel="canonical" href="/plugins_ioio.html">
10+
<linkrel="keywords" href="plugins_ioio">
11+
<linkrel="stylesheet" href="/css/style.css">
12+
<linkrel="icon" type="image/png" href="/images/sb-desktop-32x32.png">
13+
<scriptsrc="/clipboard.js"></script>
14+
</head>
15+
<body>
16+
<divclass="wrapAll clearfix">
17+
<divclass="sidebar">
18+
<divclass="logo">
19+
<ahref="/"><imgsrc='/images/sb-desktop-128x128.png' alt="logo"></a>
20+
</div>
21+
<divclass="navigation">
22+
<h4>SmallBASIC</h4>
23+
<ul>
24+
<li><ahref="/">Main page</a></li>
25+
<li><ahref="/pages/download.html">Download</a></li>
26+
<li><ahref="/pages/reference.html">Language reference</a></li>
27+
<li><ahref="/pages/samples.html">Code library</a></li>
28+
</ul>
29+
<hrclass="menuSeparator"/>
30+
<ul>
31+
<li><ahref="/pages/news.html">News</a></li>
32+
<li><ahref="/pages/articles.html">Articles</a></li>
33+
<li><ahref="/pages/community.html">Community</a></li>
34+
<li><ahref="/pages/changelog.html">Changelog</a></li>
35+
<li><ahref="/pages/screenshots.html">Screenshots</a></li>
36+
<li><ahref="/pages/links.html">Links</a></li>
37+
</ul>
38+
</div>
39+
</div>
40+
<divclass="mainsection">
41+
<divclass="tabs clearfix">
42+
<divclass="tabsLeft">
43+
<ul>
44+
<li><ahref="#" class="active">Article</a></li>
45+
<li><ahref="https://www.syntaxbomb.com/smallbasic">Discuss</a></li>
46+
</ul>
47+
</div>
48+
<divid="simpleSearch">
49+
<formaction="https://github.com/smallbasic/smallbasic.github.io/search"
50+
target="_github" accept-charset="UTF-8" method="get" style="display:inline">
51+
<divid="submitSearch">
52+
<buttontype="submit">&nbsp;</button>
53+
<inputtype="hidden" class="js-site-search-type-field" name="type">
54+
<inputtype="hidden" name="utf8" value="">
55+
<inputtype="hidden" name="l" value="Visual Basic">
56+
<inputtype="text" name="q" placeholder="Search" id="searchInput">
57+
</div>
58+
</form>
59+
</div>
60+
<divclass="tabsRight">
61+
<ul>
62+
<li><atarget="_github" href="https://github.com/smallbasic/smallbasic.github.io/blob/master/_build/pages/plugins_ioio.markdown">View source</a></li>
63+
<li><atarget="_github" href="https://github.com/smallbasic/smallbasic.github.io/commits/master/_build/pages/plugins_ioio.markdown">View history</a></li>
64+
</ul>
65+
</div>
66+
</div>
67+
<divclass="article">
68+
<h1id="ioio-plugin">IOIO plugin</h1>
69+
<p>The IOIO is a board that provides a host machine the capability of
70+
interfacing with external hardware over a variety of commonly used
71+
protocols. The original IOIO board has been specifically designed to
72+
work with Android devices. The newer IOIO-OTG (“on the go”) boards work
73+
with both Android devices and PC’s. The IOIO board can be connected to
74+
its host over USB or Bluetooth, and provides a high-level Java API on
75+
the host side for using its I/O functions as if they were an integral
76+
part of the client. (<ahref="https://github.com/ytai/ioio/wiki">IOIO
77+
website</a>)</p>
78+
<h2id="how-to-learn-coding-for-ioio">How to learn coding for IOIO</h2>
79+
<p>For most of the protocols you can find a SmallBASIC example at <a
80+
href="https://github.com/smallbasic/smallbasic.plugins/tree/master/ioio/samples">Github</a>.
81+
Below is a list with all examples and an image how to wire. If you are
82+
new to IOIO it is best to start with the first example.</p>
83+
<p>A simple SmallBASIC cheatsheet is available at <a
84+
href="https://github.com/smallbasic/smallbasic.plugins/tree/master/ioio">Github</a>.</p>
85+
<p>For further information please visit the <a
86+
href="https://github.com/ytai/ioio/wiki">IOIO website</a>.</p>
87+
<h2id="how-to-setup-smallbasic-to-use-the-ioio-plugin">How to setup
88+
SmallBASIC to use the IOIO plugin</h2>
89+
<p>Getting IOIO running on a PC (Linux) requires to build the plugin
90+
from source. This is not part of this document.</p>
91+
<p>Using IOIO on Android is quite easy:</p>
92+
<ul>
93+
<li>Launch SmallBASIC and then click on “Setup”.</li>
94+
<li>On the second screen, click to “Load extension modules”.</li>
95+
<li>Restart SmallBASIC and then click “About”. You should see:
96+
“Extension modules: enabled”.</li>
97+
<li>If you have enabled Android developer options, make sure USB
98+
debugging is disabled.</li>
99+
<li>On your IOIO-OTG board, connect a power source to the VIN + GND.
100+
<ul>
101+
<li>IOIO should be powered by an external DC voltage source between
102+
5V-15V.</li>
103+
<li>9V battery works well.</li>
104+
<li>But it is better to connect a 5V power supply.</li>
105+
<li>Instead of VIN + GND you can use the 2-pin JST Female Power
106+
Jack</li>
107+
</ul></li>
108+
<li>Connect a USB cable between your mobile or tablet and the board (use
109+
the included red adaptor plus another cable).</li>
110+
<li>You should see “IOIO Standard application - no installed apps”.</li>
111+
<li>Launch “led.bas”</li>
112+
<li>You should see a prompt requesting permission for SmallBASIC to
113+
access the board. Click okay.</li>
114+
<li>You should then see a toast message: IOIO board access
115+
permitted.</li>
116+
<li>For this initial setup “led.bas” has now timed out. You should be
117+
able to re-launch “led.bas” for successful operation.</li>
118+
</ul>
119+
<p>You have to connect power to the board, because it will act as an
120+
host and it will charge your Android device.</p>
121+
<h2id="examples">Examples</h2>
122+
<h3id="digital-output">Digital output</h3>
123+
<h4id="led">LED</h4>
124+
<p><a
125+
href="https://github.com/smallbasic/smallbasic.plugins/blob/master/ioio/samples/led.bas">led.bas</a></p>
126+
<p><imgsrc="/images/ioio/ioioboard.png" /></p>
127+
<h4id="pwm">PWM</h4>
128+
<p><a
129+
href="https://github.com/smallbasic/smallbasic.plugins/blob/master/ioio/samples/pwm.bas">pwm.bas</a></p>
130+
<p><imgsrc="/images/ioio/PWM.png" /></p>
131+
<h4id="hd44780-text-display">HD44780 text display</h4>
132+
<p><a
133+
href="https://github.com/smallbasic/smallbasic.plugins/blob/master/ioio/samples/hd44780.bas">hd44780.bas</a></p>
134+
<p><imgsrc="/images/ioio/HD44780.png" /></p>
135+
<h3id="digital-input">Digital input</h3>
136+
<p><a
137+
href="https://github.com/smallbasic/smallbasic.plugins/blob/master/ioio/samples/button.bas">button.bas</a></p>
138+
<p><imgsrc="/images/ioio/button.png" /></p>
139+
<h3id="analog-input">Analog input</h3>
140+
<p><a
141+
href="https://github.com/smallbasic/smallbasic.plugins/blob/master/ioio/samples/slider-pot.bas">slider-pot.bas</a></p>
142+
<p><imgsrc="/images/ioio/SliderPot.png" /></p>
143+
<h3id="i2c">I2C</h3>
144+
<h4id="bh1750---ambient-light-sensor">BH1750 - Ambient light
145+
sensor</h4>
146+
<p><a
147+
href="https://github.com/smallbasic/smallbasic.plugins/blob/master/ioio/samples/bh1750.bas">bh1750.bas</a></p>
148+
<p><imgsrc="/images/ioio/BH1750.png" /></p>
149+
<h4id="bme280---temperature-and-humidity-sensor">BME280 - Temperature
150+
and humidity sensor</h4>
151+
<p><a
152+
href="https://github.com/smallbasic/smallbasic.plugins/blob/master/ioio/samples/bme280.bas">bme280.bas</a></p>
153+
<p><imgsrc="/images/ioio/BME280.png" /></p>
154+
<h4
155+
id="mpu6050---accelerometer-gyroscope-and-temperature-sensor">MPU6050 -
156+
Accelerometer, gyroscope and temperature sensor</h4>
157+
<p><a
158+
href="https://github.com/smallbasic/smallbasic.plugins/blob/master/ioio/samples/mpu6050.bas">mpu6050.bas</a></p>
159+
<p><imgsrc="/images/ioio/MPU6050.png" /></p>
160+
<h4id="veml6030---ambient-light-sensor">VEML6030 - Ambient-light
161+
sensor</h4>
162+
<p><a
163+
href="https://github.com/smallbasic/smallbasic.plugins/blob/master/ioio/samples/veml6030.bas">veml6030.bas</a></p>
164+
<p><imgsrc="/images/ioio/VEML6030.png" /></p>
165+
<h4id="ssd1306---oled-with-128x64-monochrome-pixels">SSD1306 - OLED
166+
with 128x64 monochrome pixels</h4>
167+
<p><a
168+
href="https://github.com/smallbasic/smallbasic.plugins/blob/master/ioio/samples/ssd1306.bas">ssd1306.bas</a></p>
169+
<p><imgsrc="/images/ioio/SSD1306.png" /></p>
170+
<h3id="spi">SPI</h3>
171+
<h4id="as---8x8-dot-matrix-module">1088AS - 8x8 dot matrix module</h4>
172+
<p><a
173+
href="https://github.com/smallbasic/smallbasic.plugins/blob/master/ioio/samples/duino-1088as.bas">duino-1088as.bas</a></p>
174+
<p><imgsrc="/images/ioio/duino1088as.png" /></p>
175+
<h4id="st7789---tft-controller">ST7789 - TFT controller</h4>
176+
<p><a
177+
href="https://github.com/smallbasic/smallbasic.plugins/blob/master/ioio/samples/st7789.bas">st7789.bas</a></p>
178+
<p>SPI is too slow on IOIO to drive a TFT display.</p>
179+
<h4id="st7735---tft-controller">ST7735 - TFT controller</h4>
180+
<p><a
181+
href="https://github.com/smallbasic/smallbasic.plugins/blob/master/ioio/samples/st7735s.bas">st7735.bas</a></p>
182+
<p>SPI is too slow on IOIO to drive a TFT display.</p>
183+
</div>
184+
<divclass="pagefooter">
185+
This page was last edited on Thu, 8 Aug 2024 22:03:08 +0200
186+
|
187+
<ahref="https://en.wikipedia.org/wiki/Markdown" target="_blank" rel="nofollow">Markdown</a>
188+
processed with
189+
<ahref="https://pandoc.org/MANUAL.html#pandocs-markdown" target="_blank" rel="nofollow">pandoc 3.1.3</a>
190+
| Template by <ahref="http://html5-templates.com/" target="_blank" rel="nofollow">HTML5 Templates</a>
191+
</div>
192+
</div>
193+
</div>
194+
</body>
195+
</html>

reference/sbref.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
SmallBASIC Language reference [05/08/2024]
1+
SmallBASIC Language reference [09/08/2024]
22

33
░██████╗███╗░░░███╗░█████╗░██╗░░░░░██╗░░░░░██████╗░░█████╗░░██████╗██╗░█████╗░
44
██╔════╝████╗░████║██╔══██╗██║░░░░░██║░░░░░██╔══██╗██╔══██╗██╔════╝██║██╔══██╗

0 commit comments

Comments
 (0)
close