http://karlskronamakerspace.org/wiki/index.php?title=Grove_-_Touch_Sensor&feed=atom&action=history
Grove - Touch Sensor - Versionshistorik
2024-03-29T12:50:02Z
Versionshistorik för denna sida på wikin
MediaWiki 1.31.12
http://karlskronamakerspace.org/wiki/index.php?title=Grove_-_Touch_Sensor&diff=1228835&oldid=prev
Christian den 4 februari 2021 kl. 07.31
2021-02-04T07:31:09Z
<p></p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="sv">
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">← Äldre version</td>
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">Versionen från 4 februari 2021 kl. 07.31</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l60" >Rad 60:</td>
<td colspan="2" class="diff-lineno">Rad 60:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>[[Category:Grove]]</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>[[Category:Grove]]</div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">[[Category:Grove-Sensor]]</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>[[Category:Kna-Wiki]]</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>[[Category:Kna-Wiki]]</div></td></tr>
</table>
Christian
http://karlskronamakerspace.org/wiki/index.php?title=Grove_-_Touch_Sensor&diff=1228755&oldid=prev
Christian den 3 februari 2021 kl. 15.14
2021-02-03T15:14:10Z
<p></p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="sv">
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">← Äldre version</td>
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">Versionen från 3 februari 2021 kl. 15.14</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l60" >Rad 60:</td>
<td colspan="2" class="diff-lineno">Rad 60:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>[[Category:Grove]]</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>[[Category:Grove]]</div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">[[Category:Kna-Wiki]]</ins></div></td></tr>
</table>
Christian
http://karlskronamakerspace.org/wiki/index.php?title=Grove_-_Touch_Sensor&diff=1223&oldid=prev
Christian den 29 oktober 2018 kl. 20.49
2018-10-29T20:49:26Z
<p></p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="sv">
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">← Äldre version</td>
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">Versionen från 29 oktober 2018 kl. 20.49</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l1" >Rad 1:</td>
<td colspan="2" class="diff-lineno">Rad 1:</td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>[[Fil:<del class="diffchange diffchange-inline">File</del>.<del class="diffchange diffchange-inline">png</del>|200px|thumb|right|Grove - Touch Sensor]]</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>[[Fil:<ins class="diffchange diffchange-inline">Grove-Touch</ins>.<ins class="diffchange diffchange-inline">jpg</ins>|200px|thumb|right|Grove - Touch Sensor]]</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Identifiera touch från ett finger, likt funktionen hos en knapp.</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Identifiera touch från ett finger, likt funktionen hos en knapp.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<!-- diff cache key karlskronamaker-wiki_:diff::1.12:old-1221:rev-1223 -->
</table>
Christian
http://karlskronamakerspace.org/wiki/index.php?title=Grove_-_Touch_Sensor&diff=1221&oldid=prev
Christian den 29 oktober 2018 kl. 20.48
2018-10-29T20:48:38Z
<p></p>
<p><b>Ny sida</b></p><div>[[Fil:File.png|200px|thumb|right|Grove - Touch Sensor]]<br />
Identifiera touch från ett finger, likt funktionen hos en knapp.<br />
<br />
== Kompatibilitet ==<br />
* Arduino<br />
* Raspberry Pi<br />
<br />
== Port ==<br />
* Digital<br />
<br />
== Exempelkod ==<br />
=== Arduino ===<br />
<syntaxhighlight lang="C++" line><br />
const int pinButton = 3; // pin of button define here<br />
const int pinLed = 7; // pin of led define here<br />
<br />
void setup()<br />
{<br />
Serial.begin(9600);<br />
pinMode(pinButton, INPUT); // set button INPUT<br />
pinMode(pinLed, OUTPUT); // set led OUTPUT<br />
}<br />
<br />
void loop()<br />
{<br />
if(digitalRead(pinButton)) // when button is pressed<br />
{<br />
digitalWrite(pinLed, HIGH); // led on<br />
}<br />
else<br />
{<br />
digitalWrite(pinLed, LOW);<br />
}<br />
Serial.println(digitalRead(pinButton));<br />
delay(10);<br />
}<br />
</syntaxhighlight><br />
<br />
=== Raspberry Pi ===<br />
<syntaxhighlight lang="Python" line><br />
import time<br />
import grovepi<br />
<br />
# Connect the Grove Touch Sensor to digital port D2<br />
touch_sensor = 2<br />
<br />
grovepi.pinMode(touch_sensor,"INPUT")<br />
<br />
while True:<br />
try:<br />
print(grovepi.digitalRead(touch_sensor))<br />
time.sleep(.5)<br />
<br />
except IOError:<br />
print ("Error")<br />
</syntaxhighlight><br />
<br />
== Mer information ==<br />
http://wiki.seeedstudio.com/Grove-Touch_Sensor/<br />
<br />
[[Category:Grove]]</div>
Christian