CODE UPDATE
PHP Code:
// Elegant Autostop
// Tells a G1 Honda Insight that conditions are right for AS
// Version 0.1
// #include <SPI.h>
int out_a = 9;
int out_b = A1;
void TimerOne_setPeriod(long OCRValue)
{
TCCR1B = _BV(WGM12)|_BV(CS12)|_BV(CS10); // or use TCCR1B = 0x0d; // CTC mode - 1024 prescale
TCCR1A = _BV(COM1A0); // or use TCCR1A = 0x40; // Toggle mode 0C1A
OCR1A = OCRValue; // set the counter
}
void setup()
{
pinMode(out_a, OUTPUT);
pinMode(out_b, OUTPUT);
TimerOne_setPeriod(3096); // set up and start Timer1 to blink at the same rate as the blink sketch
// Serial.begin(9600);
// Serial.println("setup");
}
void loop()
{
digitalWrite(out_b, HIGH);
delay(250);
digitalWrite(out_b, LOW);
delay(250);
}
Now generates a second slightly different signal via PWM on pin 9. This signal gets you into Auto-Stop more reliably, BUT it doesn't persist unless you hold brake or clutch down, or if you have a clutch switch just turn that on.