[[!meta title="Playing With Sensors"]]
(Notes from a little Workshop during HAR 2009)
* <b>GPIO</b>: LEDs, Switches, Multi-position keylocks,
receiving the german DCF77 time signal station (maybe),
using GPIO pins to build a 1-Wire bus
* <b>1-Wire bus</b>: Digital thermometers
# Hardware Notes
## Soekris net4801 GPIO pins wrong in manual
The GPIO Pins in the Soekris net4801 manual are utterly wrong
(at least there is a manual, unlike for the net5501, although
one with many errors...).
<table border="1">
<tr>
<td>JP5 Pin</td><td>PC87366 Pin</td><td>JP5 Pin</td><td>PC87366 Pin</td><td>JP5 Pin</td><td>PC87366 Pin</td><td>JP5 Pin</td><td>C87366 Pin</td></tr>
<tr><td>3</td><td>GPIO16</td><td>4</td><td>GPIO17</td><td>5</td><td>GPIO18</td><td>6</td><td>GPIO19</td></tr>
<tr><td>7</td><td>GPIO20</td><td>8</td><td>GPIO21</td><td>9</td><td>GPIO22</td><td>10</td><td>GPIO23</td></tr>
</table>
## Connecting a LCD module to the 4801 JP5
This example assumes a DIP162 module.
<pre>
LCD 4801 Function PC87366 Pin
1 11 GND
2 2 VCC
3 nc VEE (Kontrast)
4 12 RS, GPIO8 GPIO4
5 13 RW, GPIO9 GPIO5
6 15 Enable, GPIO10 GPIO13
7 3 D0 Display Data LSB, GPIO0 GPIO16
8 4 D1, GPIO1 GPIO17
9 5 D2, GPIO2 GPIO18
10 6 D3, GPIO3 GPIO19
11 7 D4, GPIO4 GPIO20
12 8 D5, GPIO5 GPIO21
13 9 D6, GPIO6 GPIO22
14 10 D7, GPIO7 GPIO23
15 nc
16 nc
17 nc LED+
18 nc LED-
</pre>
## Connecting a DS18B20 to Soekris 5501 JP5
<pre>
__________
| |
| DS18B20 |
Vin -----------
| 1| 2| 3|
| | | |
_ o---|----|
| | | |
4k7|_| GND |
| |
| |
uC -------o--------------------
2 = DQ -----> Pin X / GPIO x
1 = GND -----> Pin 20
3 = Vdd GND when using parasite power
Vin = 5V -----> Pin 2
</pre>
# External References
## In english
* [1-Wire Communication Through Software](http://www.maxim-ic.com/appnotes.cfm/appnote_number/126)
* [1-Wire File System](http://owfs.org/)
* [1-Wire Bus Wikipedia Entry](http://en.wikipedia.org/wiki/1-Wire)
## In german
* [1-Wire Bus System](http://www.ip-symcon.de/wiki/index.php/1Wire-Bus-System)
* [1-Wire Bus Wikipedia Entry](http://de.wikipedia.org/wiki/1-Wire)
CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb