//Sketch to generate timing pulses to test the power meter (an attiny85 is used, but any arduino will do the job)
/*
program to simulate the signal as generated from aa speedometer pickup by an arduino duemillenova
it will be fed into another arduino that contains the power measuring algorithm
*/
const int speedpin = 2;
void setup () {
pinMode(speedpin,OUTPUT);
digitalWrite(speedpin, HIGH);
}
void loop()
{ for (int i=1;i < 40;i++)
{
digitalWrite(speedpin, LOW);
delay(1);
digitalWrite(speedpin,HIGH);
delay(400);
}
for (int i=1;i < 10;i++)
{
digitalWrite(speedpin, LOW);
delay(5);
digitalWrite(speedpin,HIGH);
delay(400+i*10);
}
}
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.