SEARCH
RESULTS
Tutorial

MAKE THIS!
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;
MAKE THIS!
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;
}
MAKE THIS!
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.
MAKE THIS!
1 vote
DIFFICULTY
Modify the simple police car.

This 3-line program flashes red,, green and blue lights.
MAKE THIS!
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
MAKE THIS!
DIFFICULTY
Adjusted light and siren coordination to be a bit more realistic (2 cycles of lights per cycle of the siren); added additonal activation methind (for no reason); added adjustable cycle duration (using knob).
MAKE THIS!
2 votes
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