Quote:
Originally Posted by ntoobe
Let me finally say thank you for the amazing code!
|
Thank you for your praise! I appreciate it very much!
Quote:
Originally Posted by ntoobe
I want to add thermometer and maybe voltmeter to the next one, using four line display with upper half for mpguino and lower half constantly showing temperature.
Do you have any experience with temp sensors? I like ds18b20, but it uses 'onewire' interface which supposedly doesn't work well or interfere with software which uses interrupts.
It's more convenient to use 'digital' sensors I think - would I2C or SPI device work well with the code in your opinion?
|
It would be a challenge to implement 1-wire with the code. It is probably do-able, but I would only use 1-wire sampling for pure display purposes.
I think that I2C would be better suited for what you want to do, as there is already an I2C support section built into MPGuino now.
Quote:
Originally Posted by ntoobe
Your well refined code is lightyears too advanced for me, despite heap of comments. I hope I will grasp the basics
If I wanted to put something in the "main loop", I would just whack it in the end of code? I guess some traditional for loops wouldn't mess up the timings since they are interrupt based?
I hope you don't mind those noob questions.
|
There are three sections within the main loop - the sampling section which transfers raw injector and VSS signal data from the interrupt world into the main program world, the button checking section which handles button presses, and the display section which actually displays the calculations.
In addition, MPGuino is fundamentally incompatible with the Arduino-specific libraries. It was done this way so many years ago, because the Arduino-specific libraries were not robust enough for use, and they consumed too much program and RAM memory for what they did. I did an experiment not too long ago, and verified this is still the case with regard to 64-bit math.