Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
projets:jozephine [2020/02/20 23:00] – [Upcoming] mh | projets:jozephine [2020/06/01 16:35] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 9: | Line 9: | ||
She was built in my beginnings and needs an update. She burns through 3.3V batteries like crazy. | She was built in my beginnings and needs an update. She burns through 3.3V batteries like crazy. | ||
+ | === Official GitLab Source === | ||
- | ==== Arduino | + | [[https:// |
+ | ==== Arduino | ||
=== Simple blink === | === Simple blink === | ||
Line 34: | Line 36: | ||
void loop() | void loop() | ||
{ | { | ||
- | |||
fadeEyes(); // blink the eye thing | fadeEyes(); // blink the eye thing | ||
- | |||
} | } | ||
void fadeEyes() | void fadeEyes() | ||
{ | { | ||
- | | + | |
+ | if (brightness == 255) | ||
{ | { | ||
- | | + | delay(1500); // stay a bit on full bright led |
- | if (brightness == 255) | + | } |
- | { | + | |
- | | + | |
- | } | + | |
- | | + | |
- | | + | |
- | if (brightness == 0 || brightness == 255) | + | if (brightness == 0 || brightness == 255) |
- | { | + | { |
- | fadeAmount = -fadeAmount; | + | fadeAmount = -fadeAmount; |
- | } | + | } |
- | | + | |
- | | + | |
- | + | ||
- | } | + | |
- | + | ||
- | digitalWrite(led, | + | |
} | } | ||
</ | </ | ||
++++ | ++++ | ||
+ | |||
+ | {{projets: | ||
==== Legacy ==== | ==== Legacy ==== | ||
Line 133: | Line 129: | ||
++++ | ++++ | ||
+ | |||
+ | [[https:// |