fuzzyluke / obd2kit Goto Github PK
View Code? Open in Web Editor NEWOBD-2 library for iPhone
OBD-2 library for iPhone
Hello,
I have been testing present Github code with wifi ELM-327 OBD-2 device. RPM is completing working fine. But i want to get a Trouble Codes and for that i tried to make few changes as well.
Yet i am not able to get any Trouble Codes.
It would be really appreciated if any one of you can help me to get trouble codes ?
Regards,
Jiten
Hi,
I'm trying to get other PID's in my app, however all that I'm getting 0x0C and 0x0D. I want 0x2F, 0x0A, and 0x11. Here is the code that I'm trying to use:
- (void)scanTool:(FLScanTool*)scanTool didReceiveResponse:(NSArray*)responses {
FLINFO(@"DID RECEIVE RESPONSE")
FLECUSensor* sensor = nil;
for (FLScanToolResponse* response in responses) {
sensor = [FLECUSensor sensorForPID:response.pid];
[sensor setCurrentResponse:response];
PID.text = [NSString stringWithFormat:@"%lu", (unsigned long)response.pid];
if (response.pid == 0x0C) {
// Update RPM Display
rpmLabel.text = [NSString stringWithFormat:@"%@ %@", [sensor valueStringForMeasurement1:NO], [sensor imperialUnitString]];
[rpmLabel setNeedsDisplay];
}
else if(response.pid == 0x2F){
NSLog(@"Fuel level at: %@",[NSString stringWithFormat:@"%@ %@", [sensor valueStringForMeasurement1:NO], [sensor imperialUnitString]] );
fuelLevel.text = [NSString stringWithFormat:@"%@ %@", [sensor valueStringForMeasurement1:NO], [sensor imperialUnitString]];
[fuelLevel setNeedsDisplay];
}
else if(response.pid == 0x0A){
NSLog(@"Fuel pressure: %@", [NSString stringWithFormat:@"%@ %@", [sensor valueStringForMeasurement1:NO], [sensor imperialUnitString]]);
}
else if(response.pid == 0x11){
NSLog(@"Throttle Position: %@", [NSString stringWithFormat:@"%@ %@", [sensor valueStringForMeasurement1:NO], [sensor imperialUnitString]]);
TPS.text = [NSString stringWithFormat:@"%@ %@", [sensor valueStringForMeasurement1:NO], [sensor imperialUnitString]];
[TPS setNeedsDisplay];
}
else if(response.pid == 0x0D) {
// Update Speed Display
speedLabel.text = [NSString stringWithFormat:@"%@ %@", [sensor valueStringForMeasurement1:NO], [sensor imperialUnitString]];
[speedLabel setNeedsDisplay];
}else{
}
}
}
What am I doing wrong? I tried printing the value for the PID to a label and all I'm getting is 12 and 13 when I push the gas pedal. I'm driving a Lexus RX400h with a very temperamental brain that likes to control the RPM speed and fuel consumption itself. Is my car the problem?
Hey Guys,
I'm developing an iPhone App which connect to my Wifi OBD2 Adapter an sends me the actual values to my Phone continuously. That means when I drive faster I also want to show this in my App. I'm using the OBD2Kit from Github and programming in Objective C.
My OBD2 Adapter is the vGate iCar2.
I'm using the Sample App from the OBD2Kit to get all my OBD2 Informations.
When I use the Sample App I just get the data one time when I open the App.
That means the values don't change while driving.
For now I try to start a new Connection to the OBD2 by pressing a Button which starts the [_scanTool startScan]
method.
When I press the Button
So can someone help me the get the Data all the Time
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.