skuzzle-uk / mx5_arduino_diagnostics Goto Github PK
View Code? Open in Web Editor NEWA small project to read the blink codes from an 89-95 Mazda MX5 diagnostic port and display them as text on an LCD screen.
License: MIT License
A small project to read the blink codes from an 89-95 Mazda MX5 diagnostic port and display them as text on an LCD screen.
License: MIT License
MX5_Arduino_Diagnostics.ino
9 constexpr float INITIALIZE_TIME = 5000;
10 constexpr float LONG_FLASH_TIME = 1000;
11 constexpr float SHORT_FLASH_TIME = 300;
12 constexpr float DARK_TIME = 1600;
13 constexpr float SEPERATION_TIME = 4000;
14 constexpr float TIME_ERROR_ALLOWED = 200;
These constant expressions are supposed to be set to match the cars flash output system.
There are multiple guides found through google which state that long flash is tens, short flash ones, but nothing to say how long a long flash actually is in millis.
The one's of most interest are LONG_FLASH_TIME, SHORT_FLASH_TIME and DARK_TIME, DARK_TIME being the gap between error codes.
TIME_ERROR_ALLOWED has been added to allow some variation in case between vehicle times are not accurate to the exact millis. This value can be reduced once we have good data of test vehicles.
If you cant test this code on a vehicle, then maybe you could use a scope to measure the time that the pin in the diag box goes to gnd.
Line 140 of lcd_pages.ino
code_display_string[i] = "#"; //@TODO why does this display as a blank space rather than #
This line is part of the codes_found page drawn by LCD_CodesFound()
method.
It was designed to add # characters after the error code string had scrolled passed just for visual effect before starting the scroll from the first character again but # draws on my lcd in this line as a non break space (space bar). If I replace the # with a space then I get a lower case p or similar looking character instead.
Work out why this is displaying a totally incorrect character and then make it display # or anything that may be more suitable. This could end up being a space if it looks better, but I hate the fact it does display what I ask it to.
MX5_Arduino_Diagnostics.ino
Unknown fault codes should display something other than just the flash code number.
Suggest modify FAULT_CODE_LOOKUP_TABLE to have the string "Unknown fault code" or similar in all unknown codes.
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.