EcoModder.com

EcoModder.com (https://ecomodder.com/forum/)
-   OpenGauge / MPGuino FE computer (https://ecomodder.com/forum/opengauge-mpguino-fe-computer.html)
-   -   Obduino and J1850 PWM (https://ecomodder.com/forum/showthread.php/obduino-j1850-pwm-24884.html)

zoidbergdk 02-08-2013 11:20 AM

Obduino and J1850 PWM
 
Hi guys,

I have a problem getting the Obduino code working with my 2000 Ford Focus.

I'm using the Sparkfun obd2 uart (elm327) to interface the obd2 port and it seems to initialize fine and returns the right protocol, but after that i get nothing, just pid not supported.

I already have a Scangauge that works perfectly, so i know the data is available, but i can't figure out how to get the Arduino to read it.

I've spent a couple of weeks on the project so far, looking through the net and trying different code, but so far nothing is working. I'm starting to go crazy here, so any help is appreciated.

Magister 02-18-2013 03:20 PM

Remove this part in the code and retry

Quote:

// ask protocol
elm_command(str, PSTR("ATDPN\r"));
// str[0] should be 'A' for automatic
// set header to talk directly to ECU#1
if(str[1]=='1') // PWM
elm_command(str, PSTR("ATSHE410F1\r"));
else if(str[1]=='2') // VPW
elm_command(str, PSTR("ATSHA810F1\r"));
else if(str[1]=='3') // ISO 9141
elm_command(str, PSTR("ATSH6810F1\r"));
else if(str[1]=='6') // CAN 11 bits
elm_command(str, PSTR("ATSH7E0\r"));
else if(str[1]=='7') // CAN 29 bits
elm_command(str, PSTR("ATSHDA10F1\r"));

zoidbergdk 02-25-2013 07:25 AM

That doesn't seem to make a difference.

Magister 02-25-2013 09:13 AM

In this case you have to display some debug code here and there, display the PID00 and PID20 on the LCD for instance.


All times are GMT -4. The time now is 07:27 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Content Relevant URLs by vBSEO 3.5.2
All content copyright EcoModder.com