This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
multi-line comments can go here in between | |
the symbols you see above and below | |
*/ | |
int A = 3; // whenever A is used in the code it sends a signal through pin 3 | |
int B = 4; // whenever B is used in the code it sends a signal through pin 4 | |
// the setup function runs once when you press reset or power the board | |
void setup() { | |
// initialize digital pin 13 as an output. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Lilymini ProtoSnap Activity 2: Basic Color Mixing | |
SparkFun Electronics | |
https://www.sparkfun.com/products/14346 | |
Modified 16 Feb 2018 | |
by K Margenau | |
Create primary and secondary colors on the built-in RGB (Red/Green/Blue) LED | |
This code is released under the MIT License (http://opensource.org/licenses/MIT) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
LilyPad ProtoSnap Plus Activity 7: Sensing Light | |
SparkFun Electronics | |
modified by ringotron5000 | |
Modified by K Margenau | |
for LilyMini | |
16 Feb 2018 | |
darkness is low value, maybe 5 | |
light is higher , maybe 190 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Create a sketch to make the lilymini blink an SOS then repeat. | |
* This version uses the "for" loop to shorten the code. The syntax for the "for" loop uses an initialization, | |
* condition and increment to manage how many times the loop is carried out. It also requires | |
* a brace "{" at the beginning and } at the end. The sketch below uses the blue on the RGB to | |
* denote when the larger loop completes. | |
* | |
*/ | |
int A = 3; | |
int B = 4; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Baisc for loop for students to practice with | |
* Optimized for Lilymini | |
* written by B. Elliot Oct 15, 2019 | |
*/ | |
// Dim an LED using a PWM pin | |
int PWMpin = 3; // LED in series with 470 ohm resistor on pin 10 | |
void setup() { | |
// no setup needed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Basic if else example for Lilymini | |
*written by B. Elliott Oct 15, 2019 | |
*/ | |
int switchState = 0; | |
void setup() { | |
pinMode (7, OUTPUT); | |
pinMode (5, OUTPUT); | |
pinMode (4, OUTPUT); |