Page 2 of 2

Re: Getting started - DTC management?

Posted: Wed Jul 23, 2014 3:19 am
by BoxOfSnoo
stanley wrote:I will take a look at your code!
As for iOS App, are you capable of iOS development?


Technically, I suppose... but it would be quite a stretch. :) I'm not in the dev program, and only played around with sample code.

Re: Getting started - DTC management?

Posted: Fri Jul 25, 2014 11:32 pm
by stanley
I really hope some one can help me a bit with iOS development cause I am so busy doing everything on my own. My kickstarter campaign was aiming for funding for the iOS app development. As it didn't succeed, the project is still left behind in iOS app development up to now.

Re: Getting started - DTC management?

Posted: Fri Aug 01, 2014 6:26 am
by BoxOfSnoo
stanley wrote:I really hope some one can help me a bit with iOS development cause I am so busy doing everything on my own. My kickstarter campaign was aiming for funding for the iOS app development. As it didn't succeed, the project is still left behind in iOS app development up to now.


I hear ya, and I'd love to say I'd take a crack at it... but I don't know if I could do it any justice, at this point.

If any of us wanted to dump a message of anything - even to the Debug log on the iOS app, what would be the best way? Would it work as it stands, or does it need to be a specific set of PIDs? I have noticed there were few without a name, just a hex ID in angle brackets.

Re: Getting started - DTC management?

Posted: Sun Aug 24, 2014 4:26 am
by serch2708
Hi, im just starting with arduino an this freematics obd adapter, I have this http://arduinodev.com/store/index.php?route=product/product&path=20&product_id=52
and im trying to use it just as an ELM327, but i dont know how to use the library, using the begin and init commands, so Im asking if you could post a complete sketch from including libraries to easily read a PID (just one), so then i could modify it to read more PID's and to store it on the SD card. I need help please :? , but thanks anyway.

Re: Getting started - DTC management?

Posted: Sun Aug 24, 2014 4:49 am
by serch2708
BoxOfSnoo wrote:This is where I am at this point, getting the actual codes should be very similar. Does it look reasonable? Do you know if the commands and responses are bytes or are they strings - including or excluding the separating space?

It's still at a debugging stage, obviously, and I haven't received data I can use, just yet. I thought this might help some others too.

Thanks

Code: Select all

    void queryDTCCount()
    {
      char buffer[64];
      write("0101\r");  // send OBD request for DTCs
      int bytesReceived = receive(buffer,1000);
      buffer[bytesReceived+1] = 0;  // just in case, terminate the string

      if (bytesReceived>0) {

         // Response should be "41 01 xx yy yy yy"
         // looking for the value in xx

#if LCD_DISPLAY
         int response = strncmp(buffer,"41",2);
         if (response > 0) {
            lcd.print("OK");
            lcd.println(buffer);

// if (val3 & 128) { // MIL is on
//   val3 = val3 - 128;
// }
           
            queryDTCs();
         } else {
            lcd.print("No");
            lcd.println(buffer);
         }
         
#endif
      }

    }


Hi, could you please post the a complete sketch from libraries declaration thru the init and begin commands, and how to read 1 PID, then I can modify it to read more PID's and to save the results on a SD card. Im new in this project and need some help, thanks beforehand :)

Re: Getting started - DTC management?

Posted: Sun Aug 24, 2014 10:34 pm
by BoxOfSnoo
This is a hard project to get started in, it's hard to get info out of Stanley some times.

Still, check on my github site here https://github.com/BoxOfSnoo/Freematics to see what I have at the moment. It needs fixing and polishing.

I had it displaying on the LCD, but the i2c driver for this board doesn't seem to like control characters so formatting it is still an issue.