It is not Arduino but same processor (Atmel) source code is in C.. but might find it interesting...
http://ecomodder.com/wiki/index.php/ReVolt
http://ecomodder.com/wiki/index.php/ReVolt
int potPin = 2; // select the input pin for the potentiometer
int ledPin = 11; // note onlly 5,6, 9,10,11 are PWM
int wait = 0; // variable to store the value coming from the sensor
void setup() {
// Serial.begin(9600);
pinMode(ledPin, OUTPUT); // declare the ledPin as an OUTPUT
}
void loop() {
wait = analogRead(potPin) - 28; // read the value from the sensor
if(wait > 950){
digitalWrite(ledPin, LOW);
}else{
digitalWrite(ledPin, HIGH); // turn the ledPin on
delayMicroseconds(1023 - wait); // stop the program for some time
digitalWrite(ledPin, LOW); // turn the ledPin off
delayMicroseconds( wait); // stop the program for some time
}
// Serial.println( wait );
}
I second that QerPersonally I think you have two realistic options:
There's a reason it took EVnetics a year to literally blow up all the obstacles on the path to a sellable product, you know...
- Go for ReVolt and help improving that controller rather than trying to reinvent the wheel.
- Buy something that's been proven to be reliable and spend your energy at converting a car rather than blowing up silicon.