View Single Post
Old 09-15-2017, 02:15 AM   #56 (permalink)
Natalya
Engine-Off-Coast
 
Natalya's Avatar
 
Join Date: Apr 2016
Location: Atlanta
Posts: 561

Red 2000 Insight (2017 through 2019) - '00 Honda Insight 5MT
90 day: 64.72 mpg (US)

Red 2000 Lithium Insight (2020) - '00 Honda Insight LTO
90 day: 71.76 mpg (US)
Thanks: 223
Thanked 305 Times in 175 Posts
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_aOUTPUT);
  
pinMode(out_bOUTPUT);
  
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_bHIGH);
  
delay(250);
  
digitalWrite(out_bLOW);
  
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.
  Reply With Quote