01-14-2017, 08:08 AM
|
#31 (permalink)
|
EcoModding Apprentice
Join Date: Dec 2012
Location: Portugal
Posts: 197
Thanks: 93
Thanked 70 Times in 64 Posts
|
Hi t vago
This new version holds the error.
Your procedure is the same as mine, the only differences are in the LCD selection and buttons your selection is different, one thing that is also different and may justify the problem is that I use the Arduino Mega without anything connected only with the USB cable, it is only speculation but what you have connected do not let the arduino fall asleep and allow to complete the recording.
Because this problem only started after infusing deep sleep into the code I think that's the problem.
Thanks
José Rodrigues
|
|
|
The Following User Says Thank You to josemapiro For This Useful Post:
|
|
Today
|
|
|
Other popular topics in this forum...
|
|
|
01-14-2017, 05:31 PM
|
#32 (permalink)
|
EcoModding Apprentice
Join Date: Feb 2009
Location: Estonia
Posts: 199
Thanks: 19
Thanked 40 Times in 28 Posts
|
Hi,
I am Meelis, I have planned lately that I publish my GIT repository and/or maybe we can merge our codes. Seems that you are already taking features from my code and implementing them to your version. I dont mind, my plan was to suggest merging anyway
I dont know how much you use my code, but at least you use some of features I added (referencing them "via Meelis11").
I can say that if you implement all features to your code, them maybe I can ditch mine and there is only one code
Your code seem so low level so I am not sure that I can contribute (assembler and low level pure C)
How many mpguino code "forks" are out there that can be downloaded? (different versions from different people) that are worth considering (not just custom features for persons own use)
They should be added to wiki.
Too bad that I cannot test your code right now, because I have run out all atmega328 chips at the moment, only one is in my car, my arduino is chipless
I am checking your source code and reading what features you have implemented - feature list is really inspiring!
Some questions:
1) are you using some kind of repository for version tracking? If not, then please start using GIT (github or bitbucket, I am using https://bitbucket.org)
https://www.sitepoint.com/git-for-beginners/
2) why are you keeping all sourcecode in one file?
3) How do you compile and upload code to mpguino? do I need to compile it using avr-gcc and use programmer and avrdude, or does copy-paste to arduino IDE and upload using arduino work?
At least it seems to compile in arduino IDE, but gives one warning
"WARNING: Category '' in library OneWire is not valid. Setting to 'Uncategorized'"
Like I said, I cannot test uploading (no atmega chips)
keep up good work!
Meelis
|
|
|
The Following 3 Users Say Thank You to meelis11 For This Useful Post:
|
|
01-16-2017, 12:55 PM
|
#33 (permalink)
|
MPGuino Supporter
Join Date: Oct 2010
Location: Hungary
Posts: 1,808
iNXS - '10 Opel Zafira 111 Anniversary Suzi - '02 Suzuki Swift GL
Thanks: 831
Thanked 709 Times in 457 Posts
|
Quote:
Originally Posted by josemapiro
This new version holds the error.
Your procedure is the same as mine, the only differences are in the LCD selection and buttons your selection is different, one thing that is also different and may justify the problem is that I use the Arduino Mega without anything connected only with the USB cable, it is only speculation but what you have connected do not let the arduino fall asleep and allow to complete the recording.
Because this problem only started after infusing deep sleep into the code I think that's the problem.
|
I still could not duplicate the issue, even with removing everything off my AtMega2560 and programming it with your LCD and button configuration.
I think I may have inadvertently solved the issue when I re-burned my AtMega2560's bootloader.
I also think this problem is not limited to my version of the MPGuino code.
Google: "mega2560 programming times out site:forum.arduino.cc"
So I was wrong to assume that there wouldn't be anything within a successfully compiled sketch that would cause the programming to fail, simply because there was something within the sketch itself. The AtMega2560 appears to suffer from a bootloader bug that does exactly this.
Trouble is, there's nothing in my code that is obviously the cause of the problem. For instance, many users report that if they include "!!!" within a string in their sketch, it will not load onto their AtMega2560. In my code, there is no "!!!" that gets compiled. There were "!!!"s in the source file, in the #error directives, but they do not get compiled into the code. Besides, those "!!!"s in the #error directives were in the 20170107 version, and you reported that it successfully uploaded.
There is also another sequence of hex numbers that apparently causes programming to fail with this timeout error, but I am not able to find this sequence. Like I said, I re-programmed my AtMega2560's bootloader, and apparently, the new bootloader does not have this bug. I cannot duplicate this problem with my AtMega2560.
|
|
|
The Following 2 Users Say Thank You to t vago For This Useful Post:
|
|
01-16-2017, 01:10 PM
|
#34 (permalink)
|
MPGuino Supporter
Join Date: Oct 2010
Location: Hungary
Posts: 1,808
iNXS - '10 Opel Zafira 111 Anniversary Suzi - '02 Suzuki Swift GL
Thanks: 831
Thanked 709 Times in 457 Posts
|
Quote:
Originally Posted by meelis11
Hi,
I am Meelis, I have planned lately that I publish my GIT repository and/or maybe we can merge our codes. Seems that you are already taking features from my code and implementing them to your version. I dont mind, my plan was to suggest merging anyway
|
Hello, Meelis! You've been an inspiration to me. Glad we're on the same page.
Quote:
Originally Posted by meelis11
I dont know how much you use my code, but at least you use some of features I added (referencing them "via Meelis11").
I can say that if you implement all features to your code, them maybe I can ditch mine and there is only one code
Your code seem so low level so I am not sure that I can contribute (assembler and low level pure C)
|
Yah, I have been able to implement some features, but up until I started working with skybolt, I never had direct access to your code. You appear to have grafted your modifications onto the existing 0.86 DCB code, and my own code is almost a complete re-write. I think that there are a few text strings from the DCB code that are still there.
The code itself is a bit complex, but I have also been trying to make it easier to understand with re-arranging data structures and with inserting these strange things into the code, that begin with a "// ". I think they're called "comments..."
Quote:
Originally Posted by meelis11
How many mpguino code "forks" are out there that can be downloaded? (different versions from different people) that are worth considering (not just custom features for persons own use)
They should be added to wiki.
Too bad that I cannot test your code right now, because I have run out all atmega328 chips at the moment, only one is in my car, my arduino is chipless
I am checking your source code and reading what features you have implemented - feature list is really inspiring!
|
Glad you like the list! I am trying to figure out how to add the "idle" and "EOC" auto-select screens that your code has. That's a real nice feature.
Quote:
Originally Posted by meelis11
|
I work on this code from several different locations. One of them does not allow access to GitHub.
Quote:
Originally Posted by meelis11
2) why are you keeping all sourcecode in one file?
|
It's easier for me to search for locations within the program, if I need to make a code fix or modification.
I am trying to re-arrange the code so that it will be easy to split apart into modules. This is a long-term issue that I am keeping in the back of my mind.
Quote:
Originally Posted by meelis11
3) How do you compile and upload code to mpguino? do I need to compile it using avr-gcc and use programmer and avrdude, or does copy-paste to arduino IDE and upload using arduino work?
At least it seems to compile in arduino IDE, but gives one warning
"WARNING: Category '' in library OneWire is not valid. Setting to 'Uncategorized'"
Like I said, I cannot test uploading (no atmega chips)
|
I edit the code with a program named "TextPad," and copy/paste it into an Arduino IDE. From there, I program whatever platform I am testing the code on.
Not sure what this OneWire error is - I've never seen it. I try not to use any Arduino-specific library functions. They are great for tinkering, but I would rather optimize for speed, and those Arduino libraries are not optimized for speed.
Currently, I have a AtMega2560 test platform, a TinkerKit! LCD module test platform, and a JellyBeanDriver MPGuino test platform. I also have one of your MPGuinos, that I bought off another EcoModder.com member, but I have not yet started testing on it.
Quote:
Originally Posted by meelis11
keep up good work!
Meelis
|
Thanks again!
|
|
|
01-16-2017, 05:54 PM
|
#35 (permalink)
|
EcoModding Apprentice
Join Date: Dec 2012
Location: Portugal
Posts: 197
Thanks: 93
Thanked 70 Times in 64 Posts
|
Hi t vago
Quote:
Originally Posted by t vago
I still could not duplicate the issue, even with removing everything off my AtMega2560 and programming it with your LCD and button configuration.
I think I may have inadvertently solved the issue when I re-burned my AtMega2560's bootloader.
I also think this problem is not limited to my version of the MPGuino code.
Google: "mega2560 programming times out site:forum.arduino.cc"
So I was wrong to assume that there wouldn't be anything within a successfully compiled sketch that would cause the programming to fail, simply because there was something within the sketch itself. The AtMega2560 appears to suffer from a bootloader bug that does exactly this.
Trouble is, there's nothing in my code that is obviously the cause of the problem. For instance, many users report that if they include "!!!" within a string in their sketch, it will not load onto their AtMega2560. In my code, there is no "!!!" that gets compiled. There were "!!!"s in the source file, in the #error directives, but they do not get compiled into the code. Besides, those "!!!"s in the #error directives were in the 20170107 version, and you reported that it successfully uploaded.
There is also another sequence of hex numbers that apparently causes programming to fail with this timeout error, but I am not able to find this sequence. Like I said, I re-programmed my AtMega2560's bootloader, and apparently, the new bootloader does not have this bug. I cannot duplicate this problem with my AtMega2560.
|
I'm going to install the bootloader again, as suggested, but it will take quite a few days because I bought USBasp on ebay today and it will take several days to arrive.
Thanks
José Rodrigues
|
|
|
The Following User Says Thank You to josemapiro For This Useful Post:
|
|
01-16-2017, 07:04 PM
|
#36 (permalink)
|
MPGuino Supporter
Join Date: Oct 2010
Location: Hungary
Posts: 1,808
iNXS - '10 Opel Zafira 111 Anniversary Suzi - '02 Suzuki Swift GL
Thanks: 831
Thanked 709 Times in 457 Posts
|
Did some more work on the deep sleep function. I believe I have something that will work, and am going to test it tonight.
Considering re-writing the ADC routines to save even more power during idle mode, when MPGuino is patiently waiting for the next injector pulse or VSS pulse or button press. Right now, for those configurations which require ADC (mainly the 5-position Parallax switch or the 5 analog buttons or the Chrysler MAP sensor input), the ADC is pretty much sampling all the time.
This won't affect those of you who do not use these things right now. However, in the future, it may affect those of you who want vehicle battery voltage readings or coolant temperature or other analog readings.
|
|
|
The Following User Says Thank You to t vago For This Useful Post:
|
|
01-16-2017, 07:31 PM
|
#37 (permalink)
|
EcoModding Apprentice
Join Date: Dec 2012
Location: Portugal
Posts: 197
Thanks: 93
Thanked 70 Times in 64 Posts
|
Quote:
Originally Posted by t vago
This won't affect those of you who do not use these things right now. However, in the future, it may affect those of you who want vehicle battery voltage readings or coolant temperature or other analog readings.
|
I think that this inactivity only happens after a certain time without activity in the injectors, VSS or button, if it is thus who wants to consult the voltage of the battery or any other reading, when using the button activates the system again, leaving all the information again available.
Thanks
José Rodrigues
|
|
|
The Following User Says Thank You to josemapiro For This Useful Post:
|
|
01-17-2017, 04:41 PM
|
#38 (permalink)
|
EcoModding Apprentice
Join Date: Dec 2012
Location: Portugal
Posts: 197
Thanks: 93
Thanked 70 Times in 64 Posts
|
Hi t vago
Good news, I was able to upload the new version without any problem like the one on the 7th, maybe because the sum of the day is also 7 LOL.
Thanks
José Rodrigues
|
|
|
The Following User Says Thank You to josemapiro For This Useful Post:
|
|
01-18-2017, 08:27 AM
|
#39 (permalink)
|
EcoModding Lurker
Join Date: Jan 2017
Location: finland
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
Does this version also need full time power for Arduino?
In thinking to install this to motorcycle and battery cant handle long time load and it might be a problem?
Sorry for asking but whole device is new to me and found it yesterday...
And did you put the GIT repo up somewhere?
|
|
|
01-18-2017, 11:46 PM
|
#40 (permalink)
|
MPGuino Supporter
Join Date: Oct 2010
Location: Hungary
Posts: 1,808
iNXS - '10 Opel Zafira 111 Anniversary Suzi - '02 Suzuki Swift GL
Thanks: 831
Thanked 709 Times in 457 Posts
|
Quote:
Originally Posted by josemapiro
Good news, I was able to upload the new version without any problem like the one on the 7th, maybe because the sum of the day is also 7 LOL.
|
That's wonderful! It may well have worked because the sum of the day is also 7! Heh!
I think I will keep available both a "latest version" and a "version last known to upload successfully to the AtMega2560," at least until they finally figure out why the AtMega2560 occasionally fails to program.
Quote:
Originally Posted by Uusitalo
Does this version also need full time power for Arduino?
In thinking to install this to motorcycle and battery cant handle long time load and it might be a problem?
Sorry for asking but whole device is new to me and found it yesterday...
And did you put the GIT repo up somewhere?
|
Yah, MPGuino still requires a full-time power source.
Good news, though - I am finishing up the deep sleep addition to my code, and should release it here soon. This will drastically reduce power consumption when the MPGuino goes to sleep (after 2 minutes of no engine, no vehicle movement, and no button pressing).
I do not currently use GIT, so there is no available repo. I post the latest version here on Ecomodder, and keep all of the previous versions on my network storage, and (for November 2016 and later) in a Gmail draft email as attachments. I've got versions dating from 2013 July 06.
|
|
|
The Following User Says Thank You to t vago For This Useful Post:
|
|
|