http://karlskronamakerspace.org/wiki/index.php?title=Grove_-_LED&feed=atom&action=history
Grove - LED - Versionshistorik
2024-03-28T20:08:13Z
Versionshistorik för denna sida på wikin
MediaWiki 1.31.12
http://karlskronamakerspace.org/wiki/index.php?title=Grove_-_LED&diff=1228857&oldid=prev
Christian den 4 februari 2021 kl. 07.43
2021-02-04T07:43:57Z
<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.43</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l75" >Rad 75:</td>
<td colspan="2" class="diff-lineno">Rad 75:</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-Display]]</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>
<!-- diff cache key karlskronamaker-wiki_:diff::1.12:old-1228788:rev-1228857 -->
</table>
Christian
http://karlskronamakerspace.org/wiki/index.php?title=Grove_-_LED&diff=1228788&oldid=prev
Christian den 3 februari 2021 kl. 15.19
2021-02-03T15:19:25Z
<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.19</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l75" >Rad 75:</td>
<td colspan="2" class="diff-lineno">Rad 75:</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>
<!-- diff cache key karlskronamaker-wiki_:diff::1.12:old-1210:rev-1228788 -->
</table>
Christian
http://karlskronamakerspace.org/wiki/index.php?title=Grove_-_LED&diff=1210&oldid=prev
Christian den 29 oktober 2018 kl. 15.59
2018-10-29T15:59:59Z
<p></p>
<p><b>Ny sida</b></p><div>[[Fil:Grovve-led.jpg|200px|thumb|right|Grove - LED]]<br />
Grove - LED-modul som rymmer en LED-ljuskälla. Dessutom har den även en potentiometer ombord för att hantera LED-kraven.<br />
<br />
== Kompatibilitet ==<br />
* Arduino<br />
* Raspberry Pi<br />
<br />
== Port ==<br />
* Digital<br />
<br />
(möjligt att kontrollera med PWM för att åstadkomma fading).<br />
<br />
== Exempelkod ==<br />
=== Arduino ===<br />
<syntaxhighlight lang="C++" line><br />
const int pinLed = 3; // pin of led define here<br />
<br />
void setup()<br />
{<br />
pinMode(pinLed, OUTPUT); // set led OUTPUT<br />
}<br />
<br />
void loop()<br />
{<br />
for(int i=0; i<256; i++)<br />
{<br />
analogWrite(pinLed, i);<br />
delay(5); // change delay time can breath faster or slower<br />
}<br />
delay(100);<br />
for(int i=254; i>=0; i--)<br />
{<br />
analogWrite(pinLed, i);<br />
delay(5); // change delay time can breath faster or slower<br />
}<br />
delay(500);<br />
}<br />
</syntaxhighlight><br />
<br />
=== Raspberry Pi ===<br />
<syntaxhighlight lang="Python" line><br />
import time<br />
from grovepi import *<br />
<br />
# Connect the Grove LED to digital port D4<br />
led = 4<br />
<br />
pinMode(led,"OUTPUT")<br />
time.sleep(1)<br />
<br />
print ("This example will blink a Grove LED connected to the GrovePi+ on the port labeled D4. If you're having trouble seeing the LED blink, be sure to check the LED connection and the port number. You may also try reversing the direction of the LED on the sensor.")<br />
print (" ")<br />
print ("Connect the LED to the port labele D4!" )<br />
<br />
while True:<br />
try:<br />
#Blink the LED<br />
digitalWrite(led,1) # Send HIGH to switch on LED<br />
print ("LED ON!")<br />
time.sleep(1)<br />
<br />
digitalWrite(led,0) # Send LOW to switch off LED<br />
print ("LED OFF!")<br />
time.sleep(1)<br />
<br />
except KeyboardInterrupt: # Turn LED off before stopping<br />
digitalWrite(led,0)<br />
break<br />
except IOError: # Print "Error" if communication error encountered<br />
print ("Error")<br />
</syntaxhighlight><br />
<br />
== Mer information ==<br />
http://wiki.seeedstudio.com/Grove-Red_LED/<br />
<br />
[[Category:Grove]]</div>
Christian