-
Created by Unknown User (jarisav), last modified on 23.11.2011
You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
« Previous
Version 2
Next »
#pragma config(Sensor, S3, kosketus2, sensorTouch)
task main()
{
int kosketus2Value=0;
int flipflop=0;
int apu=0;
while(true)
{
kosketus2Value = SensorValue(kosketus1);
if(kosketus2Value==1&&apu==0)
{
flipflop=1;
apu=1;
}
if(kosketus2Value==0&&flipflop==1)
{
apu=2;
}
if(kosketus2Value==1&&apu==2)
{
flipflop=0;
apu=3;
}
if(kosketus2Value==0&&apu==3)
{
apu=0;
}
/*
omat koodit tähän
*/
}
}
You must log in to comment.