REFER TO THE REFERENCE

Teagueduino is all about learning, so we put together this guide to help. If you’re just getting started with Teagueduino, we urge you to check out the getting started page. Reference will still be here when you’re done.

LEARN FROM TUTORIALS

Basic Police Car

Teague Labs
DIFFICULTY
Build this awesome simple police car using the cardboard inside your Teagueduino kit! This 3-line program flashes red and blue lights on top of the car and lets you control the sound using the piezo speaker and a button. Don’t have the cardboard? No problem. Get the pattern and see more details here: http://www.teagueduino.org/gettingstarted

5 Ways to Blink an LED

Teague Labs
DIFFICULTY
Here’s a quick tutorial to show 5 different ways to blink LEDs! One (Out_A): The easist way! Just set an output as a Tone between 1 and 30. Two (Out_B): Turn the light on. Delay. Turn it off. Delay. Three (Out_C): Use a variable (Var_1) to invert whatever it was set to last time. If it was on, turn it off. If it was off, turn it on. Four (Out_D): Use a variable (Var_2) to smoothly ramp the brightness up an down. Five (Out_E): Set the brightness of the LED using the random() function.

Creating a For Loop

Teague Labs
DIFFICULTY
Here’s the basic structure for creating a For loop using Teagueduino. This lets you perform an action an exact number of times. For example, maybe you’d like to blink a light 5 times. The For loop in C look would look something like this: for(int i=0; i<5; i++){ // turn light on // delay for .2 seconds // turn the light off // delay for .2 second } In Teagueduino, we can use variables to accomplish the same thing like this: Var_1 = 0 + 0; while(Var_1 < 5){ Out_A = 1000 as PWM; delay(200); Out_A = 0 as PWM delay(200); Var_1 = Var_1 + 1; }

Inverting an Input Value

Teague Labs
DIFFICULTY
Ever want to intvert the value you get from a sensor? Wish the light sensor value went up in the dark instead of down? Or a button normally had a value of 1000 and became 0 when pressed? Here’s how. Just use a variable and subtract the value from 1000. Var_1 = 1000 – In_1; Then use Var_1 in your project where it’s convenient. Out_B = Var_1;